+2013-12-17 Martin Rudalics <rudalics@gmx.at>
+
+ * 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 <psyberbits@gmail.com> (tiny change)
* term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with
(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)))
"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.