summaryrefslogtreecommitdiff
path: root/lisp/savehist.el
diff options
context:
space:
mode:
authorReiner Steib <Reiner.Steib@gmx.de>2006-04-03 17:32:28 +0000
committerReiner Steib <Reiner.Steib@gmx.de>2006-04-03 17:32:28 +0000
commitcd4160e614e9d456125ec0e3e8b30d5d807affef (patch)
tree5208d9270f0333633a4a97cb72f402b26b0200f4 /lisp/savehist.el
parentf7a8a96578e63406a1c5854d052edcce2f40b100 (diff)
downloademacs-cd4160e614e9d456125ec0e3e8b30d5d807affef.tar.gz
(savehist): Add :version.
(savehist-ignored-variables): New variable. (savehist-minibuffer-hook): Don't save variables listed in `savehist-ignored-variables'.
Diffstat (limited to 'lisp/savehist.el')
-rw-r--r--lisp/savehist.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/savehist.el b/lisp/savehist.el
index 8b8ca9c0f8a..56fc47a357b 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -56,6 +56,7 @@
(defgroup savehist nil
"Save minibuffer history."
+ :version "22.1"
:group 'minibuffer)
;;;###autoload
@@ -91,6 +92,11 @@ minibuffer histories, such as `compile-command' or `kill-ring'."
: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 @@ trimming of history lists to `history-length' items."
(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)))