From: Reiner Steib Date: Mon, 3 Apr 2006 17:32:28 +0000 (+0000) Subject: (savehist): Add :version. X-Git-Tag: emacs-pretest-22.0.90~3341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd4160e614e9d456125ec0e3e8b30d5d807affef;p=emacs.git (savehist): Add :version. (savehist-ignored-variables): New variable. (savehist-minibuffer-hook): Don't save variables listed in `savehist-ignored-variables'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35e2ba3525c..1458541bbbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2006-04-03 Reiner Steib + * savehist.el (savehist): Add :version. + (savehist-ignored-variables): New variable. + (savehist-minibuffer-hook): Don't save variables listed in + `savehist-ignored-variables'. + * dired.el (dired-dnd-protocol-alist): Mention that change does only apply to new buffers in doc string. 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)))