From: Glenn Morris Date: Thu, 1 Dec 2011 22:28:10 +0000 (-0500) Subject: Small eshell-history-size fix. X-Git-Tag: emacs-pretest-24.0.93~232^2~41 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0b95068862318b1be0988d7b4f5c2e5e19d01553;p=emacs.git Small eshell-history-size fix. * lisp/eshell/em-hist.el (eshell-hist-initialize): Handle eshell-history-size nil and HISTSIZE set or unset. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ded8cc066fa..4f728dff33d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-12-01 Glenn Morris + + * eshell/em-hist.el (eshell-hist-initialize): + Handle eshell-history-size nil and HISTSIZE set or unset. + 2011-12-01 Stefan Monnier * man.el (Man-completion-table): Fix the lambda case (bug#10168). diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index db5e98062a9..975f1b17143 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -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