Glenn Morris [Sat, 24 Nov 2018 15:51:04 +0000 (07:51 -0800)]
Merge from origin/emacs-26
56e3e4f Improve indexing in the ELisp manual 7a4992a More Symbola-related extensions for default fontset 4ae0a75 Better support for display of U+1F900..U+1F9FF block 8f0c788 Improve documentation of 'edit-abbrevs-mode' 3c643e7 ; NEWS tweak 477414a Improve documentation of 'dired-do-compress' 9c09b1d ; * etc/NES: Minor change in the description of Dired's 'Z'. 52715e3 Improve doc string and display of 'describe-character' 93242b1 * etc/NEWS: Clarify what 'Z' does in Dired. (Bug#33450) 0d59ae3 Update the docs of object internals
Add tool-bar and menu-bar menu for Isearch (Bug#32990)
* etc/NEWS (Search and Replace): Mention this change.
* lisp/isearch.el: Declare the new, non-autoloaded function
'tmm-menubar-keymap'.
(isearch-tmm-menubar): New function.
(isearch-menu-bar-commands): New variable.
(isearch-menu-bar-yank-map, isearch-menu-bar-map): New variables.
(isearch-mode-map): Define a menu-bar search menu and remap
'tmm-menubar' bindings to point to 'isearch-tmm-menubar'.
(isearch-tool-bar-old-map): New variable.
(isearch-tool-bar-image): New function.
(isearch-tool-bar-map): New variable.
(minor-mode-map-alist): Add an entry for Isearch so that
'isearch-menu-bar-map' shows during search.
(isearch-mode, isearch-done): Save and restore possible
buffer-local 'tool-bar-map' using 'isearch-tool-bar-old-map'.
(iseacrh-mouse-commands): New variable.
(isearch-mouse-leave-buffer): Allow commands in
isearch-mouse-commands.
(with-isearch-suspended): Only push changed states of Isearch
after running the body argument of this macro.
(isearch-pre-command-hook): Additionally allow bindings in
'isearch-tool-bar-map' to pass through, as well as commands
in isearch-menu-bar-commands.
(isearch-post-command-hook): Call 'force-mode-line-update' at its
end to make sure the menu- and tool-bars are up-to-date.
* lisp/tmm.el (tmm-menubar-keymap): New function factored out from
'tmm-menubar'.
(tmm-menubar): Use 'tmm-menubar-keymap'.
(tmm-prompt): New optional argument 'no-execute'.
Alan Mackenzie [Sat, 24 Nov 2018 10:31:53 +0000 (10:31 +0000)]
Fix bug #33416, where typing a ) in a comment at EOB caused a loop (CC Mode).
* lisp/progmodes/cc-mode.el (c-fl-decl-start): A c-forward-syntactic-ws leaves
point inside whitespace when moving over a comment at EOB which has no
terminating LF. Check this possibility and correct for it.
Ulrich Müller [Sat, 17 Nov 2018 10:43:06 +0000 (11:43 +0100)]
Update the calc units table
On 2018-11-16, the 26th meeting of the General Conference on Weights
and Measures (CGPM) has redefined the International System of Units by
adopting fixed values for the Planck constant, the elementary charge,
the Boltzmann constant, and the Avogadro constant:
https://www.bipm.org/utils/en/pdf/CGPM/Draft-Resolution-A-EN.pdf
* lisp/calc/calc-units.el (math-standard-units): Update according
to redefinition of the SI in 2018. (Bug#33412)
Eli Zaretskii [Sat, 24 Nov 2018 08:00:55 +0000 (10:00 +0200)]
Improve indexing in the ELisp manual
* doc/lispref/control.texi (Control Structures, Sequencing)
(Conditionals, Iteration, Catch and Throw, Handling Errors)
(Cleanups):
* doc/lispref/eval.texi (Self-Evaluating Forms)
(Symbol Forms, Function Forms, Macro Forms, Special Forms)
(Quoting, Backquote): Add index entries that begin with
"forms". (Bug#33440)
Eric Abrahamsen [Tue, 26 Jun 2018 00:40:19 +0000 (17:40 -0700)]
Provide new gnus-mode, derive all gnus major modes from this
* lisp/gnus/gnus.el (gnus-mode): New do-nothing major mode, derived
from special mode.
* lisp/gnus/gnus-sum.el (gnus-summary-mode): Change from a function to
a major mode, derive from gnus-mode.
(gnus-summary-setup-buffer): Change call a bit -- can no longer pass
an argument to the mode function.
* lisp/gnus/gnus-srvr.el (gnus-browse-mode): Derive from gnus-mode.
(gnus-server-setup-buffer): Remove unnecessary function.
(gnus-enter-server-buffer): Call gnus-server-mode here, and call it
whether the server buffer already existed or not.
(gnus-server-mode): Change from a function to a major mode.
(gnus-server-mode-hook): Delete custom option, this is automatically
created.
* lisp/gnus/gnus-salt.el (gnus-tree-mode): Derive from gnus-mode.
(gnus-tree-mode-hook): Delete custom option, this is automatically
created.
* lisp/gnus/gnus-kill.el (gnus-kill-file-mode-hook): Delete custom
option.
* lisp/gnus/gnus-group.el (gnus-group-mode):
* lisp/gnus/gnus-art.el (gnus-article-mode):
* lisp/gnus/gnus-agent.el (gnus-category-mode): Derive from gnus-mode.
(gnus-category-mode-hook): Delete custom option.
Paul Eggert [Fri, 23 Nov 2018 08:33:37 +0000 (00:33 -0800)]
emacsclient: fix child exit when exec fails
* lib-src/emacsclient.c (start_daemon_and_retry_set_socket):
If the execvp of Emacs fails exit instead of having the child
run on and do the work of the parent. Coalesce duplicate code.
Paul Eggert [Fri, 23 Nov 2018 07:42:50 +0000 (23:42 -0800)]
emacsclient: tidy socket failure cleanup
* lib-src/emacsclient.c (set_tcp_socket, set_local_socket):
Close socket (instead of leaking it) when ‘connect’ fails.
(socket_status): Return errno if stat fails and -1 if we don’t own.
(set_local_socket): Simplify based on socket_status change.
Juri Linkov [Thu, 22 Nov 2018 22:02:56 +0000 (00:02 +0200)]
Add Isearch commands for going to absolute occurrence of matches (bug#29321)
* lisp/isearch.el (isearch-mode-map): Bind 'M-s M-<' to
'isearch-beginning-of-buffer' and 'isearch-end-of-buffer' to 'M-s M->'.
(isearch-beginning-of-buffer, isearch-end-of-buffer): New commands.
Paul Eggert [Thu, 22 Nov 2018 17:21:22 +0000 (09:21 -0800)]
emacsclient: sockaddr portability fixes
* lib-src/emacsclient.c (get_server_config, set_tcp_socket)
(set_local_socket): Initialize any platform-specific extensions
of struct to zero, just in case.
(set_tcp_socket, set_local_socket): Don’t assume struct
layout details that POSIX does not specify.
Use union to sidestep some problems with strict aliasing.
Remove unnecessary casts.
Michael Albinus [Thu, 22 Nov 2018 15:29:25 +0000 (16:29 +0100)]
Some minor Tramp cleanups
* lisp/net/tramp-adb.el (tramp-adb-file-name-p):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-p):
* lisp/net/tramp-smb.el (tramp-smb-file-name-p): Make it more robust.
* lisp/net/tramp.el (tramp-handle-file-truename): Cache only the
localname.
Eli Zaretskii [Thu, 22 Nov 2018 15:28:51 +0000 (17:28 +0200)]
Improve doc string and display of 'describe-character'
* lisp/descr-text.el (describe-char): Explain how does the
function obtain the various data about the character. Don't
display "preferred" before "charset": it tends to confuse
people.
Paul Eggert [Wed, 21 Nov 2018 22:47:53 +0000 (14:47 -0800)]
emacsclient: omit EXTRA_SPACE guesswork
* lib-src/emacsclient.c: Include <intprops.h>.
(EXTRA_SPACE): Remove; code no longer guesses this is enough.
(open_config): New function.
(get_server_config): Use it.
(set_local_socket): Compute upper bound of buffer size
instead of guessing via EXTRA_SPACE.
Paul Eggert [Wed, 21 Nov 2018 18:50:38 +0000 (10:50 -0800)]
emacsclient: fix unlikely crash with "&"
* lib-src/emacsclient.c (quote_argument):
Mention *DATA in comment so it’s clear DATA must be non-null.
(quote_argument, unquote_argument): Simplify.
(unquote_argument): Don’t crash if the string ends in "&".
Eric Abrahamsen [Mon, 19 Nov 2018 18:03:16 +0000 (10:03 -0800)]
Fix "Allow use of Gnus search groups as notmuch path: search term"
* lisp/gnus/nnir.el (nnir-notmuch-filter-group-names-function):
Default to nil -- getting correct behavior requires user
intervention too often to have this enabled by default.
* lisp/gnus/nnir.el (nnir-run-notmuch): If the user has turned this
on, then also hardcode `gnus-group-short-name' as a filter -- things
will never work without it. Also move leading space to before the
opening parenthesis.
* doc/misc/gnus.texi: Document option.
Eric Abrahamsen [Tue, 20 Nov 2018 18:28:10 +0000 (10:28 -0800)]
Check Gnus group names when reading from browse server
* lisp/gnus/gnus-srvr.el (gnus-browse-read-group): If the group in
question belongs to the native server, the name has to be shortened
before we check it with `gnus-get-info'. It might work otherwise
with nntp, but for backends like nnmaildir that have their own
accounting system, creating an ephemeral group won't work.
Stefan Monnier [Tue, 20 Nov 2018 21:09:35 +0000 (16:09 -0500)]
calc.el, calc-(ext|poly), calccomp: Use lexical-binding
* lisp/calc/calc-ext.el: Use lexical-binding, silence warnings.
(calc-init-extensions): Remove a few functions which can't be called
directly since they depend on dynamically scoped vars.
(calc-embedded-quiet): Declare.
(math-defcache): Use 'declare'.
(math-normalize-a): Remove declaration.
(math-normalize-nonstandard): Receive 'a' as arg instead.
(math-defintegral): Use 'declare'.
(math-exp-pos, math-exp-old-pos, math-exp-keep-spaces, math-rb-h2)
(math-read-big-baseline, math-read-big-h2, math-read-big-err-msg)
(math-exp-token, math-expr-data, math-exp-str): Declare.
(math-map-tree, math-read-expr): Avoid dynvars as formal arguments.
* lisp/calc/calc-poly.el: Use lexical-binding, silence warnings.
Turn some comments into docstrings.
(math-poly-div): Avoid dynvars as formal arguments.
(math-poly-base-top-expr): Move declaration before first use.
(calcFunc-factors, math-factor-expr, math-factor-expr-try)
(calcFunc-factor): Avoid dynvars as formal arguments.
* lisp/calc/calc.el: Use lexical-binding, silence warnings.
(math-normalize-a): Remove.
(math-normalize): Use lexical var 'a' instead.
(math-svo-c): Remove.
(math-stack-value-offset): Pass 'c' explicitly as arg to
math-stack-value-offset-fancy instead.
* lisp/calc/calccomp.el: Use lexical-binding, silence warnings.
(math-svo-c): Remove.
(math-stack-value-offset-fancy): Use new arg 'c' instead.
(math-comp-to-string-flat): Avoid dynvars as formal arguments.
Glenn Morris [Tue, 20 Nov 2018 17:38:42 +0000 (09:38 -0800)]
Merge from origin/emacs-26
070e82b ; * src/window.c (window_scroll): Improve commentary. 60457d7 Improve documentation of the window tree ea1a014 Fix window scrolling on TTY frames when there's no mode line df7ed10 Fix decoding XML files encoded in ISO-8859 7851ae8 (tag: emacs-26.1.90) ; ChangeLog.3 update 1958808 * etc/AUTHORS: Update. 7252507 Fix description of some window hooks 88762b4 Run 'window--adjust-process-windows' when frame size changes ... d6542ea Avoid errors in zone.el when there's overlay at EOB
Stefan Monnier [Tue, 20 Nov 2018 15:37:46 +0000 (10:37 -0500)]
* lisp/calc/calc-alg.el: Use lexical-binding and silence warnings
* lisp/calc/calc-alg.el: Use lexical-binding and silence warnings.
(math-defsimplify): Let-bind 'expr' instead of math-simplify-expr.
Adjust all users.
(math-simplify-expr): Don't declare any more.
(math--simplify-divide-expr): New dynbound var.
(math-simplify-divide): Bind it when needed.
(math-simplify-divisor): Use it instead of math-simplify-expr.
(math-simplify-divisor): Only bind math-simplify-divisor-[nd]over
around the calls to math-simplify-one-divisor.
(math-expr-subst, math-is-polynomial): Don't use dynbound vars as
formal arguments.
(math-polynomial-base): Move binding of math-poly-base-pred.
Don't bind math-poly-base-top-expr any more...
* lisp/calc/calc-poly.el (math-total-polynomial-base): Bind it here instead!
* lisp/calc/calc-units.el: Use lexical-binding and silence warnings.
Adjust to the new 'expr' name in math-defsimplify.
(math-find-base-units, math-to-standard-units, math-convert-units):
Don't use dynbound vars as formal arguments.
(math-simplify-expr): Don't declare any more.
Stephen Berman [Mon, 19 Nov 2018 22:12:52 +0000 (23:12 +0100)]
Fix two Edebug defcustoms (bug#33428)
* lisp/emacs-lisp/edebug.el (edebug-print-length)
(edebug-print-level): Fix customization type to allow setting
the documented valid value nil via the Customize interface.
Paul Eggert [Mon, 19 Nov 2018 19:36:50 +0000 (11:36 -0800)]
emacsclient.c: file name component fixes
* lib-src/emacsclient.c: Include <dosname.h>.
(file_name_absolute_p): Remove, as a code duplicate.
All uses replaced by IS_ABSOLUTE_FILE_NAME.
(set_local_socket): Don’t treat \ as a file name separator
on GNU and POSIX hosts.
Paul Eggert [Mon, 19 Nov 2018 17:51:57 +0000 (09:51 -0800)]
emacsclient.c: use bool for boolean
* lib-src/emacsclient.c (nowait, quiet, suppress_output, eval, tty)
(decode_options, file_name_absolute_p, get_server_config)
(strprefix, find_tty, set_socket, main):
Use bool for boolean.
(create_frame): New static var, replacing the old current_frame
and with inverted sense, as this is clearer.
Eli Zaretskii [Mon, 19 Nov 2018 18:12:04 +0000 (20:12 +0200)]
Fix window scrolling on TTY frames when there's no mode line
* src/window.c (window_internal_height): Remove tests for
next, prev, and parent pointers, as they are unrelated to
whether a window has a mode line. (Bug#33363)
Eli Zaretskii [Mon, 19 Nov 2018 16:36:42 +0000 (18:36 +0200)]
Fix decoding XML files encoded in ISO-8859
* lisp/international/mule.el (sgml-xml-auto-coding-function):
Avoid signaling an error from coding-system-equal when the XML
encoding tag specifies an encoding whose type is 'charset'.
(Bug#33429)
Ulrich Müller [Mon, 19 Nov 2018 15:29:56 +0000 (07:29 -0800)]
Update the calc units table
On 2018-11-16, the 26th meeting of the General Conference on Weights
and Measures (CGPM) has redefined the International System of Units by
adopting fixed values for the Planck constant, the elementary charge,
the Boltzmann constant, and the Avogadro constant:
https://www.bipm.org/utils/en/pdf/CGPM/Draft-Resolution-A-EN.pdf
* lisp/calc/calc-units.el (math-standard-units): Update according
to redefinition of the SI in 2018.
Stefan Monnier [Mon, 19 Nov 2018 02:15:06 +0000 (21:15 -0500)]
Remove uses of obsolete 'CUA' symbol property
* lisp/emulation/cua-base.el (cua-scroll-up, cua-scroll-down):
* lisp/progmodes/subword.el (subword-forward, subword-backward):
* lisp/obsolete/crisp.el (crisp-home, crisp-end):
Remove 'CUA' prop; not used any more.
Martin Rudalics [Sun, 18 Nov 2018 08:24:10 +0000 (09:24 +0100)]
Fix description of some window hooks
* doc/lispref/windows.texi (Window Hooks): Remove text that
warns against using 'save-window-excursion' while running
'window-size-change-functions', it's no more relevant.
Clarify description of 'window-configuration-change-hook'.
Gary Fredericks [Sun, 18 Nov 2018 08:15:00 +0000 (09:15 +0100)]
Run 'window--adjust-process-windows' when frame size changes (Bug#32720)
* lisp/window.el (window-size-change-functions): Run
'window--adjust-process-windows' from
'window-size-change-functions' too (Bug#32720, "another issue"
in Bug#33230).
Juri Linkov [Sat, 17 Nov 2018 21:31:52 +0000 (23:31 +0200)]
Don't exit Isearch while resizing windows with mouse (bug#32990)
* lisp/isearch.el (isearch-mouse-leave-buffer): New function.
(isearch-mode): Use isearch-mouse-leave-buffer instead of
isearch-done for mouse-leave-buffer-hook.
(isearch-done): Remove isearch-mouse-leave-buffer from
mouse-leave-buffer-hook.
(enlarge-window-horizontally, shrink-window-horizontally)
(shrink-window, mouse-drag-mode-line, mouse-drag-vertical-line):
Put property isearch-scroll with t.
(isearch-mode): Reset isearch-pre-scroll-point and
isearch-pre-move-point to nil for the case when Isearch exits
between isearch-pre-command-hook (that sets these values) and
isearch-post-command-hook (that used to reset them).
Glenn Morris [Fri, 16 Nov 2018 16:30:20 +0000 (08:30 -0800)]
Merge from origin/emacs-26
936a8f3 (origin/emacs-26) Document Emacs 26 behavior of Dired's 'Z' o... 99f99a1 ; Minor editing change in windows.texi 13bb665 Fix a typo in the Emacs manual
Juri Linkov [Thu, 15 Nov 2018 23:09:54 +0000 (01:09 +0200)]
* lisp/windmove.el: Support more prefix args (bug#32790)
* lisp/windmove.el (windmove-left, windmove-up, windmove-right)
(windmove-down): Use prefix-numeric-value to support more prefix args
like 'C-u' and 'M--'. Doc fix.
Paul Eggert [Sun, 21 Jan 2018 03:12:05 +0000 (19:12 -0800)]
Fix tempfile creation when byte compiling
This improves on the recent fix for master failing to build
on FreeBSD. Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Put tempfile next to the target file, as was the original intent.
Juri Linkov [Wed, 14 Nov 2018 22:23:47 +0000 (00:23 +0200)]
Isearch hit count. (Bug#29321)
* lisp/isearch.el (isearch-lazy-count): New defcustom.
(lazy-count): New defgroup.
(lazy-count-prefix-format, lazy-count-suffix-format): New defcustom.
(isearch-lazy-count-format): New function.
(isearch-message-prefix, isearch-message-suffix): Use it.
(isearch-lazy-highlight-window-start-changed)
(isearch-lazy-highlight-window-end-changed)
(isearch-lazy-count-current, isearch-lazy-count-total)
(isearch-lazy-count-hash): New variables.
(isearch-lazy-highlight-new-loop): Reset isearch-lazy-count-total
and update isearch-lazy-count-current for isearch-message.
(isearch-lazy-highlight-update): Run full-buffer loop for
isearch-lazy-count.
(isearch-lazy-highlight-buffer-update): Count isearch-lazy-count-total.
Set isearch-lazy-count-current at the end.
Paul Eggert [Wed, 14 Nov 2018 19:42:59 +0000 (11:42 -0800)]
Fix probing for pre-1970 DST
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Fix recently-introduced rounding bug when probing for DST
transitions before 1970 (Bug#33380).
Paul Eggert [Wed, 14 Nov 2018 17:31:28 +0000 (09:31 -0800)]
Document recent change to HOME handling
* doc/emacs/cmdargs.texi (General Variables):
* doc/emacs/custom.texi (Find Init):
* doc/lispref/files.texi (File Name Expansion):
* etc/NEWS: Document behavior when HOME is a relative file name.
Markus Triska [Tue, 13 Nov 2018 21:42:01 +0000 (22:42 +0100)]
Small documentation correction.
* doc/lispref/windows.texi (Textual Scrolling): In the description of
scroll-up-aggressively, refer to scroll-down-aggressively instead of
a recursive reference to scroll-up-aggressively. (Bug#33369)
Juri Linkov [Wed, 14 Nov 2018 00:23:04 +0000 (02:23 +0200)]
New option vc-find-revision-no-save to not write revision to file
* lisp/vc/vc.el (vc-find-revision-no-save): New defcustom (bug#33319).
(vc-find-revision): Depending on vc-find-revision-no-save,
call either vc-find-revision-no-save or vc-find-revision-save.
(vc-find-revision-save): Rename from vc-find-revision.
(vc-find-revision-no-save): New function.
* lisp/vc/diff-mode.el (diff-find-source-location):
Let-bind vc-find-revision-no-save to t.
Juri Linkov [Wed, 14 Nov 2018 00:14:52 +0000 (02:14 +0200)]
Support VC revisions in diff-goto-source (bug#33319)
* lisp/vc/diff-mode.el (diff-vc-revisions): New defvar.
(diff-find-source-location): Call vc-find-revision for
non-nil values of 'other', diff-vc-backend, diff-vc-revisions.
* lisp/vc/vc.el (vc-diff-internal): Set buffer-local
diff-vc-revisions to the list of used revisions.
* doc/emacs/files.texi (Diff Mode): Update diff-goto-source
for VC-related prefix argument.