From: Juri Linkov Date: Thu, 18 Jan 2018 21:43:38 +0000 (+0200) Subject: Improve "*Process List*" and "*Local Variables*". (Bug#30016) X-Git-Tag: emacs-27.0.90~5859 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ec3853326933bef899de1a8fee66d902ea8f7c9;p=emacs.git Improve "*Process List*" and "*Local Variables*". (Bug#30016) * lisp/files.el (save-buffers-kill-emacs): Display "*Process List*" buffer at bottom. (hack-local-variables-confirm): Display "*Local Variables*" buffer at bottom. * lisp/simple.el (process-menu-mode): Increase buffer column width from 15 to 25. --- diff --git a/lisp/files.el b/lisp/files.el index 5b8dff71310..7194b56fef2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3315,7 +3315,15 @@ n -- to ignore the local variables list.") ;; Display the buffer and read a choice. (save-window-excursion - (pop-to-buffer buf) + (pop-to-buffer buf `((display-buffer--maybe-same-window + display-buffer-reuse-window + display-buffer--maybe-pop-up-frame-or-window + display-buffer-at-bottom) + ,(if temp-buffer-resize-mode + '(window-height . resize-temp-buffer-window) + '(window-height . fit-window-to-buffer)) + ,(when temp-buffer-resize-mode + '(preserve-size . (nil . t))))) (let* ((exit-chars '(?y ?n ?\s ?\C-g ?\C-v)) (prompt (format "Please type %s%s: " (if offer-save "y, n, or !" "y or n") @@ -6917,8 +6925,17 @@ if any returns nil. If `confirm-kill-emacs' is non-nil, calls it." (setq active t)) (setq processes (cdr processes))) (or (not active) - (with-current-buffer-window - (get-buffer-create "*Process List*") nil + (with-displayed-buffer-window + (get-buffer-create "*Process List*") + `((display-buffer--maybe-same-window + display-buffer-reuse-window + display-buffer--maybe-pop-up-frame-or-window + display-buffer-at-bottom) + ,(if temp-buffer-resize-mode + '(window-height . resize-temp-buffer-window) + '(window-height . fit-window-to-buffer)) + ,(when temp-buffer-resize-mode + '(preserve-size . (nil . t)))) #'(lambda (window _value) (with-selected-window window (unwind-protect diff --git a/lisp/simple.el b/lisp/simple.el index 87e0b233779..e51bc132a6b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3927,7 +3927,9 @@ support pty association, if PROGRAM is nil." (setq tabulated-list-format [("Process" 15 t) ("PID" 7 t) ("Status" 7 t) - ("Buffer" 15 t) + ;; 25 is the length of the long standard buffer + ;; name "*Async Shell Command*<10>" (bug#30016) + ("Buffer" 25 t) ("TTY" 12 t) ("Command" 0 t)]) (make-local-variable 'process-menu-query-only)