diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-08-09 11:25:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-08-09 11:25:35 +0000 |
commit | 949eb6b06e00fd6750cf00bd2acba9e3cf94444d (patch) | |
tree | 02826d830f059798ebbfc070d184e4837addc746 /lisp/comint.el | |
parent | e194bbb5c7fc94a74f98b4a1fdd76c0006b7f908 (diff) | |
download | emacs-949eb6b06e00fd6750cf00bd2acba9e3cf94444d.tar.gz |
(send-invisible): Identify buffer, if not selected.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 3f77ea99050..589aba9321a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1935,15 +1935,21 @@ The string is sent using `comint-input-sender'. Security bug: your string can still be temporarily recovered with \\[view-lossage]; `clear-this-command-keys' can fix that." (interactive "P") ; Defeat snooping via C-x ESC ESC - (let ((proc (get-buffer-process (current-buffer)))) + (let ((proc (get-buffer-process (current-buffer))) + (prefix + (if (eq (window-buffer (selected-window)) (current-buffer)) + "" + (format "(In buffer %s) " + (current-buffer))))) (if proc - (let ((str (read-passwd (or prompt "Non-echoed text: ")))) + (let ((str (read-passwd (concat prefix + (or prompt "Non-echoed text: "))))) (if (stringp str) (progn (comint-snapshot-last-prompt) (funcall comint-input-sender proc str)) (message "Warning: text will be echoed"))) - (error "Current buffer has no process")))) + (error "Buffer %s has no process" (current-buffer))))) (defun comint-watch-for-password-prompt (string) "Prompt in the minibuffer for password and send without echoing. |