/[emacs]/emacs/lisp/eshell/em-hist.el
ViewVC logotype

Diff of /emacs/lisp/eshell/em-hist.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by pj, Sat Feb 16 09:39:14 2002 UTC revision 1.9.4.1 by miles, Fri Apr 4 06:20:20 2003 UTC
# Line 104  This mirrors the optional behavior of ba Line 104  This mirrors the optional behavior of ba
104    :type 'boolean    :type 'boolean
105    :group 'eshell-hist)    :group 'eshell-hist)
106    
107  (defcustom eshell-ask-to-save-history t  (defcustom eshell-save-history-on-exit 'ask
108    "*Determine if history should be automatically saved.    "*Determine if history should be automatically saved.
109  History is always preserved after sanely exiting an Eshell buffer.  History is always preserved after sanely exiting an Eshell buffer.
110  However, when Emacs is being shut down, this variable determines  However, when Emacs is being shut down, this variable determines
111  whether to prompt the user.  whether to prompt the user.
112  If set to nil, it means never ask whether history should be saved.  If set to nil, it means never save history on termination of Emacs.
113  If set to t, always ask if any Eshell buffers are open at exit time.  If set to `ask', ask if any Eshell buffers are open at exit time.
114  If set to `always', history will always be saved, silently."  If set to t, history will always be saved, silently."
115    :type '(choice (const :tag "Never" nil)    :type '(choice (const :tag "Never" nil)
116                   (const :tag "Ask" t)                   (const :tag "Ask" ask)
117                   (const :tag "Always save" always))                   (const :tag "Always save" t))
118    :group 'eshell-hist)    :group 'eshell-hist)
119    
120  (defcustom eshell-input-filter  (defcustom eshell-input-filter
# Line 269  element, regardless of any text on the c Line 269  element, regardless of any text on the c
269    (make-local-variable 'eshell-save-history-index)    (make-local-variable 'eshell-save-history-index)
270    
271    (if (minibuffer-window-active-p (selected-window))    (if (minibuffer-window-active-p (selected-window))
272        (set (make-local-variable 'eshell-ask-to-save-history) nil)        (set (make-local-variable 'eshell-save-history-on-exit) nil)
273      (set (make-local-variable 'eshell-history-ring) nil)      (set (make-local-variable 'eshell-history-ring) nil)
274      (if eshell-history-file-name      (if eshell-history-file-name
275          (eshell-read-history nil t))          (eshell-read-history nil t))
# Line 296  element, regardless of any text on the c Line 296  element, regardless of any text on the c
296          (with-current-buffer buf          (with-current-buffer buf
297            (if (and eshell-mode            (if (and eshell-mode
298                     eshell-history-file-name                     eshell-history-file-name
299                     eshell-ask-to-save-history                     eshell-save-history-on-exit
300                     (or (eq eshell-ask-to-save-history 'always)                     (or (eq eshell-save-history-on-exit t)
301                         (y-or-n-p                         (y-or-n-p
302                          (format "Save input history for Eshell buffer `%s'? "                          (format "Save input history for Eshell buffer `%s'? "
303                                  (buffer-name buf)))))                                  (buffer-name buf)))))

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26