Stefan Kangas [Sun, 3 Oct 2021 23:08:03 +0000 (01:08 +0200)]
Don't use some obsolete names in documentation
* admin/notes/bugtracker: Use non-obsolete name
'mail-dont-reply-to-names'.
* admin/notes/multi-tty: Mention new variable name
'x-selection-value'.
* doc/lispintro/emacs-lisp-intro.texi (Point and mark)
(Point and mark, Design @value{COUNT-WORDS}): Avoid using obsolete
name 'count-lines-region'.
* doc/lispref/hooks.texi (Standard Hooks): Remove reference to
obsolete abnormal hook 'completion-annotate-function'.
* doc/misc/efaq.texi (SPC no longer completes file names): Remove
reference to obsolete 'minibuffer-local-filename-must-match-map';
setting it has no effect.
* doc/misc/gnus.texi (NNTP): Remove reference to obsolete variable
'nntp-authinfo-file'.
* doc/misc/reftex.texi (Table of Contents, Creating Citations)
(Options - Table of Contents, Options - Referencing Labels)
(Options - Creating Citations, Options - Index Support)
(Options - Index Support, Changes): Don't use obsolete names.
* doc/misc/speedbar.texi (Minor Display Modes)
(Major Display Modes): Make variable name suggestions more in line
with existing non-obsolete variable.
* lisp/textmodes/reftex-cite.el (reftex-select-bib-mode-map):
* lisp/textmodes/reftex-ref.el (reftex-offer-label-menu): Don't use
obsolete variable names.
* lisp/progmodes/which-func.el (which-func-mode): Doc fix.
Paul Eggert [Mon, 4 Oct 2021 00:58:16 +0000 (17:58 -0700)]
Tweak x_hide_tip for consistency
* src/xfns.c (x_hide_tip, Fx_show_tip): Be consistent about using
!NILP (tip_frame) instead of FRAMEP (tip_frame). The two
expressions are logically equivalent since tip_frame is either a
frame or nil, !NILP is a bit faster, and making things consistent
pacifies gcc 11.2.1 -Wanalyzer-null-dereference.
Paul Eggert [Mon, 4 Oct 2021 00:52:04 +0000 (17:52 -0700)]
Remove encode_terminal_code UNINITs
* src/term.c (encode_terminal_code): Clarify by removing a couple
of UNINITs and testing the local variable ‘cmp’ instead of
retesting src->u.cmp.automatic. This pacifies gcc 11.2.1
-Wanalyzer-null-dereference.
Paul Eggert [Mon, 4 Oct 2021 00:22:30 +0000 (17:22 -0700)]
Port systhreads.h to C2x
* src/systhread.h: Put NODISCARD at the start of extern
declarations, not at the end. This is needed by C2x.
This patch also pacifies gcc 11.2.1 -Wattributes.
Paul Eggert [Sun, 3 Oct 2021 23:37:13 +0000 (16:37 -0700)]
Pacify -Wanalyzer-null-argument in lisp_malloc
* src/alloc.c (lisp_malloc): Document that NBYTES must be
positive, and omit a needless runtime check. This pacifies a
false alarm with gcc 11.2.1 -Wanalyzer-possible-null-dereference.
* lisp/international/mule.el (load-with-code-conversion): Call
hack-read-symbol-shorthands-function. Set up shorthands.
(hack-read-symbol-shorthands-function): New variable.
Paul Eggert [Sun, 3 Oct 2021 18:42:20 +0000 (11:42 -0700)]
Simplify socket symlink-attack checking
This is a minor bugfix cleanup (Bug#33847#161).
* lib-src/emacsclient.c: Move "#include <acl.h>" to inside
"#ifdef SOCKETS_IN_FILE_SYSTEM", which is more accurate
and simpler than having a separate "#ifndef WINDOWSNT".
(O_PATH): Likewise.
Alan Mackenzie [Sun, 3 Oct 2021 18:13:23 +0000 (18:13 +0000)]
Clarify (elisp) insert-file-contents with BEG or END not on character boundary
* doc/lispref/files.texi (Reading from files): When the argument BEG or END to
insert-file-contents are at a byte position not at a character boundary,
clarify that raw bytes get inserted, and how to handle this awkwardness in
Lisp. Also clarify that insert-file-contents-literally is intended to insert
raw bytes into the buffer. Fix the outdated example that states it inserts
500 characters, when it actually inserts 500 bytes.
Juri Linkov [Sun, 3 Oct 2021 17:35:49 +0000 (20:35 +0300)]
Move context-menu selection items Defun/List/Symbol to prog-mode (bug#9054)
* lisp/mouse.el (context-menu-functions):
Add context-menu-middle-separator to choices.
(context-menu-region): Move Defun/List/Symbol selection items
to prog-context-menu.
* lisp/progmodes/prog-mode.el (prog-context-menu):
Move Defun/List/Symbol selection items from context-menu-region.
Include text-mode select menu only in strings and comments.
* lisp/textmodes/text-mode.el (text-mode-menu): New function.
(text-mode): Add text-mode-menu to context-menu-functions.
Juri Linkov [Sun, 3 Oct 2021 17:16:32 +0000 (20:16 +0300)]
* lisp/tab-bar.el (tab-bar-detach-tab): Handle frame selected by make-frame.
(tab-bar-move-window-to-tab): New command.
(tab-bar-new-tab-to): Handle the value 'window' of tab-bar-new-tab-choice.
https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg02197.html
Juri Linkov [Sun, 3 Oct 2021 17:13:29 +0000 (20:13 +0300)]
* lisp/tab-line.el (tab-line-format): Add face-modified to the cache key.
When tab-line-tab-face-functions contains tab-line-tab-face-modified,
add 'buffer-modified-p' status to the cache-key, so the cache will expire
when the buffer modification status will change.
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg00129.html
* lisp/net/tramp.el (tramp-file-name-unify): New defun.
(tramp-file-name-equal-p):
* lisp/net/tramp-cache.el (tramp-get-connection-property)
(tramp-set-connection-property, tramp-flush-connection-property)
(tramp-flush-connection-properties): Use it.
* lisp/net/tramp-fuse.el (tramp-fuse-get-fusermount): New defun.
(tramp-fuse-mount-points): New defvar.
(tramp-fuse-unmount): Use it. Delete VEC from
`tramp-fuse-mount-points'. Delete mount point.
(tramp-fuse-unmount-on-cleanup): New user option.
(tramp-fuse-cleanup, tramp-fuse-cleanup-all): New defuns.
(top): Adapt `tramp-fuse-unload-hook',
`tramp-cleanup-connection-hook',
`tramp-cleanup-all-connections-hook' and `kill-emacs-hook'.
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
Add VEC to `tramp-fuse-mount-points'.
* test/lisp/net/tramp-tests.el (tramp-fuse-unmount-on-cleanup): Declare.
(tramp-test39-make-lock-file-name): Use it.
João Távora [Sun, 3 Oct 2021 10:56:16 +0000 (11:56 +0100)]
Font-lock shorthands in elisp-mode for quick visual recognition (bug#50959)
Only the shorthanded prefix is font-locked. This allows the remainder
of the font-lock logic to subsist (e.g. for macro-defining symbols).
* lisp/shorthands.el (cl-lib): Require it when compiling.
(elisp-shorthand-font-lock-face): New face.
(shorthands--mismatch-from-end): New helper.
(shorthands-font-lock-shorthands): New helper.
* test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el:
Add some dummy test code.
Fix substitution of pretty quotes in code in easy-mmode
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring): Adjust.
(easy-mmode--mode-docstring): Avoid making quotes into pretty
quotes in code (bug#50968).
Stefan Kangas [Sat, 2 Oct 2021 19:56:22 +0000 (21:56 +0200)]
Clarify the purpose of internal--format-docstring-line
* test/lisp/subr-tests.el (subr-test-internal--format-docstring-line):
* lisp/subr.el (internal--format-docstring-line): Make it more clear
that this function is not intended for the first line of a docstring.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Add comment explaining
why we use 'internal--format-docstring-line'.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.
Kyle Meyer [Sat, 2 Oct 2021 18:27:55 +0000 (14:27 -0400)]
Update to Org 9.5-30-g10dc9d
The plan is to cut the Org 9.5.1 release and include it in Emacs 28.1,
but in the meantime regularly sync changes from Org's bugfix branch to
emacs-28.
This sync includes files from Org 9.5's new etc/csl/ directory that
should have been synced in bf9ec3d91a (Update to Org 9.5, 2021-09-29).
These items are a priority for the project and should be before other,
less prioritized items, according to a private discussion with project
co-maintainer Eli Zaretskii <eliz@gnu.org>.
Some of these items are a priority for the project and should be
before other, less prioritized items, according to a private
discussion with project co-maintainer Eli Zaretskii <eliz@gnu.org>.
Eli Zaretskii [Sat, 2 Oct 2021 08:06:18 +0000 (11:06 +0300)]
Preload paren.el
* lisp/Makefile.in (COMPILE_FIRST): Add the dependencies of
comp.el, so that they are natively-compiled in advance.
* lisp/loadup.el ("paren"): Preload paren.el. (Bug#50934)
To improve performance and flexibility (bug#50777).
* lisp/progmodes/xref.el (xref-location): Remove.
(xref-file-location): Change to cl-struct.
(xref-buffer-location, xref-bogus-location): Ditto.
(xref-item, xref-match-item): Same.
And update all method definitions accordingly.
(xref--insert-xrefs): Don't use 'oref', use 'xref-item-location'.
(xref--insert-xrefs, xref-show-definitions-completing-read):
Insetad of 'with-slots', use 'xref-item-summary' and
'xref-item-location'.
* lisp/progmodes/etags.el (xref-etags-location):
Change from EIEIO class into a cl-struct.
(xref-etags-apropos-location): Ditto.
Update all method definitions.
* test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-test-run):
Avoid using 'oref'.
Make checkdoc's docstring substitution consistent with other docs
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
In error text, say "mapvar" instead of "keymap", and "command"
instead of "function", to be consistent with the ELisp manual.
(Bug#50903)
* lisp/org/org-element.el (org-element-headline-parser):
Pretty sure this one should be `skip-chars-backward`, not
`skip-syntax-backward`, since \t isn't a valid syntax code.
Stefan Monnier [Thu, 30 Sep 2021 14:02:29 +0000 (10:02 -0400)]
* lisp/org/ob-julia.el: Use lexical-binding
(ess-eval-visibly-p): Declare.
(org-babel-julia-assign-elisp): Remove unused vars `header` and
`row-names` and corespondingly remove now unused args `colnames-p` and
`rownames-p`.
(org-babel-variable-assignments:julia): Adjust call to
`org-babel-julia-assign-elisp` accordingly.
(org-babel-julia-initiate-session): Use `bound-and-true-p`.
(org-babel-julia-evaluate-external-process)
(org-babel-julia-evaluate-session, org-babel-julia-evaluate):
Remove unused arg `row-names-p`.
(org-babel-execute:julia): Adjust call to
`org-babel-julia-evaluate` accordingly.
* etc/NEWS: Announce the addition of the command.
* lisp/erc/erc.el (erc-cmd-WII): Add '/wii' convenience command which
calls the '/whois' command with the given nick as both arguments,
which is useful for displaying the whois information for the nick
along with idle time, even if the nick is on a different server than
the one we are currently connected to.
Restore the previous order of ERC's '/whois' arguments
* etc/NEWS: Remove unneeded entry.
* lisp/erc/erc.el (erc-cmd-WHOIS): Restore the previous order of
arguments sent to the server, so that there's no change in the
function's behavior. Instead, rename the arguments to be more
accurate, and expand upon them in the doc string.
* lisp/gnus/message.el (message-newline-and-reformat): Only search
for previous/next cited lines that have space, because it's the
space we're trying to find.