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.
* src/minibuf.c (Fread_variable): Use the history variable when
calling Fcompleting_read.
(syms_of_minibuf): New history variable, custom-variable-history.
Alan Mackenzie [Mon, 2 Apr 2018 11:33:24 +0000 (11:33 +0000)]
Optimize c-syntactic-skip-backward, c-determine-limit for large comment blocks
* lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Remove.
(c-syntactic-skip-backward): Remove the surrounding c-self-bind-state-cache.
Use the standard function c-literal-start in place of the special purpose
c-ssb-lit-begin. With a suitable skip-chars argument (the usual case),
optimize by invoking c-backward-syntactic-ws to move back over comment blocks.
(c-determine-limit-get-base): Inovke an early c-backward-syntactic-ws.
(c-determine-limit): Use c-forward-comment whilst moving forward. Cope with
an empty position stack whilst looking for non-literals (bug fix). In the
recursive call, double try-size to prevent Lisp stack overflow.
* lisp/help.el (help-map): Map C-s to new function
search-forward-help-for-help.
(help-for-help-internal): In doc-string add entry for C-s.
(search-forward-help-for-help): New function.
Eli Zaretskii [Sat, 31 Mar 2018 17:41:32 +0000 (20:41 +0300)]
Support more separators in rmail-retry-failure
* lisp/mail/rmail.el (mail-unsent-separator): Add a form of
separator that confused rmail-retry-failure due to additional
lines that start with a series of dashes. (Bug#30965)
Noam Postavsky [Sat, 31 Mar 2018 04:40:43 +0000 (00:40 -0400)]
Document return value of pcase (Bug#30425)
* doc/lispref/control.texi (Pattern matching case statement):
* lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no
patterns match.
(pcase-exhaustive): State that an error is signaled if no patterns
match.
Paul Eggert [Fri, 30 Mar 2018 23:11:45 +0000 (16:11 -0700)]
Improve doc for web pages; reproducible tarballs
* admin/make-tarball.txt: Make the tarballs more reproducible.
Fix instructions for web pages as best I can (they are still
incomplete).
* make-dist (default_gzip): Add --no-name for gzip.
(taropt): Add options to make the build more reproducible.
Noam Postavsky [Fri, 30 Mar 2018 20:44:24 +0000 (16:44 -0400)]
Fix another case of freed markers in the undo-list (Bug#30931)
* src/alloc.c (free_marker): Remove.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Detach the markers from the
buffer when we're done with them instead of calling free_marker on
them.
* test/src/editfns-tests.el (delete-region-undo-markers-1)
(delete-region-undo-markers-2): New tests.
Eli Zaretskii [Fri, 30 Mar 2018 12:57:57 +0000 (15:57 +0300)]
Fix C-p and C-n when wrap-prefix is too wide
* src/xdisp.c (move_it_in_display_line_to): Avoid looping in
previous/next-line when wrap-prefix is set to a too-wide
stretch of whitespace. (Bug#30432)
* src/nsfns.m (ns_set_represented_filename): Move function from
nsterm.m and set represented filename directly.
* src/nsterm.h (ns_set_represented_filename): Remove definition.
* src/nsterm.m (ns_set_represented_filename): Move function to
nsfns.m.
(x_free_frame_resources): Remove references to represented_frame.
(sendEvent): Don't set represented filename.
Noam Postavsky [Thu, 29 Mar 2018 23:11:47 +0000 (19:11 -0400)]
Don't wait for visible frames to become visible
For discussion, see thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html.
* src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before
calling x_wait_for_event.
Paul Eggert [Thu, 29 Mar 2018 18:01:38 +0000 (11:01 -0700)]
New experimental variable read-integer-overflow-as-float.
Following a suggestion by Eli Zaretskii (Bug#30408#46).
* etc/NEWS: Mention it.
* src/lread.c (syms_of_lread): Add it.
(read1): Treat out-of-range integers as floats if
read-integer-overflow-as-float is non-nil.
Paul Eggert [Wed, 28 Mar 2018 22:03:40 +0000 (15:03 -0700)]
Port recent org-clock fix to POSIX time_t
* lisp/org/org-clock.el (org-clock-special-range):
Don't assume support for time_t values less than 0, or less than
-2**31 for that matter (Bug#27736).
Alan Mackenzie [Wed, 28 Mar 2018 19:39:30 +0000 (19:39 +0000)]
Handle C++17's constexpr keyword in if statements
* lisp/progmodes/cc-engine.el (c-after-conditional): Test for matches to
c-block-stmt-hangon-key.
* lisp/progmodes/cc-langs.el (c-block-stmt-hangon-kwds): New lang const.
(c-block-stmt-hangon-key): New lang const/var matching any element of the
above.
Alan Mackenzie [Wed, 28 Mar 2018 18:53:32 +0000 (18:53 +0000)]
Replace faulty non-matching regexp "\\<\\>" with "a\\`"
The regexp "\\<\\>", which is supposed never to match, actually matches, for
instance, where a Chinese character is directly followed by an ASCII letter.
So, replace it with "a\\`".
Glenn Morris [Wed, 28 Mar 2018 18:20:57 +0000 (14:20 -0400)]
Fix xrefs in pdf Emacs manual
* doc/emacs/fortran-xtra.texi (ForIndent Cont, ForIndent Num)
(Fortran Columns):
* doc/emacs/picture-xtra.texi (Rectangles in Picture):
Fix recent changes that neglected the splitting of the pdf manuals.
Glenn Morris [Wed, 28 Mar 2018 16:38:22 +0000 (09:38 -0700)]
Merge from origin/emacs-26
9bff405 (origin/emacs-26) * doc/misc/org.texi (Installation): Fix clo... 613c9a5 Update Org to v9.1.9 1b075a9 ; Fix some tiny doc typos 441fe20 De-obsolete `if-let' and `when-let' 8696038 * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix. 930f7b1 * doc/lispref/functions.texi (Defining Functions): Improve in... 95ccf50 Fix crash after frame is freed on macOS (bug#30800) 45d0475 More manual editing 2acb9f0 Minor manual changes changes d481cba * lisp/calculator.el (calculator-paste-decimals): Add version. 7d6c7d0 ; Use GNU not Gnu in docs 1bc4def More proofreading of the Emacs manual