Commit 83a9133e authored by Glenn Morris's avatar Glenn Morris

Merge from origin/emacs-26

ff9c9620 ; * lisp/ldefs-boot.el: Update.
b4a251c5 * ; ChangeLog.3 update
d3104e3c * etc/AUTHORS: Update.
a19bfb7a Remove .art from the default list of ImageMagick extensions
6985caa8 Fix input after setting x-wait-for-event-timeout nil
715388ac Fix two warnings in eshell.texi
d49cdd92 * lisp/minibuffer.el (completion-table-dynamic): Improve docs...
5dc4e51e * lisp/emacs-lisp/debug.el (debug-on-variable-change): Doc fi...
76ef8059 Fix a typo in ELisp manual
b5e66f46 Update citations of Internet RFCs
57ece2a0 Fix handling of manpage references divided by hyphenation
7ad0cd6f * doc/misc/eshell.texi: Fix some @ref's.
12b79404 Fix a typo in lispref/syntax.texi

# Conflicts:
#	lisp/gnus/nnrss.el
#	lisp/mail/ietf-drums.el
parents ae77728d ff9c9620
This diff is collapsed.
......@@ -829,8 +829,8 @@ command with its arguments.
Richard Mlynarik wrote @file{cl-indent.el}, a package for indenting
Common Lisp code; @file{ebuff-menu.el}, an electric browser for
buffer listings; @file{ehelp.el}, bindings for browsing help screens;
and @file{rfc822.el}, a parser for E-mail addresses in the RFC-822 format,
used in mail messages and news articles.
and @file{rfc822.el}, a parser for E-mail addresses in the format
used in mail messages and news articles (Internet RFC 822 and its successors).
@item
Gerd Möllmann was the Emacs maintainer from the beginning of Emacs 21
......
......@@ -473,7 +473,7 @@ Set the property @var{prop} of abbrev table @var{table} to value @var{val}.
@defun abbrev-table-get table prop
Return the property @var{prop} of abbrev table @var{table}, or @code{nil}
if the abbrev has no such property.
if @var{table} has no such property.
@end defun
The following properties have special meaning:
......
......@@ -1562,7 +1562,7 @@ following form:
The format of this list is the same as what @code{decode-time} accepts
(@pxref{Time Conversion}), and is described in more detail there. Any
element that cannot be determined from the input will be set to
@code{nil}. The argument @var{string} should resemble an RFC 2822 or
@code{nil}. The argument @var{string} should resemble an RFC 822 (or later) or
ISO 8601 string, like ``Fri, 25 Mar 2016 16:24:56 +0100'' or
``1998-09-12T12:21:54-0200'', but this function will attempt to parse
less well-formed time strings as well.
......
......@@ -1041,8 +1041,8 @@ This function returns the syntax code for the raw syntax descriptor
@var{syntax-code} component, masks off the high 16 bits which record
the syntax flags, and returns the resulting integer.
If @var{syntax} is @code{nil}, the return value is returns @code{nil}.
This is so that the expression
If @var{syntax} is @code{nil}, the return value is @code{nil}. This
is so that the expression
@example
(syntax-class (syntax-after pos))
......
......@@ -698,13 +698,15 @@ Translation}.
A description of the part (@code{Content-Description}).
@item creation-date
RFC822 date when the part was created (@code{Content-Disposition}).
Date when the part was created (@code{Content-Disposition}).
This uses the format of RFC 822 or its successors.
@item modification-date
RFC822 date when the part was modified (@code{Content-Disposition}).
RFC 822 (or later) date when the part was modified
(@code{Content-Disposition}).
@item read-date
RFC822 date when the part was read (@code{Content-Disposition}).
RFC 822 (or later) date when the part was read (@code{Content-Disposition}).
@item recipients
Who to encrypt/sign the part to. This field is used to override any
......@@ -754,7 +756,7 @@ be obtained. Values include @samp{ftp}, @samp{anon-ftp}, @samp{tftp},
@samp{localfile}, and @samp{mailserver}. (@code{Content-Type}.)
@item expiration
The RFC822 date after which the file may no longer be fetched.
RFC 822 (or later) date after which the file may no longer be fetched.
(@code{Content-Type}.)
@item size
......@@ -1301,7 +1303,7 @@ on. High-level functionality is dealt with in the first chapter
@menu
* rfc2045:: Encoding @code{Content-Type} headers.
* rfc2231:: Parsing @code{Content-Type} headers.
* ietf-drums:: Handling mail headers defined by RFC822bis.
* ietf-drums:: Handling mail headers defined by RFC 2822.
* rfc2047:: En/decoding encoded words in headers.
* time-date:: Functions for parsing dates and manipulating time.
* qp:: Quoted-Printable en/decoding.
......@@ -1385,8 +1387,8 @@ Encode a parameter in headers likes @code{Content-Type} and
@node ietf-drums
@section ietf-drums
@dfn{drums} is an IETF working group that is working on the replacement
for RFC822.
@dfn{drums} was an IETF working group that worked on Internet RFC 2822,
the first successor to RFC 822 and a predecessor of the current email standard.
The functions provided by this library include:
......@@ -1597,7 +1599,7 @@ The five data representations used are the following:
@table @var
@item date
An RFC822 (or similar) date string. For instance: @code{"Sat Sep 12
An RFC 822 (or similar) date string. For instance: @code{"Sat Sep 12
12:21:54 1998 +0200"}.
@item time
......@@ -1889,55 +1891,55 @@ in @file{/etc/mailcap} will ``win'' over an @samp{image/*} setting in
The Emacs @acronym{MIME} library implements handling of various elements
according to a (somewhat) large number of RFCs, drafts and standards
documents. This chapter lists the relevant ones. They can all be
fetched from @uref{http://quimby.gnus.org/notes/}.
fetched from @uref{https://www.rfc-editor.org}.
@table @dfn
@item RFC822
@itemx STD11
Standard for the Format of ARPA Internet Text Messages.
@item RFC 5322
Internet Message Format
@item RFC1036
Standard for Interchange of USENET Messages
@item RFC 5536
Netnews Article Format
@item RFC2045
@item RFC 2045
Format of Internet Message Bodies
@item RFC2046
@item RFC 2046
Media Types
@item RFC2047
@item RFC 2047
Message Header Extensions for Non-@acronym{ASCII} Text
@item RFC2048
Registration Procedures
@item RFC 6838
Media Type Specifications and Registration Procedures
@item RFC 4289
Registration Procedures (obsoleting RFC 2048)
@item RFC2049
@item RFC 2049
Conformance Criteria and Examples
@item RFC2231
@item RFC 2231
@acronym{MIME} Parameter Value and Encoded Word Extensions: Character Sets,
Languages, and Continuations
@item RFC1843
@item RFC 1843
HZ---A Data Format for Exchanging Files of Arbitrarily Mixed Chinese and
@acronym{ASCII} characters
@item draft-ietf-drums-msg-fmt-05.txt
Draft for the successor of RFC822
@item RFC2112
@item RFC 2387
The @acronym{MIME} Multipart/Related Content-type
@item RFC1892
The Multipart/Report Content Type for the Reporting of Mail System
@item RFC 6522
@itemx STD 73
The Multipart/Report Media Type for the Reporting of Mail System
Administrative Messages
@item RFC2183
@item RFC 2183
Communicating Presentation Information in Internet Messages: The
Content-Disposition Header Field
@item RFC2646
Documentation of the text/plain format parameter for flowed text.
@item RFC 3676
The Text/Plain Format and DelSp Parameters
@end table
......
......@@ -213,8 +213,8 @@ available in the Emacs Lisp library. It does this by transforming the
input line into a callable Lisp form.@footnote{To see the Lisp form that will be invoked, type: @samp{eshell-parse-command "echo hello"}}
The command can be either an Elisp function or an external command.
Eshell looks first for an @ref{Aliases, alias} with the same name as the
command, then a @ref{Built-ins, built-in command} or a function with the
Eshell looks first for an alias (@pxref{Aliases}) with the same name as the
command, then a built-in (@pxref{Built-ins}) or a function with the
same name; if there is no match, it then tries to execute it as an
external command.
......@@ -253,7 +253,7 @@ eshell/ls is a compiled Lisp function in `em-ls.el'
@end example
If you want to discard a given built-in command, you could declare an
alias, @ref{Aliases}. Example:
alias (@pxref{Aliases}). Example:
@example
~ $ which sudo
......@@ -418,7 +418,7 @@ Lisp functions, based on successful completion).
@end table
@ref{Aliases} for the built-in variables @samp{$*}, @samp{$1},
@xref{Aliases}, for the built-in variables @samp{$*}, @samp{$1},
@samp{$2}, @dots{}, in alias definitions.
@node Variables
......@@ -629,8 +629,8 @@ to @code{"hello"}.
Eshell's globbing syntax is very similar to that of Zsh. Users coming
from Bash can still use Bash-style globbing, as there are no
incompatibilities. Most globbing is pattern-based expansion, but there
is also predicate-based expansion. See
@ref{Filename Generation, , , zsh, The Z Shell Manual}
is also predicate-based expansion. @xref{Filename Generation, , ,
zsh, The Z Shell Manual},
for full syntax. To customize the syntax and behavior of globbing in
Eshell see the Customize@footnote{@xref{Easy Customization, , , emacs,
The GNU Emacs Manual}.}
......
......@@ -141,7 +141,7 @@ There are no Gnus dependencies in this file.
There are no Gnus dependencies in this file.
@item ietf-drums.el
Functions for parsing RFC822bis headers.
Functions for parsing RFC 2822 headers.
@c As of 2005-10-21...
There are no Gnus dependencies in this file.
......
......@@ -9679,7 +9679,7 @@ Each article is divided into two parts---the head and the body. The
body can be divided into a signature part and a text part. The variable
that says what is to be considered a signature is
@code{gnus-signature-separator}. This is normally the standard
@samp{^-- $} as mandated by son-of-RFC 1036. However, many people use
@samp{^-- $} as mandated by RFC 5536. However, many people use
non-standard signature separators, so this variable can also be a list
of regular expressions to be tested, one by one. (Searches are done
from the end of the body towards the beginning.) One likely value is:
......@@ -15991,8 +15991,9 @@ Mailers and list servers are notorious for doing all sorts of really,
really stupid things with mail. ``Hey, RFC 822 doesn't explicitly
prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
end of all lines passing through our server, so let's do that!!!!1!''
Yes, but RFC 822 wasn't designed to be read by morons. Things that were
considered to be self-evident were not discussed. So. Here we are.
Yes, but RFC 822 and its successors weren't designed to be read by
morons. Things that were considered to be self-evident were not
discussed. So. Here we are.
Case in point: The German version of Microsoft Exchange adds @samp{AW:
} to the subjects of replies instead of @samp{Re: }. I could pretend to
......@@ -17374,7 +17375,7 @@ Announcement messages from LANL Gov Announce.
@cindex forwarded messages
@item rfc822-forward
A message forwarded according to RFC822.
A message forwarded according to RFC 822 or its successors.
@item outlook
The Outlook mail box.
......@@ -26721,18 +26722,20 @@ with, of course.
@table @strong
@item RFC (2)822
@item RFC 822
@cindex RFC 822
@cindex RFC 2822
There are no known breaches of this standard.
@cindex RFC 5322
There are no known breaches of this standard or its successors
(currently RFCs 2822 and 5322).
@item RFC 1036
@cindex RFC 1036
There are no known breaches of this standard, either.
There are no known breaches of this (now-obsolete) standard, either.
@item Son-of-RFC 1036
@cindex Son-of-RFC 1036
We do have some breaches to this one.
@item RFC 5536
@cindex RFC 5536
We do have some breaches of this standard, the successor of RFC 1036.
@table @emph
......@@ -26747,10 +26750,9 @@ it wasn't for the @code{X-Newsreader} header.
@item USEFOR
@cindex USEFOR
USEFOR is an IETF working group writing a successor to RFC 1036, based
on Son-of-RFC 1036. They have produced a number of drafts proposing
various changes to the format of news articles. The Gnus towers will
look into implementing the changes when the draft is accepted as an RFC.
USEFOR was an IETF working group that produced Internet RFCs 5536 and 5537.
The Gnus towers will look into implementing the changes embodied by these
standards.
@item MIME---RFC 2045--2049 etc
@cindex @acronym{MIME}
......@@ -29529,7 +29531,8 @@ header = <text> eol
@end example
@cindex BNF
(The version of BNF used here is the one used in RFC822.)
(The version of extended BNF used here is ABNF, the one used in Internet RFCs.
See RFC 5234.)
If the return value is @code{nov}, the data buffer should contain
@dfn{network overview database} lines. These are basically fields
......@@ -30327,7 +30330,7 @@ almost suspect that the author looked at the @acronym{NOV} specification and
just shamelessly @emph{stole} the entire thing, and one would be right.
@dfn{Header} is a severely overloaded term. ``Header'' is used in
RFC 1036 to talk about lines in the head of an article (e.g.,
RFC 5536 to talk about lines in the head of an article (e.g.,
@code{From}). It is used by many people as a synonym for
``head''---``the header and the body''. (That should be avoided, in my
opinion.) And Gnus uses a format internally that it calls ``header'',
......@@ -851,7 +851,8 @@ scanned. Info key-value pairs are created for each header found. Also,
such useful information as the author's name and email address are
extracted. If the variable @code{sc-mail-warn-if-non-rfc822-p} is
non-@code{nil}, then Supercite will warn you if it finds a mail header
that does not conform to RFC822. This is rare and indicates a problem
that does not conform to RFC 822 (or later).
This is rare and indicates a problem
either with your MUA or the original author's MUA, or some MTA (mail
transport agent) along the way.
......
This diff is collapsed.
......@@ -147,7 +147,7 @@ letters, digits, plus or minus signs or colons."
;;;###autoload
(defun parse-time-string (string)
"Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ).
STRING should be on something resembling an RFC2822 string, a la
STRING should be something resembling an RFC 822 (or later) date-time, e.g.,
\"Fri, 25 Mar 2016 16:24:56 +0100\", but this function is
somewhat liberal in what format it accepts, and will attempt to
return a \"likely\" value even for somewhat malformed strings.
......
......@@ -744,7 +744,7 @@ This function is called when SYMBOL's value is modified."
When called interactively, prompt for VARIABLE in the minibuffer.
This works by calling `add-variable-watch' on VARIABLE. If you
This works by calling `add-variable-watcher' on VARIABLE. If you
quit from the debugger, this will abort the change (unless the
change is caused by the termination of a let-binding).
......
......@@ -92,7 +92,7 @@ The first regexp group should match the Supercite attribution."
;; -----Original Message-----
;; From: ...
;; To: ...
;; Sent: ... [date, in non-RFC-2822 format]
;; Sent: ... [date, in non-RFC-822-or-later format]
;; Subject: ...
;;
;; Cited message, with no prefixes
......
......@@ -139,7 +139,7 @@ This is a compatibility function for different Emacsen."
(defun gnus-extract-address-components (from)
"Extract address components from a From header.
Given an RFC-822 address FROM, extract full name and canonical address.
Given an RFC-822 (or later) address FROM, extract name and address.
Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). Much more simple
solution than `mail-header-parse-address', which works much better, but
is slower."
......
......@@ -1285,10 +1285,9 @@ called and its result is inserted."
(goto-char (point-min))
(let ((case-fold-search nil))
(re-search-forward "^OR\\>" nil t))))
;; According to RFC822, "The field-name must be composed of printable
;; ASCII characters (i. e., characters that have decimal values between
;; 33 and 126, except colon)", i. e., any chars except ctl chars,
;; space, or colon.
;; According to RFC 822 and its successors, the field name must
;; consist of printable US-ASCII characters other than colon,
;; i.e., decimal 33-56 and 59-126.
'(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:"))
"Set this non-nil if the system's mailer runs the header and body together.
\(This problem exists on Sunos 4 when sendmail is run in remote mode.)
......@@ -1791,8 +1790,8 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
(concat
"From "
;; Many things can happen to an RFC 822 mailbox before it is put into
;; a `From' line. The leading phrase can be stripped, e.g.
;; Many things can happen to an RFC 822 (or later) mailbox before it is
;; put into a `From' line. The leading phrase can be stripped, e.g.
;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g.
;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF
;; can be removed, e.g.
......@@ -5732,7 +5731,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
(insert fullname)
(goto-char (point-min))
;; Look for a character that cannot appear unquoted
;; according to RFC 822.
;; according to RFC 822 (or later).
(when (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" nil 1)
;; Quote fullname, escaping specials.
(goto-char (point-min))
......@@ -5746,8 +5745,7 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'."
(let ((fullname-start (point)))
(insert fullname)
(goto-char fullname-start)
;; RFC 822 says \ and nonmatching parentheses
;; must be escaped in comments.
;; \ and nonmatching parentheses must be escaped in comments.
;; Escape every instance of ()\ ...
(while (re-search-forward "[()\\]" nil 1)
(replace-match "\\\\\\&" t))
......
......@@ -35,7 +35,7 @@
;; BS, vertical TAB, form feed, and ^_
;;
;; Note that CR is *not* included, as that would allow a non-paired CR
;; in the body contrary to RFC 2822:
;; in the body contrary to RFC 822 (or later):
;;
;; - CR and LF MUST only occur together as CRLF; they MUST NOT
;; appear independently in the body.
......
......@@ -446,16 +446,16 @@ nnrss: %s: Not valid XML %s and libxml-parse-html-region doesn't work %s"
(autoload 'timezone-parse-date "timezone")
(defun nnrss-normalize-date (date)
"Return a date string of DATE in the RFC822 style.
"Return a date string of DATE in the style of RFC 822 and its successors.
This function handles the ISO 8601 date format described in
URL `http://www.w3.org/TR/NOTE-datetime', and also the RFC822 style
URL `http://www.w3.org/TR/NOTE-datetime', and also the RFC 822 style
which RSS 2.0 allows."
(let (case-fold-search vector year month day time zone cts given)
(cond ((null date)) ; do nothing for this case
;; if the date is just digits (unix time stamp):
((string-match "^[0-9]+$" date)
(setq given (encode-time (string-to-number date))))
;; RFC822
;; RFC 822
((string-match " [0-9]+ " date)
(setq vector (timezone-parse-date date)
year (string-to-number (aref vector 0)))
......
......@@ -925,7 +925,7 @@ has no effect."
:version "24.3")
(defcustom imagemagick-enabled-types
'(3FR ART ARW AVS BMP BMP2 BMP3 CAL CALS CMYK CMYKA CR2 CRW
'(3FR ARW AVS BMP BMP2 BMP3 CAL CALS CMYK CMYKA CR2 CRW
CUR CUT DCM DCR DCX DDS DJVU DNG DPX EXR FAX FITS GBR GIF
GIF87 GRB HRZ ICB ICO ICON J2C JNG JP2 JPC JPEG JPG JPX K25
KDC MIFF MNG MRW MSL MSVG MTV NEF ORF OTB PBM PCD PCDS PCL
......@@ -959,7 +959,7 @@ has no effect."
:set (lambda (symbol value)
(set-default symbol value)
(imagemagick-register-types))
:version "24.3")
:version "26.2") ; remove ART (bug#22289)
(imagemagick-register-types)
......
......@@ -6854,7 +6854,7 @@ Trigger a debugger invocation when VARIABLE is changed.
When called interactively, prompt for VARIABLE in the minibuffer.
This works by calling `add-variable-watch' on VARIABLE. If you
This works by calling `add-variable-watcher' on VARIABLE. If you
quit from the debugger, this will abort the change (unless the
change is caused by the termination of a let-binding).
......@@ -19472,9 +19472,10 @@ the current value of `kmacro-counter').
When used during defining/executing a macro, inserts the current value
of `kmacro-counter' and increments the counter value by ARG (or by 1 if no
prefix argument). With just \\[universal-argument], inserts the current value
of `kmacro-counter', but does not modify the counter; this is the
same as incrementing the counter by zero.
prefix argument). With just \\[universal-argument], inserts the previous
value of `kmacro-counter', and does not modify the counter; this is
different from incrementing the counter by zero. (The previous value
of the counter is the one it had before the last increment.)
The macro counter can be set directly via \\[kmacro-set-counter] and \\[kmacro-add-counter].
The format of the inserted value of the counter can be controlled
......@@ -20157,7 +20158,8 @@ and then select the region of un-tablified names and use
;;; Generated autoloads from mail/mail-extr.el
(autoload 'mail-extract-address-components "mail-extr" "\
Given an RFC-822 address ADDRESS, extract full name and canonical address.
Extract full name and canonical address from ADDRESS.
ADDRESS should be in RFC 822 (or later) format.
Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). If no
name can be extracted, FULL-NAME will be nil. Also see
`mail-extr-ignore-single-names' and
......@@ -20248,7 +20250,7 @@ This function normally would be called when the message is sent.
;;; Generated autoloads from mail/mail-utils.el
(defvar mail-use-rfc822 nil "\
If non-nil, use a full, hairy RFC822 parser on mail addresses.
If non-nil, use a full, hairy RFC 822 (or later) parser on mail addresses.
Otherwise, (the default) use a smaller, somewhat faster, and
often correct parser.")
......@@ -24925,7 +24927,7 @@ matching parenthesis is highlighted in `show-paren-style' after
(autoload 'parse-time-string "parse-time" "\
Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ).
STRING should be on something resembling an RFC2822 string, a la
STRING should be something resembling an RFC 822 (or later) date-time, e.g.,
\"Fri, 25 Mar 2016 16:24:56 +0100\", but this function is
somewhat liberal in what format it accepts, and will attempt to
return a \"likely\" value even for somewhat malformed strings.
......@@ -30047,7 +30049,7 @@ Otherwise, let mailer send back a message to report errors.")
(defvar send-mail-function (if (and (boundp 'smtpmail-smtp-server) smtpmail-smtp-server) 'smtpmail-send-it 'sendmail-query-once) "\
Function to call to send the current buffer as mail.
The headers should be delimited by a line which is
not a valid RFC822 header or continuation line,
not a valid RFC 822 (or later) header or continuation line,
that matches the variable `mail-header-separator'.
This is used by the default mail-sending commands. See also
`message-send-mail-function' for use with the Message package.")
......@@ -34215,6 +34217,7 @@ Return a string giving the duration of the Emacs initialization.
(autoload 'date-to-time "time-date" "\
Parse a string DATE that represents a date-time and return a time value.
DATE should be in one of the forms recognized by `parse-time-string'.
If DATE lacks timezone information, GMT is assumed.
\(fn DATE)" nil nil)
......@@ -561,7 +561,7 @@ but common in some proprietary systems."
;; maybe some distant mail system needs it. Really, though, if you
;; want a sender line in your mail, just put one in there and don't
;; wait for feedmail to do it for you. (Yes, I know all about
;; RFC-822 and RFC-1123, but are you *really* one of those cases
;; RFC-822-or-later and RFC-1123, but are you *really* one of those cases
;; they're talking about? I doubt it.)
(defcustom feedmail-sender-line nil
"If non-nil and the email has no Sender: header, use this value.
......@@ -787,7 +787,7 @@ cases the name element of the fiddle-plex is ignored and is hardwired
by feedmail to either \"Date\" or \"Resent-Date\".
If you decide to format your own date field, do us all a favor and know
what you're doing. Study the relevant parts of RFC-822 and RFC-1123.
what you're doing. Study the relevant parts of RFC-822-or-later and RFC-1123.
Don't make me come up there!
You should let feedmail generate a Date: for you unless you are sure
......@@ -1514,7 +1514,7 @@ function, for example, to archive all of your sent messages someplace
(defvar feedmail-is-a-resend nil
"Non-nil means the message is a Resend (in the RFC-822 sense).
"Non-nil means the message is a Resend (in the RFC-822-or-later sense).
This affects the composition of certain headers. feedmail sets this
variable as soon as it starts prepping the message text buffer, so any
user-supplied functions can rely on it. Users shouldn't set or change this
......@@ -2443,7 +2443,7 @@ mapped to mostly alphanumerics for safety."
(let ((case-fold-search t) (addr-regexp))
(goto-char (point-min))
;; There are some RFC-822 combinations/cases missed here,
;; There are some RFC-822-or-later combinations/cases missed here,
;; but probably good enough and what users expect.
;;
;; Use resent-* stuff only if there is at least one non-empty one.
......
;;; ietf-drums.el --- Functions for parsing RFC822bis headers -*- lexical-binding:t -*-
;;; ietf-drums.el --- Functions for parsing RFC 2822 headers -*- lexical-binding:t -*-
;; Copyright (C) 1998-2019 Free Software Foundation, Inc.
......@@ -20,10 +20,10 @@
;;; Commentary:
;; DRUMS is an IETF Working Group that works (or worked) on the
;; successor to RFC822, "Standard For The Format Of Arpa Internet Text
;; Messages". This library is based on
;; draft-ietf-drums-msg-fmt-05.txt, released on 1998-08-05.
;; DRUMS is an IETF Working Group that worked on Internet RFC 2822,
;; the successor to RFC 822 and the predecessor of RFC 5322. This
;; library is based on draft-ietf-drums-msg-fmt-05.txt, released on
;; 1998-08-05.
;; Pending a real regression self test suite, Simon Josefsson added
;; various self test expressions snipped from bug reports, and their
......
;;; mail-extr.el --- extract full name and address from RFC 822 mail header
;;; mail-extr.el --- extract full name and address from email header
;; Copyright (C) 1991-1994, 1997, 2001-2019 Free Software Foundation,
;; Inc.
......@@ -29,15 +29,15 @@
;;
;; mail-extract-address-components: (address &optional all)
;;
;; Given an RFC-822 ADDRESS, extract full name and canonical address.
;; Given an RFC-822-or-later ADDRESS, extract name and address.
;; Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
;; If no name can be extracted, FULL-NAME will be nil.
;; ADDRESS may be a string or a buffer. If it is a buffer, the visible
;; (narrowed) portion of the buffer will be interpreted as the address.
;; (This feature exists so that the clever caller might be able to avoid
;; consing a string.)
;; If ADDRESS contains more than one RFC-822 address, only the first is
;; returned.
;; If ADDRESS contains more than one RFC-822-or-later address, only
;; the first is returned.
;;
;; If ALL is non-nil, that means return info about all the addresses
;; that are found in ADDRESS. The value is a list of elements of
......@@ -149,7 +149,7 @@
;; * Handle "null" addresses. Handle = used for spacing in mailbox
;; name. Fix bug in handling of ROUTE-ADDR-type addresses that are
;; missing their brackets. Handle uppercase "JR". Extract full
;; names from X.400 addresses encoded in RFC-822. Fix bug in
;; names from X.400 addresses encoded in RFC-822-or-later. Fix bug in
;; handling of multiple addresses where first has trailing comment.
;; Handle more kinds of telephone extension lead-ins.
;;
......@@ -209,7 +209,7 @@
(defgroup mail-extr nil
"Extract full name and address from RFC 822 mail header."
"Extract full name and address from RFC 822 (or later) mail header."
:prefix "mail-extr-"
:group 'mail)
......@@ -288,8 +288,9 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
(defconst mail-extr-all-letters-but-separators
(purecopy "][[:alnum:]{|}'~`"))
;; Any character that can occur in a name in an RFC822 address including
;; the separator (hyphen and possibly period) for multipart names.
;; Any character that can occur in a name in an RFC 822 (or later)
;; address including the separator (hyphen and possibly period) for
;; multipart names.
;; #### should . be in here?
(defconst mail-extr-all-letters
(purecopy (concat mail-extr-all-letters-but-separators "---")))
......@@ -532,7 +533,8 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
(?. ".")
(?\[ ".")
(?\] ".")
;; % and ! aren't RFC822 characters, but it is convenient to pretend
;; % and ! aren't RFC 822 (or later) characters,
;; but it is convenient to pretend.
(?% ".")
(?! ".") ;; this needs to be word-constituent when not in .UUCP mode
)
......@@ -697,7 +699,8 @@ Unless NO-REPLACE is true, at each of the positions in LIST-SYMBOL
;;;###autoload
(defun mail-extract-address-components (address &optional all)
"Given an RFC-822 address ADDRESS, extract full name and canonical address.
"Extract full name and canonical address from ADDRESS.
ADDRESS should be in RFC 822 (or later) format.
Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). If no
name can be extracted, FULL-NAME will be nil. Also see
`mail-extr-ignore-single-names' and
......@@ -936,10 +939,10 @@ non-display use, you should probably use
;; Trim other punctuation lists of items outside < > pair to handle
;; stupid MTAs.
(when <-pos ; don't need to check >-pos also
;; handle bozo software that violates RFC 822 by sticking
;; punctuation marks outside of a < > pair
;; Handle bozo software that violates RFC 822 (or later)
;; by sticking punctuation marks outside of a < > pair.
(mail-extr-nuke-outside-range @-pos <-pos >-pos t)
;; RFC 822 says nothing about these two outside < >, but
;; RFC 822 (or later) says nothing about these two outside < >, but
;; remove those positions from the lists to make things
;; easier.
(mail-extr-nuke-outside-range !-pos <-pos >-pos t)
......@@ -1325,7 +1328,7 @@ non-display use, you should probably use
(narrow-to-region atom-beg atom-end)
(cond
;; Handle X.400 addresses encoded in RFC-822.
;; Handle X.400 addresses encoded in RFC 822 or later.
;; *** Shit! This has to handle the case where it is
;; *** embedded in a quote too!
;; *** Shit! The input is being broken up into atoms
......
......@@ -29,7 +29,7 @@
;;;###autoload
(defcustom mail-use-rfc822 nil
"If non-nil, use a full, hairy RFC822 parser on mail addresses.
"If non-nil, use a full, hairy RFC 822 (or later) parser on mail addresses.
Otherwise, (the default) use a smaller, somewhat faster, and
often correct parser."
:type 'boolean
......@@ -384,7 +384,7 @@ The buffer should be narrowed to just the header."
(date (mail-fetch-field "date"))
;; A From: header can contain multiple addresses, a "From "
;; line must contain only one. (Bug#7760)
;; See eg RFC 5322, 3.6.2. Originator Fields.
;; See, e.g., RFC 5322, 3.6.2. Originator Fields.
(end (string-match "[ \t]*[,\n]" from)))
(format "From %s %s\n" (if end
(substring from 0 end)
......