Mercurial > emacs
diff lisp/savehist.el @ 69780:a86cacdbe08f
(savehist): Add :version.
(savehist-ignored-variables): New variable.
(savehist-minibuffer-hook): Don't save variables listed in
`savehist-ignored-variables'.
author | Reiner Steib <Reiner.Steib@gmx.de> |
---|---|
date | Mon, 03 Apr 2006 17:32:28 +0000 |
parents | 3bd95f4f2941 |
children | 9a5e8a784858 |
line wrap: on
line diff
--- a/lisp/savehist.el Mon Apr 03 17:27:06 2006 +0000 +++ b/lisp/savehist.el Mon Apr 03 17:32:28 2006 +0000 @@ -56,6 +56,7 @@ (defgroup savehist nil "Save minibuffer history." + :version "22.1" :group 'minibuffer) ;;;###autoload @@ -91,6 +92,11 @@ :type '(repeat variable) :group 'savehist) +(defcustom savehist-ignored-variables nil ;; '(command-history) + "*List of additional variables not to save." + :type '(repeat variable) + :group 'savehist) + (defcustom savehist-file (cond ;; Backward compatibility with previous versions of savehist. @@ -371,9 +377,12 @@ (error nil)))))) (defun savehist-minibuffer-hook () - ;; XEmacs sets minibuffer-history-variable to t to mean "no history - ;; is being recorded". - (unless (eq minibuffer-history-variable t) + (when (memq minibuffer-history-variable savehist-ignored-variables) + (debug nil minibuffer-history-variable)) + (unless (or (eq minibuffer-history-variable t) + ;; XEmacs sets minibuffer-history-variable to t to mean "no + ;; history is being recorded". + (memq minibuffer-history-variable savehist-ignored-variables)) (add-to-list 'savehist-minibuffer-history-variables minibuffer-history-variable)))