[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110380: * subr.el (read-passwd): All
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110380: * subr.el (read-passwd): Allow C-u to erase entry. |
Date: |
Fri, 05 Oct 2012 19:47:26 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110380
fixes bug: http://debbugs.gnu.org/12570
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2012-10-05 19:47:26 -0700
message:
* subr.el (read-passwd): Allow C-u to erase entry.
modified:
lisp/ChangeLog
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-10-06 02:20:36 +0000
+++ b/lisp/ChangeLog 2012-10-06 02:47:26 +0000
@@ -1,3 +1,7 @@
+2012-10-06 Glenn Morris <address@hidden>
+
+ * subr.el (read-passwd): Allow C-u to erase entry. (Bug#12570)
+
2012-10-06 Julian Scheid <address@hidden> (tiny change)
* color.el (color-hsl-to-rgb): Fix incorrect results for
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2012-10-05 05:57:24 +0000
+++ b/lisp/subr.el 2012-10-06 02:47:26 +0000
@@ -2182,8 +2182,16 @@
(set (make-local-variable 'post-self-insert-hook) nil)
(add-hook 'after-change-functions hide-chars-fun nil 'local))
(unwind-protect
- (let ((enable-recursive-minibuffers t))
- (read-string prompt nil t default)) ; t = "no history"
+ (let ((enable-recursive-minibuffers t)
+ (map minibuffer-local-map)
+ result)
+ (define-key map "\C-u" ; bug#12570
+ (lambda () (interactive) (delete-minibuffer-contents)))
+ (setq result
+ ;; t = no history.
+ (read-from-minibuffer prompt nil map nil t default))
+ (if (and (equal "" result) default) default
+ result))
(when (buffer-live-p minibuf)
(with-current-buffer minibuf
;; Not sure why but it seems that there might be cases where the
- [Emacs-diffs] /srv/bzr/emacs/trunk r110380: * subr.el (read-passwd): Allow C-u to erase entry.,
Glenn Morris <=