diff options
author | Glenn Morris <rgm@gnu.org> | 2011-03-09 01:01:14 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-09 01:01:14 -0800 |
commit | 0be6f4f1873153cdbdb84c36f460975a6c95829a (patch) | |
tree | 4abcc7dc552587b12608a251c7fa32640a5668b2 /lisp/shell.el | |
parent | 791cd3860e38e633cf301aced257a1eac89f2b1f (diff) | |
download | emacs-0be6f4f1873153cdbdb84c36f460975a6c95829a.tar.gz emacs-0be6f4f1873153cdbdb84c36f460975a6c95829a.tar.bz2 emacs-0be6f4f1873153cdbdb84c36f460975a6c95829a.zip |
* shell.el (shell-mode): Set comint-input-ring-size from HISTSIZE. (Bug#7889)
Diffstat (limited to 'lisp/shell.el')
-rw-r--r-- | lisp/shell.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 2f11cc6314c..bceea990baf 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -459,7 +459,12 @@ buffer." ;; shell-dependent assignments. (when (ring-empty-p comint-input-ring) (let ((shell (file-name-nondirectory (car - (process-command (get-buffer-process (current-buffer))))))) + (process-command (get-buffer-process (current-buffer)))))) + (hsize (getenv "HISTSIZE"))) + (and (stringp hsize) + (integerp (setq hsize (string-to-number hsize))) + (> hsize 0) + (set (make-local-variable 'comint-input-ring-size) hsize)) (setq comint-input-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash") "~/.bash_history") |