]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (read-passwd-map): Don't use `defconst'.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 7 Oct 2012 19:48:02 +0000 (15:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 7 Oct 2012 19:48:02 +0000 (15:48 -0400)
(read-passwd): Remove a few more potential sources of leaks.

Fixes: debbugs:12597
lisp/ChangeLog
lisp/newcomment.el
lisp/subr.el

index d873fbbc65661e6ba4171590ca4acdb6ddc329c4..b0f896aa086d57bb32a361f8123abcf11f3f1c62 100644 (file)
@@ -1,7 +1,12 @@
+2012-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (read-passwd-map): Don't use `defconst' (bug#12597).
+       (read-passwd): Remove a few more potential sources of leaks.
+
 2012-10-07  Fabián Ezequiel Gallina  <fgallina@cuca>
 
        * progmodes/python.el (inferior-python-mode)
-       (python-shell-make-comint): Fixed initialization of local
+       (python-shell-make-comint): Fix initialization of local
        variables copied from parent buffer.
 
 2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>
index a7fedf20f5377639b1d47615828334288922d9c7..6d2eed7194874142e957ddaa30ee11957f36bfac 100644 (file)
@@ -327,8 +327,8 @@ terminated by the end of line (i.e. `comment-end' is empty)."
 ;;;###autoload
 (defun comment-normalize-vars (&optional noerror)
   "Check and setup the variables needed by other commenting functions.
-Functions autoloaded from newcomment.el, being entry points, should call
-this function before any other, so the rest of the code can assume that
+Any command calling functions from newcomment.el, being entry points, should
+call this function before any other, so the rest of the code can assume that
 the variables are properly set."
   (unless (and (not comment-start) noerror)
     (unless comment-start
index e438a860cbc587b21eb3c3a4a4e71226d59ab90d..ec2d16e652960fe2868b2d751aeb301e2a8d582c 100644 (file)
@@ -2143,7 +2143,9 @@ any other non-digit terminates the character code and is then used as input."))
       (setq first nil))
     code))
 
-(defconst read-passwd-map
+(defvar read-passwd-map
+  ;; BEWARE: `defconst' would purecopy it, breaking the sharing with
+  ;; minibuffer-local-map along the way!
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
     (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570
@@ -2186,7 +2188,9 @@ by doing (clear-string STRING)."
           (lambda ()
             (setq minibuf (current-buffer))
             ;; Turn off electricity.
-            (set (make-local-variable 'post-self-insert-hook) nil)
+            (setq-local post-self-insert-hook nil)
+            (setq-local buffer-undo-list t)
+            (setq-local select-active-regions nil)
             (use-local-map read-passwd-map)
             (add-hook 'after-change-functions hide-chars-fun nil 'local))
         (unwind-protect