aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2017-01-27 11:39:31 +0200
committerEli Zaretskii2017-01-27 11:39:31 +0200
commitd7ac7b15ca9e490c8e059ad92b968a3008a7b83e (patch)
treea9e494c800198b0d417d44b2c64008a898a69685 /lisp
parent87027734e99c1fc4ad7803421e1086e3388d20f3 (diff)
downloademacs-d7ac7b15ca9e490c8e059ad92b968a3008a7b83e.tar.gz
emacs-d7ac7b15ca9e490c8e059ad92b968a3008a7b83e.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/shell.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 133771aeb32..c8a8555d632 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
544buffer." 544buffer."
545 (setq comint-prompt-regexp shell-prompt-pattern) 545 (setq comint-prompt-regexp shell-prompt-pattern)
546 (shell-completion-vars) 546 (shell-completion-vars)
547 (set (make-local-variable 'paragraph-separate) "\\'") 547 (setq-local paragraph-separate "\\'")
548 (set (make-local-variable 'paragraph-start) comint-prompt-regexp) 548 (setq-local paragraph-start comint-prompt-regexp)
549 (set (make-local-variable 'font-lock-defaults) '(shell-font-lock-keywords t)) 549 (setq-local font-lock-defaults '(shell-font-lock-keywords t))
550 (set (make-local-variable 'shell-dirstack) nil) 550 (setq-local shell-dirstack nil)
551 (set (make-local-variable 'shell-last-dir) nil) 551 (setq-local shell-last-dir nil)
552 ;; People expect Shell mode to keep the last line of output at
553 ;; window bottom.
554 (setq-local scroll-conservatively 101)
552 (shell-dirtrack-mode 1) 555 (shell-dirtrack-mode 1)
553 556
554 ;; By default, ansi-color applies faces using overlays. This is 557 ;; By default, ansi-color applies faces using overlays. This is