aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2011-12-01 17:28:10 -0500
committerGlenn Morris <[email protected]>2011-12-01 17:28:10 -0500
commit0b95068862318b1be0988d7b4f5c2e5e19d01553 (patch)
tree031d93c94bfc6468a22a5fcdca94ea2e88cfbda4
parent0068070eb050be4d7f46313e67e5902a931ce051 (diff)
Small eshell-history-size fix.
* lisp/eshell/em-hist.el (eshell-hist-initialize): Handle eshell-history-size nil and HISTSIZE set or unset.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/eshell/em-hist.el7
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ded8cc066f..4f728dff33 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-01 Glenn Morris <[email protected]>
+
+ * eshell/em-hist.el (eshell-hist-initialize):
+ Handle eshell-history-size nil and HISTSIZE set or unset.
+
2011-12-01 Stefan Monnier <[email protected]>
* 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 db5e98062a..975f1b1714 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