diff options
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index a0c56bf9752..9accb9d36c5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2016,7 +2016,7 @@ If optional CONFIRM is non-nil, read the password twice to make sure. Optional DEFAULT is a default password to use instead of empty input. This function echoes `.' for each character that the user types. -Note that in batch mode, the input is not hidden! +You could let-bind `read-hide-char' to another hiding character, though. Once the caller uses the password, it can erase the password by doing (clear-string STRING)." @@ -2041,7 +2041,7 @@ by doing (clear-string STRING)." beg))) (dotimes (i (- end beg)) (put-text-property (+ i beg) (+ 1 i beg) - 'display (string ?.))))) + 'display (string (or read-hide-char ?.)))))) minibuf) (minibuffer-with-setup-hook (lambda () @@ -2055,12 +2055,9 @@ by doing (clear-string STRING)." (setq-local show-paren-mode nil) ;bug#16091. (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect - (let ((enable-recursive-minibuffers t)) - (read-string - (if noninteractive - (format "%s[INPUT WILL NOT BE HIDDEN!] " prompt) ; bug#17839 - prompt) - nil t default)) ; t = "no history" + (let ((enable-recursive-minibuffers t) + (read-hide-char (or read-hide-char ?.))) + (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 |
