From cf2b7efc78f0004a58b14a1eb470a306a139197d Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 17 Dec 2013 18:29:11 +0100 Subject: [PATCH] Remove no more needed bindings of split-height-threshold. * dired.el (dired-mark-pop-up): * register.el (register-preview): Don't bind split-height-threshold here since it's now done in display-buffer-below-selected. --- lisp/ChangeLog | 7 +++++++ lisp/dired.el | 35 +++++++++++++++++------------------ lisp/register.el | 31 +++++++++++++++---------------- 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a55cf9c180d..763136cb423 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-12-17 Martin Rudalics + + * dired.el (dired-mark-pop-up): + * register.el (register-preview): Don't bind + split-height-threshold here since it's now done in + display-buffer-below-selected. + 2013-12-17 oblique (tiny change) * term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with diff --git a/lisp/dired.el b/lisp/dired.el index afd9fbca5c2..7e96bdfb87f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3079,24 +3079,23 @@ argument or confirmation)." (apply function args) (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))) (with-current-buffer buffer - (let ((split-height-threshold 0)) - (with-temp-buffer-window - buffer - (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) - #'(lambda (window _value) - (with-selected-window window - (unwind-protect - (apply function args) - (when (window-live-p window) - (quit-restore-window window 'kill))))) - ;; Handle (t FILE) just like (FILE), here. That value is - ;; used (only in some cases), to mean just one file that was - ;; marked, rather than the current line file. - (dired-format-columns-of-files - (if (eq (car files) t) (cdr files) files)) - (remove-text-properties (point-min) (point-max) - '(mouse-face nil help-echo nil)))))))) + (with-temp-buffer-window + buffer + (cons 'display-buffer-below-selected + '((window-height . fit-window-to-buffer))) + #'(lambda (window _value) + (with-selected-window window + (unwind-protect + (apply function args) + (when (window-live-p window) + (quit-restore-window window 'kill))))) + ;; Handle (t FILE) just like (FILE), here. That value is + ;; used (only in some cases), to mean just one file that was + ;; marked, rather than the current line file. + (dired-format-columns-of-files + (if (eq (car files) t) (cdr files) files)) + (remove-text-properties (point-min) (point-max) + '(mouse-face nil help-echo nil))))))) (defun dired-format-columns-of-files (files) (let ((beg (point))) diff --git a/lisp/register.el b/lisp/register.el index 623b1f2c0c8..cad26124fdd 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -122,22 +122,21 @@ See the documentation of the variable `register-alist' for possible VALUEs." "Pop up a window to show register preview in BUFFER. If SHOW-EMPTY is non-nil show the window even if no registers." (when (or show-empty (consp register-alist)) - (let ((split-height-threshold 0)) - (with-temp-buffer-window - buffer - (cons 'display-buffer-below-selected - '((window-height . fit-window-to-buffer))) - nil - (with-current-buffer standard-output - (setq cursor-in-non-selected-windows nil) - (mapc - (lambda (r) - (insert (or (run-hook-with-args-until-success - 'register-preview-functions r) - (format "%s %s\n" - (concat (single-key-description (car r)) ":") - (register-describe-oneline (car r)))))) - register-alist)))))) + (with-temp-buffer-window + buffer + (cons 'display-buffer-below-selected + '((window-height . fit-window-to-buffer))) + nil + (with-current-buffer standard-output + (setq cursor-in-non-selected-windows nil) + (mapc + (lambda (r) + (insert (or (run-hook-with-args-until-success + 'register-preview-functions r) + (format "%s %s\n" + (concat (single-key-description (car r)) ":") + (register-describe-oneline (car r)))))) + register-alist))))) (defun register-read-with-preview (prompt) "Read an event with register preview using PROMPT. -- 2.11.4.GIT