* lisp/url/url-http.el (url-http-parse-headers): Treat 302 as 303,
since this is what the standards recommend these days (bug#25703).
See https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection
* lisp/net/shr.el (shr-tag-label): Remove so that labels don't
break lines (because they shouldn't: They're usually part of a
selection interface) (bug#30557).
Support list of default values in completing-read-multiple
* lisp/emacs-lisp/crm.el (completing-read-multiple):
Consider head of DEF argument when specified as a list,
as per completing-read-default. (bug#30072)
* doc/misc/gnus.texi (Summary Mail Commands): Ditto.
* doc/misc/message.texi (Forwarding): Note the new default.
* lisp/gnus/message.el (message-forward-as-mime): Default to nil
since it's been reported that many recipients can't read MIME
digest forwards (bug#24878).
Make it possible to exit Gnus without saving .newsrc.eld
* lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Don't error out
here so that we can proceed with shutting down Gnus without saving
the .newsrc.eld file when it has been updated externally (bug#23761).
Make nnml save the .overview file when used as an expiry target
* lisp/gnus/nnmail.el (nnmail-expiry-target-group): Always pass in
the `last' parameter to the acceptance function so that backends
like nnml save the .overview file (bug#24499). This may slow down
some use cases.
* lisp/gnus/message.el (message-simplify-recipients)
(message-recipients-without-full-name): Made obsolete since
Message now simplifies all addresses by default.
Remove repetitions from recipient addresses in Message
* lisp/gnus/message.el (message--alter-repeat-address): New function.
(message-get-reply-headers): Use it to remove repetitions on the
form "foo@bar.com" <foo@bar.com>.
Paul Eggert [Thu, 12 Apr 2018 00:03:43 +0000 (17:03 -0700)]
make-dist: fix bug with top-level ChangeLog
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2018-04/msg00307.html
* make-dist (top_level_ChangeLog): New var. Use it to link
top-level ChangeLog only when desired.
Support port number in Gnus X-Message-SMTP-Method header
* lisp/gnus/message.el (message-multi-smtp-send-mail): Try to parse
service as port number. If it succeeds, use parsed number, else use
supplied service name as before (bug#24653). (This only matters
on some operating systems.)
Daniel Dehennin [Wed, 11 Apr 2018 22:40:13 +0000 (00:40 +0200)]
Gnus Group Mail Spliting on mailing-list headers
* texi/gnus.texi: Document the new `list' split abbreviation and
`match-list' group parameter (bug#25346).
* lisp/gnus-mlspl.el: Use the `list' abbreviation when the new
`match-list' group parameter is set to `t'.
The split regexp is modified to match either `@` or `.` as domain
separator to comply with RFC2919 IDs too.
* lisp/nnmail.el: Add new `list' split abbreviation matching common
mailing-list headers.
* lisp/gnus/gnus-sum.el (gnus-summary-next-article): Display the
"No more"... messages if gnus-auto-select-next is nil and the user
has default messaging levels (bug#25582).
Rung new-news-hook from `M-g' in the Gnus summary buffer
* lisp/gnus/gnus-group.el (gnus-group-get-new-news-this-group):
Run `gnus-after-getting-new-news-hook' when doing `M-g' in the
summary buffer, too (bug#25892). This makes `M-g' in both group
and summary buffers work more similar.
* lisp/gnus/gnus-util.el (gnus-rescale-image): Rescale images even
if we don't have a visible article buffer. Reported and fix
suggested by Kevin Brubeck Unhammer.
Don't kill off LibreOffice when selecting the next article in Gnus
* lisp/gnus/mm-decode.el (mm-keep-viewer-alive-types): Add the
media types that LibreOffice uses to the list, since we don't want
to kill off LibreOffice willy-nilly.
If the user query and replaces 'foo' with 'BAR', then
undo must comeback to 'foo', not to 'FOO' (Bug#31073).
* lisp/replace.el (perform-replace): Bind nocasify to non-nil
value during undo/undo-all actions.
* test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.
Document that 'make-process' mixes the output streams
* doc/lispref/processes.texi (Asynchronous Processes):
* src/process.c (Fmake_process): Document that standard error is mixed
with standard output if STDERR is nil.
* test/src/process-tests.el (make-process/mix-stderr): New unit test.
Handle quotation marks and apostrophes in ‘sgml-quote’
To be able to use text in an HTML argument, quotation marks need
to be replaced with an appropriate character reference. Make
‘sgml-quote’ do that.
While at it, fix entiteis not being unquoted if they lack closing
semicolon (e.g. ‘&’) occuring at the very end of a region.
Even though unlikely, make ‘sgml-quote’ handle this scenario.
* lisp/textmodes/sgml-mode.el (sgml-quote): Handle quotation marks and
apostrophes. Match entities lacking semicolon at the end of regions.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-quote-works): New test
case for ‘sgml-quote’ function.
Honor dired-create-destination-dirs if copying/renaming >1 files
Check `dired-create-destination-dirs' when the user wants to
copy/rename several files.
* lisp/dired-aux.el (dired-do-create-files):
Call `dired-maybe-create-dirs' right before bind `into-dir' (Bug#30624).
* test/lisp/dired-aux-tests.el (dired-test-bug30624): Add test.
Paul Eggert [Thu, 5 Apr 2018 00:02:28 +0000 (17:02 -0700)]
Move password-word-equivalents defn to mule-conf
* lisp/international/mule-conf.el (password-word-equivalents):
Move here ...
* lisp/simple.el (password-word-equivalents): ... from here.
This variable belongs in an i18n file somewhere, not in simple.el,
since it’s i18n-related. Also, having it in simple.el tickles
Emacs performance bugs on some platforms when developers visit
simple.el. Problem reported by Drew Adams in, for example:
https://lists.gnu.org/r/emacs-devel/2018-04/msg00124.html
Juri Linkov [Wed, 4 Apr 2018 20:49:45 +0000 (23:49 +0300)]
* lisp/isearch.el (isearch-pre-command-hook): Default to shift-translated
move commands that can be enabled by the `isearch-move' property `enabled',
and disabled by `disabled'.
(search-exit-option): Doc fix.
(isearch-post-command-hook): Check for isearch-forward.
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00438.html
Damien Cassou [Tue, 27 Mar 2018 14:57:51 +0000 (16:57 +0200)]
Detect if a message can be encrypted and add an MML tag
* lisp/gnus/message.el (message-all-recipients): Return a list of
pairs, one for each recipient in To, Cc, Bcc.
(message-all-epg-keys-available-p): Check that there is a public key
in epg for each recipient of the current message.
(message-sign-encrypt-if-all-keys-available): Add MML tag to sign and
encrypt current message if there is a public key for every recipient
in current message.
* test/lisp/gnus/message-tests.el (message-all-recipients): Test for
message-all-recipients.
Paul Eggert [Wed, 4 Apr 2018 17:59:09 +0000 (10:59 -0700)]
Improve GC+Cairo workaround
Suggested by Eli Zaretskii (Bug#20890#31).
* src/font.h (font_data_structures_may_be_ill_formed): New function.
* src/ftfont.c (ftfont_close):
* src/ftcrfont.c (ftcrfont_close): Use it.
Stefan Monnier [Wed, 4 Apr 2018 03:17:30 +0000 (23:17 -0400)]
* lisp/vc/emerge.el: Use lexical-binding
Replace all `(lambda ...) with closures. Use inhibit-read-only.
(emerge-mode): Use define-minor-mode.
(emerge-setup, emerge-setup-with-ancestor):
Don't use 'run-hooks' on local var.
(emerge-files, emerge-files-with-ancestor):
Don't use 'add-hook' on local var.
(emerge-convert-diffs-to-markers): Remove unused var 'B-point-min'.
Simplify 'offset'.
(emerge--current-beg, emerge--current-end): New macros.
(emerge-select-version): Pass 'diff-vector' to the function it calls.
Change all callers to use it instead of dyn-bound vars.
Paul Eggert [Wed, 4 Apr 2018 00:30:48 +0000 (17:30 -0700)]
Pacify GCC when --enable-profiling
* src/conf_post.h (PROFILING): Undef if not on a platform that
supports it. Simplify uses accordingly.
* src/emacs.c (etext) [PROFILING]:
Declare at top level to avoid GCC warning.
Alan Mackenzie [Tue, 3 Apr 2018 16:37:39 +0000 (16:37 +0000)]
Put combine-change-calls around comment-region and uncomment-region
* lisp/newcomment.el (comment-combine-change-calls): New buffer local
variable.
(uncomment-region-default-1, comment-region-default-1): Functions renamed from
uncomment-region-default and comment-region-default.
(uncomment-region-default, comment-region-default): New functions, which call
the above either enclosed in combine-change-calls or not.
Alan Mackenzie [Tue, 3 Apr 2018 16:16:49 +0000 (16:16 +0000)]
Introduce new macro combine-change-calls
This macro is a bit like combine-after-change-calls, but also works with a
non-null before-change-functions. It suppresses the operation of the change
hooks on a possibly large sequence of buffer modifications, replacing them
with a single invocation of before-change-functions at the start, and a single
invocation of after-change-functions at the end.
* lisp/subr.el (undo--combining-change-calls): New variable.
(combine-change-calls-1, undo--wrap-and-run-primitive-undo): New functions.
(combine-change-calls): New macro.
Paul Eggert [Tue, 3 Apr 2018 15:12:41 +0000 (08:12 -0700)]
Port FC_COLOR change to older fontconfig
Problem reported by John ff in:
https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html
* src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]:
Don’t use FC_COLOR on older fontconfigs that don’t have it.
Robert Pluim [Tue, 3 Apr 2018 09:06:01 +0000 (11:06 +0200)]
Ignore color fonts when using Xft
* src/font.c (syms_of_font): New configuration variable
xft-ignore-color-fonts, default t.
* src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore
color fonts if xft-ignore-color-fonts is t. (Bug#30874, Bug#30045)
* etc/NEWS: Document xft-ignore-color-fonts.