diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-22 13:30:25 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-22 13:30:25 -0400 |
commit | ac77b21adbddfd143449ef00be15df52f2ede924 (patch) | |
tree | 489dce1343c57e97873abfbb9692239474c6bf38 | |
parent | 057306483c1c7a9216276c51946406c422d60b70 (diff) | |
download | emacs-ac77b21adbddfd143449ef00be15df52f2ede924.tar.gz emacs-ac77b21adbddfd143449ef00be15df52f2ede924.tar.bz2 emacs-ac77b21adbddfd143449ef00be15df52f2ede924.zip |
* lisp/subr.el (read-passwd): Don't use a history at all.
* lisp/savehist.el (savehist-save): Remove password saved accidentally
because of the above bug.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/savehist.el | 7 | ||||
-rw-r--r-- | lisp/subr.el | 6 |
3 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4ec842eedc..5c8bcaecfa0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-06-22 Stefan Monnier <monnier@iro.umontreal.ca> + + * subr.el (read-passwd): Don't use a history at all. + * savehist.el (savehist-save): Remove password saved accidentally + because of the above bug. + 2012-06-22 Bastien Guerry <bzg@gnu.org> * files.el (toggle-read-only): Display a message telling whether diff --git a/lisp/savehist.el b/lisp/savehist.el index a65906a1676..6310190b4fe 100644 --- a/lisp/savehist.el +++ b/lisp/savehist.el @@ -278,6 +278,13 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, (print-level nil) (print-readably t) (print-quoted t)) + ;; During the 24.2 development, read-passwd had a bug which resulted in + ;; the passwords being saved by savehist. Trim them, retroactively. + ;; This code can be removed after the 24.2 release. + (dolist (sym savehist-minibuffer-history-variables) + (if (and (symbolp sym) (equal (symbol-name sym) "forget-history")) + (setq savehist-minibuffer-history-variables + (delq sym savehist-minibuffer-history-variables)))) ;; Save the minibuffer histories, along with the value of ;; savehist-minibuffer-history-variables itself. (when savehist-save-minibuffer-history diff --git a/lisp/subr.el b/lisp/subr.el index 5deaf71e78d..7e56fe7c3ee 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2171,11 +2171,7 @@ by doing (clear-string STRING)." (set (make-local-variable 'post-self-insert-hook) nil) (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect - (read-string prompt nil - (let ((sym (make-symbol "forget-history"))) - (set sym nil) - sym) - default) + (read-string prompt nil t default) ; t = "no history" (when (buffer-live-p minibuf) (with-current-buffer minibuf ;; Not sure why but it seems that there might be cases where the |