]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (read-passwd): Don't use a history at all.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Jun 2012 17:30:25 +0000 (13:30 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 22 Jun 2012 17:30:25 +0000 (13:30 -0400)
* lisp/savehist.el (savehist-save): Remove password saved accidentally
because of the above bug.

lisp/ChangeLog
lisp/savehist.el
lisp/subr.el

index c4ec842eedc3dff49c342a3dfbf3e5f2533a281d..5c8bcaecfa0b4849210a9d13cf765d907f258f26 100644 (file)
@@ -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
index a65906a16765bf811886caaaf4b4bd13e6f79425..6310190b4fe8bb834a4331c90d4dcf8d5b1c3233 100644 (file)
@@ -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
index 5deaf71e78d5a84576a3f601269fa4b3b2b71d2c..7e56fe7c3ee606046f33ba6fea330e4a89d064cd 100644 (file)
@@ -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