diff options
Diffstat (limited to 'lisp/comint.el')
| -rw-r--r-- | lisp/comint.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index ab0d41d6735..0977663808a 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; comint.el --- general command interpreter in a window stuff | 1 | ;;; comint.el --- general command interpreter in a window stuff |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 7 | ;; Simon Marshall <simon@gnu.org> | 7 | ;; Simon Marshall <simon@gnu.org> |
| @@ -1935,15 +1935,21 @@ The string is sent using `comint-input-sender'. | |||
| 1935 | Security bug: your string can still be temporarily recovered with | 1935 | Security bug: your string can still be temporarily recovered with |
| 1936 | \\[view-lossage]; `clear-this-command-keys' can fix that." | 1936 | \\[view-lossage]; `clear-this-command-keys' can fix that." |
| 1937 | (interactive "P") ; Defeat snooping via C-x ESC ESC | 1937 | (interactive "P") ; Defeat snooping via C-x ESC ESC |
| 1938 | (let ((proc (get-buffer-process (current-buffer)))) | 1938 | (let ((proc (get-buffer-process (current-buffer))) |
| 1939 | (prefix | ||
| 1940 | (if (eq (window-buffer (selected-window)) (current-buffer)) | ||
| 1941 | "" | ||
| 1942 | (format "(In buffer %s) " | ||
| 1943 | (current-buffer))))) | ||
| 1939 | (if proc | 1944 | (if proc |
| 1940 | (let ((str (read-passwd (or prompt "Non-echoed text: ")))) | 1945 | (let ((str (read-passwd (concat prefix |
| 1946 | (or prompt "Non-echoed text: "))))) | ||
| 1941 | (if (stringp str) | 1947 | (if (stringp str) |
| 1942 | (progn | 1948 | (progn |
| 1943 | (comint-snapshot-last-prompt) | 1949 | (comint-snapshot-last-prompt) |
| 1944 | (funcall comint-input-sender proc str)) | 1950 | (funcall comint-input-sender proc str)) |
| 1945 | (message "Warning: text will be echoed"))) | 1951 | (message "Warning: text will be echoed"))) |
| 1946 | (error "Current buffer has no process")))) | 1952 | (error "Buffer %s has no process" (current-buffer))))) |
| 1947 | 1953 | ||
| 1948 | (defun comint-watch-for-password-prompt (string) | 1954 | (defun comint-watch-for-password-prompt (string) |
| 1949 | "Prompt in the minibuffer for password and send without echoing. | 1955 | "Prompt in the minibuffer for password and send without echoing. |
| @@ -2585,6 +2591,7 @@ Note that this applies to `comint-dynamic-complete-filename' only." | |||
| 2585 | :type '(repeat (string :tag "Suffix")) | 2591 | :type '(repeat (string :tag "Suffix")) |
| 2586 | :group 'comint-completion) | 2592 | :group 'comint-completion) |
| 2587 | 2593 | ||
| 2594 | ;;;###autoload | ||
| 2588 | (defvar comint-file-name-prefix "" | 2595 | (defvar comint-file-name-prefix "" |
| 2589 | "Prefix prepended to absolute file names taken from process input. | 2596 | "Prefix prepended to absolute file names taken from process input. |
| 2590 | This is used by Comint's and shell's completion functions, and by shell's | 2597 | This is used by Comint's and shell's completion functions, and by shell's |