diff options
| author | Stefan Monnier | 2012-10-07 15:48:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-07 15:48:02 -0400 |
| commit | 795b1482a9e314cda32d62ac2988f573d359366e (patch) | |
| tree | cf564c0e20916f00e333c34d507d92823797c329 /lisp | |
| parent | f27c99dc7ef8f19e7a378001d8b3d906ca907dae (diff) | |
| download | emacs-795b1482a9e314cda32d62ac2988f573d359366e.tar.gz emacs-795b1482a9e314cda32d62ac2988f573d359366e.zip | |
* lisp/subr.el (read-passwd-map): Don't use `defconst'.
(read-passwd): Remove a few more potential sources of leaks.
Fixes: debbugs:12597
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/newcomment.el | 4 | ||||
| -rw-r--r-- | lisp/subr.el | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d873fbbc656..b0f896aa086 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 2012-10-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * subr.el (read-passwd-map): Don't use `defconst' (bug#12597). | ||
| 4 | (read-passwd): Remove a few more potential sources of leaks. | ||
| 5 | |||
| 1 | 2012-10-07 Fabián Ezequiel Gallina <fgallina@cuca> | 6 | 2012-10-07 Fabián Ezequiel Gallina <fgallina@cuca> |
| 2 | 7 | ||
| 3 | * progmodes/python.el (inferior-python-mode) | 8 | * progmodes/python.el (inferior-python-mode) |
| 4 | (python-shell-make-comint): Fixed initialization of local | 9 | (python-shell-make-comint): Fix initialization of local |
| 5 | variables copied from parent buffer. | 10 | variables copied from parent buffer. |
| 6 | 11 | ||
| 7 | 2012-10-07 Jan Djärv <jan.h.d@swipnet.se> | 12 | 2012-10-07 Jan Djärv <jan.h.d@swipnet.se> |
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index a7fedf20f53..6d2eed71948 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -327,8 +327,8 @@ terminated by the end of line (i.e. `comment-end' is empty)." | |||
| 327 | ;;;###autoload | 327 | ;;;###autoload |
| 328 | (defun comment-normalize-vars (&optional noerror) | 328 | (defun comment-normalize-vars (&optional noerror) |
| 329 | "Check and setup the variables needed by other commenting functions. | 329 | "Check and setup the variables needed by other commenting functions. |
| 330 | Functions autoloaded from newcomment.el, being entry points, should call | 330 | Any command calling functions from newcomment.el, being entry points, should |
| 331 | this function before any other, so the rest of the code can assume that | 331 | call this function before any other, so the rest of the code can assume that |
| 332 | the variables are properly set." | 332 | the variables are properly set." |
| 333 | (unless (and (not comment-start) noerror) | 333 | (unless (and (not comment-start) noerror) |
| 334 | (unless comment-start | 334 | (unless comment-start |
diff --git a/lisp/subr.el b/lisp/subr.el index e438a860cbc..ec2d16e6529 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2143,7 +2143,9 @@ any other non-digit terminates the character code and is then used as input.")) | |||
| 2143 | (setq first nil)) | 2143 | (setq first nil)) |
| 2144 | code)) | 2144 | code)) |
| 2145 | 2145 | ||
| 2146 | (defconst read-passwd-map | 2146 | (defvar read-passwd-map |
| 2147 | ;; BEWARE: `defconst' would purecopy it, breaking the sharing with | ||
| 2148 | ;; minibuffer-local-map along the way! | ||
| 2147 | (let ((map (make-sparse-keymap))) | 2149 | (let ((map (make-sparse-keymap))) |
| 2148 | (set-keymap-parent map minibuffer-local-map) | 2150 | (set-keymap-parent map minibuffer-local-map) |
| 2149 | (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570 | 2151 | (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570 |
| @@ -2186,7 +2188,9 @@ by doing (clear-string STRING)." | |||
| 2186 | (lambda () | 2188 | (lambda () |
| 2187 | (setq minibuf (current-buffer)) | 2189 | (setq minibuf (current-buffer)) |
| 2188 | ;; Turn off electricity. | 2190 | ;; Turn off electricity. |
| 2189 | (set (make-local-variable 'post-self-insert-hook) nil) | 2191 | (setq-local post-self-insert-hook nil) |
| 2192 | (setq-local buffer-undo-list t) | ||
| 2193 | (setq-local select-active-regions nil) | ||
| 2190 | (use-local-map read-passwd-map) | 2194 | (use-local-map read-passwd-map) |
| 2191 | (add-hook 'after-change-functions hide-chars-fun nil 'local)) | 2195 | (add-hook 'after-change-functions hide-chars-fun nil 'local)) |
| 2192 | (unwind-protect | 2196 | (unwind-protect |