[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8bc552f 3/5: Merge from origin/emacs-27

From: Paul Eggert
Subject: master 8bc552f 3/5: Merge from origin/emacs-27
Date: Fri, 1 Jan 2021 04:44:16 -0500 (EST)

branch: master
commit 8bc552ffa53936f9fa1517c30d5057be80d09ca4
Merge: ba05d00 74a77ef
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Merge from origin/emacs-27
    74a77ef299 Improve documentation of 'network-lookup-address-info'
    c6d5555646 Display messages sent using ERC's /say
    c156723769 Fix Rmail summary display when From: header is malformed
 doc/lispref/processes.texi | 3 ++-
 lisp/erc/erc.el            | 4 +++-
 lisp/mail/rmailsum.el      | 5 +++++
 src/process.c              | 5 +++--
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 0f713bc..535cebe 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -3111,7 +3111,8 @@ signaled. Call @code{puny-encode-domain} on @var{name}
 first if you wish to lookup internationalized hostnames.
 If successful it returns a list of Lisp representations of network
-addresses, otherwise it returns @code{nil}.
+addresses, otherwise it returns @code{nil}.  In the latter case, it
+also displays the error message hopefully explaining what went wrong.
 By default both IPv4 and IPv6 lookups are attempted.  The optional
 argument @var{family} controls this behavior, specifying the symbol
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 73ca53f..1044acf 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2861,7 +2861,9 @@ need this when pasting multiple lines of text."
   (if (string-match "^\\s-*$" line)
     (string-match "^ ?\\(.*\\)" line)
-    (erc-process-input-line (match-string 1 line) nil t)))
+    (let ((msg (match-string 1 line)))
+      (erc-display-msg msg)
+      (erc-process-input-line msg nil t))))
 (put 'erc-cmd-SAY 'do-not-parse-args t)
 (defun erc-cmd-SET (line)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index f09cd0e..60b67ed 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -786,6 +786,11 @@ the message being processed."
                 ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= 
                 ;; <stepnem@gmail.com>
                 (setq from (rfc2047-decode-string from))
+                 ;; We cannot tolerate any leftover newlines in From,
+                 ;; as that disrupts the rmail-summary display.
+                 ;; Newlines can be left in From if it was malformed,
+                 ;; e.g. had unbalanced quotes.
+                 (setq from (replace-regexp-in-string "\n+" " " from))
                 (setq len (length from))
                 (setq mch (string-match "[@%]" from))
                 (format "%25s"
diff --git a/src/process.c b/src/process.c
index 3159141..eaa7fa1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4587,12 +4587,13 @@ network_lookup_address_info_1 (Lisp_Object host, const 
char *service,
 DEFUN ("network-lookup-address-info", Fnetwork_lookup_address_info,
        Snetwork_lookup_address_info, 1, 2, 0,
-       doc: /* Look up ip address info of NAME.
+       doc: /* Look up Internet Protocol (IP) address info of NAME.
 Optional parameter FAMILY controls whether to look up IPv4 or IPv6
 addresses.  The default of nil means both, symbol `ipv4' means IPv4
 only, symbol `ipv6' means IPv6 only.  Returns a list of addresses, or
 nil if none were found.  Each address is a vector of integers, as per
-the description of ADDRESS in `make-network-process'.  */)
+the description of ADDRESS in `make-network-process'.  In case of
+error displays the error message.  */)
      (Lisp_Object name, Lisp_Object family)
   Lisp_Object addresses = Qnil;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]