]> git.eshelyaron.com Git - emacs.git/commitdiff
* shell.el (shell-mode): Set comint-input-ring-size from HISTSIZE. (Bug#7889)
authorGlenn Morris <rgm@gnu.org>
Wed, 9 Mar 2011 09:01:14 +0000 (01:01 -0800)
committerGlenn Morris <rgm@gnu.org>
Wed, 9 Mar 2011 09:01:14 +0000 (01:01 -0800)
lisp/ChangeLog
lisp/shell.el

index 253d47364f82e6ee256abb90cbdd1f921ac5c798..8b3b5b6801b6e3f5d35fcb10527ba498ebe23543 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-09  Glenn Morris  <rgm@gnu.org>
 
+       * shell.el (shell-mode):
+       Set comint-input-ring-size from HISTSIZE.  (Bug#7889)
+
        * progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change.
        Check for GDBHISTFILE, HISTSIZE, etc.  (Bug#7889)
 
index 2f11cc6314c80f4446a458052acdf4f1607f2267..bceea990bafcac917daac0e4b6c7197f7307eca9 100644 (file)
@@ -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")