From: Glenn Morris Date: Fri, 19 Feb 2021 16:36:56 +0000 (-0800) Subject: Merge from origin/emacs-27 X-Git-Tag: emacs-28.0.90~3648 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d50050af7f6cde7283d29cd79526bf1cd4a73ae;p=emacs.git Merge from origin/emacs-27 8e8b46ef81 (origin/emacs-27) More accurate documentation of the "r" i... dcb2015a5b Mention the GNU Kind Communications Guidelines in the FAQ 9882e63eea ; * CONTRIBUTE: Another wording change regarding tiny chan... 850f18ef23 Allow newlines in password prompts again in comint c977370dd7 Avoid point movement when visiting image files da64a257a4 ; * CONTRIBUTE: Yet another clarification of significant c... d03f2a6ee9 Avoid assertion violation in callproc.c dcc00bbb19 ; * CONTRIBUTE: Clarify the "15-lines" rule a bit more. --- 1d50050af7f6cde7283d29cd79526bf1cd4a73ae diff --cc lisp/comint.el index 57df6bfb19f,24ef0f239b2..ea69c3b1f11 --- a/lisp/comint.el +++ b/lisp/comint.el @@@ -2428,10 -2402,11 +2428,12 @@@ carriage returns (\\r) in STRING This function could be in the list `comint-output-filter-functions'." (when (let ((case-fold-search t)) - (string-match comint-password-prompt-regexp string)) + (string-match comint-password-prompt-regexp + (replace-regexp-in-string "\r" "" string))) (when (string-match "^[ \n\r\t\v\f\b\a]+" string) (setq string (replace-match "" t t string))) + (when (string-match "\n+\\'" string) + (setq string (replace-match "" t t string))) (let ((comint--prompt-recursion-depth (1+ comint--prompt-recursion-depth))) (if (> comint--prompt-recursion-depth 10) (message "Password prompt recursion too deep")