emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d7ac7b1: Ensure last line is at window bottom in sh


From: Eli Zaretskii
Subject: [Emacs-diffs] master d7ac7b1: Ensure last line is at window bottom in shell buffers
Date: Fri, 27 Jan 2017 09:40:34 +0000 (UTC)

branch: master
commit d7ac7b15ca9e490c8e059ad92b968a3008a7b83e
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Ensure last line is at window bottom in shell buffers
    
    * lisp/shell.el (shell-mode): Use setq-local.  Set
    scroll-conservatively to 101 locally.  See the discussion at
    http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00736.html
    for the reasons.
---
 lisp/shell.el |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/shell.el b/lisp/shell.el
index 133771a..c8a8555 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -544,11 +544,14 @@ control whether input and output cause the window to 
scroll to the end of the
 buffer."
   (setq comint-prompt-regexp shell-prompt-pattern)
   (shell-completion-vars)
-  (set (make-local-variable 'paragraph-separate) "\\'")
-  (set (make-local-variable 'paragraph-start) comint-prompt-regexp)
-  (set (make-local-variable 'font-lock-defaults) '(shell-font-lock-keywords t))
-  (set (make-local-variable 'shell-dirstack) nil)
-  (set (make-local-variable 'shell-last-dir) nil)
+  (setq-local paragraph-separate "\\'")
+  (setq-local paragraph-start comint-prompt-regexp)
+  (setq-local font-lock-defaults '(shell-font-lock-keywords t))
+  (setq-local shell-dirstack nil)
+  (setq-local shell-last-dir nil)
+  ;; People expect Shell mode to keep the last line of output at
+  ;; window bottom.
+  (setq-local scroll-conservatively 101)
   (shell-dirtrack-mode 1)
 
   ;; By default, ansi-color applies faces using overlays.  This is



reply via email to

[Prev in Thread] Current Thread [Next in Thread]