emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108685: * lisp/subr.el (read-pass


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108685: * lisp/subr.el (read-passwd): Don't use a history at all.
Date: Fri, 02 Nov 2012 02:23:54 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108685
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-22 13:30:25 -0400
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/savehist.el
  lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-22 14:12:42 +0000
+++ b/lisp/ChangeLog    2012-06-22 17:30:25 +0000
@@ -1,3 +1,9 @@
+2012-06-22  Stefan Monnier  <address@hidden>
+
+       * 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  <address@hidden>
 
        * files.el (toggle-read-only): Display a message telling whether

=== modified file 'lisp/savehist.el'
--- a/lisp/savehist.el  2012-03-09 18:09:46 +0000
+++ b/lisp/savehist.el  2012-06-22 17:30:25 +0000
@@ -278,6 +278,13 @@
          (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

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2012-06-22 13:42:38 +0000
+++ b/lisp/subr.el      2012-06-22 17:30:25 +0000
@@ -2171,11 +2171,7 @@
             (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]