1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

Small eshell-history-size fix.

* lisp/eshell/em-hist.el (eshell-hist-initialize):
Handle eshell-history-size nil and HISTSIZE set or unset.
This commit is contained in:
Glenn Morris 2011-12-01 17:28:10 -05:00
parent 0068070eb0
commit 0b95068862
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-12-01 Glenn Morris <rgm@gnu.org>
* eshell/em-hist.el (eshell-hist-initialize):
Handle eshell-history-size nil and HISTSIZE set or unset.
2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
* man.el (Man-completion-table): Fix the lambda case (bug#10168).

View File

@ -261,7 +261,12 @@ element, regardless of any text on the command line. In that case,
(make-local-variable 'eshell-history-size)
(or eshell-history-size
(setq eshell-history-size (getenv "HISTSIZE")))
(let ((hsize (getenv "HISTSIZE")))
(setq eshell-history-size
(if (and (> (length hsize) 0)
(integerp (setq hsize (string-to-number hsize))))
hsize
128))))
(make-local-variable 'eshell-history-file-name)
(or eshell-history-file-name