2006-04-03 Reiner Steib <Reiner.Steib@gmx.de>
+ * 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.
(defgroup savehist nil
"Save minibuffer history."
+ :version "22.1"
:group 'minibuffer)
;;;###autoload
: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.
(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)))