]> git.eshelyaron.com Git - emacs.git/commitdiff
Small eshell-history-size fix.
authorGlenn Morris <rgm@gnu.org>
Thu, 1 Dec 2011 22:28:10 +0000 (17:28 -0500)
committerGlenn Morris <rgm@gnu.org>
Thu, 1 Dec 2011 22:28:10 +0000 (17:28 -0500)
* lisp/eshell/em-hist.el (eshell-hist-initialize):
Handle eshell-history-size nil and HISTSIZE set or unset.

lisp/ChangeLog
lisp/eshell/em-hist.el

index ded8cc066fac5e1d83506ac0655beee4b79badf0..4f728dff33de8b299b27587c4ab17a65ea362b65 100644 (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).
index db5e98062a9b1504fdc904e49e66eb92921050be..975f1b171438415e2f16a10300cb92f6c8dda086 100644 (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