unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* password prompt in comint.el
@ 2002-04-17  9:49 Francesco Potorti`
  0 siblings, 0 replies; only message in thread
From: Francesco Potorti` @ 2002-04-17  9:49 UTC (permalink / raw)


Sometimes prompts for passwords begin with whitespace, which is annoying
and ugly when comint displays them in the minibuffer.  This happens for
example with GPG.

The following patch addresses this problem.  If it is okay, I can
install it.

--- comint.el.~1.269.~	Wed Apr 17 10:01:58 2002
+++ comint.el	Wed Apr 17 11:45:29 2002
@@ -1984,6 +1984,8 @@ process if STRING contains a password pr
 
 This function could be in the list `comint-output-filter-functions'."
   (when (string-match comint-password-prompt-regexp string)
+    (when (string-match "^[ \n\r\t\v\f\b\a]+" string)
+      (setq string (replace-match "" t t string)))
     (let ((pw (comint-read-noecho string t)))
       (send-invisible pw))))
 \f

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-17  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-17  9:49 password prompt in comint.el Francesco Potorti`

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).