mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* shell.el (shell-mode): Set comint-input-ring-size from HISTSIZE. (Bug#7889)
This commit is contained in:
parent
791cd3860e
commit
0be6f4f187
2 changed files with 9 additions and 1 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue