diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-07 15:48:02 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-07 15:48:02 -0400 |
| commit | 795b1482a9e314cda32d62ac2988f573d359366e (patch) | |
| tree | cf564c0e20916f00e333c34d507d92823797c329 /lisp/subr.el | |
| parent | f27c99dc7ef8f19e7a378001d8b3d906ca907dae (diff) | |
| download | emacs-795b1482a9e314cda32d62ac2988f573d359366e.tar.gz | |
* 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/subr.el')
| -rw-r--r-- | lisp/subr.el | 8 |
1 files changed, 6 insertions, 2 deletions
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.")) (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 |
