Stefan Monnier [Sun, 10 Dec 2023 03:55:32 +0000 (22:55 -0500)]
(dired-insert-directory): Obey `file-list` and `wildcard`
Commit
6f6639d6ed6c's support for wildcards in directories failed
to obey `file-list` and `wildcard` arguments. Fix it.
* lisp/dired.el (dired-insert-directory): Expand directory wildcards
only if `file-list` is nil and `wildcard` is non-nil.
Also, refer back to `dir-wildcard` instead of recomputing it.
(dired-readin-insert): Pass a non-nil `wildcard` when wildcard
expansion might be needed to preserve former behavior.
Stefan Monnier [Sun, 10 Dec 2023 00:46:07 +0000 (19:46 -0500)]
(file-expand-wildcards): Handle patterns ending in "/"
The bug was encountered via the ls-lisp advice on Dired but
it actually affects all uses of `file-expand-wildcards`,
so better fix it there.
* lisp/files.el (file-expand-wildcards): Fix bug#60819.
* lisp/ls-lisp.el (ls-lisp--dired): Undo commit
b365a7cc32e2.
* test/lisp/files-tests.el (files-tests--expand-wildcards): New test.
Stefan Monnier [Sat, 9 Dec 2023 23:42:36 +0000 (18:42 -0500)]
* lisp/files.el (file-expand-wildcards): Fix sorting of subdirs
E.g. (file-expand-wildcards "/u*/*m*")
returned ("/usr/games" "/u/dummy" "/u/monnier" "/u/omnibook-disk")
instead of ("/u/dummy" "/u/monnier" "/u/omnibook-disk" "/usr/games").
Stefan Monnier [Sat, 9 Dec 2023 23:03:48 +0000 (18:03 -0500)]
Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook`
* lisp/simple.el (analyze-text-conversion): Fix typo.
* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about
`post-text-conversion-hook`.
Manuel Giraud [Sat, 9 Dec 2023 12:02:19 +0000 (13:02 +0100)]
Fix desktop-save for dired buffers (bug#66697)
* lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.
Eli Zaretskii [Sat, 9 Dec 2023 12:59:08 +0000 (07:59 -0500)]
; Auto-commit of loaddefs files.
Eli Zaretskii [Sat, 9 Dec 2023 12:57:35 +0000 (07:57 -0500)]
; * lisp/progmodes/gud.el (lldb): Fix trailing whitespace.
Eli Zaretskii [Sat, 9 Dec 2023 12:46:45 +0000 (07:46 -0500)]
; * doc/misc/modus-themes.org: Fix merge snafu.
Eli Zaretskii [Sat, 9 Dec 2023 12:25:21 +0000 (07:25 -0500)]
Merge from origin/emacs-29
0f361cc985d ; Minor copyedits in description of ':box' face property
46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu...
12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and...
037d858dc1a (rust-ts-mode): Set electric-indent-chars
dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct...
4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments
83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in...
ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates
71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ...
04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f...
82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha...
89068516b3e Don't claim to signal an error when deleting a nonexistin...
4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67...
5f923ff1a6a ; Fix typos
a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments
a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...
Eli Zaretskii [Sat, 9 Dec 2023 11:05:07 +0000 (13:05 +0200)]
; Minor copyedits in description of ':box' face property
* doc/lispref/display.texi (Face Attributes): Rearrange
description of ':box' attributes. Suggested by Arash Esbati
<arash@gnu.org>. (Bug#67713)
Eli Zaretskii [Sat, 9 Dec 2023 10:02:48 +0000 (12:02 +0200)]
; Fix documentation of register-preview changes
* etc/NEWS: Fix wording of 'register-use-preview' entry.
* lisp/register.el (register-use-preview): Doc fix. Add ':version'.
Michael Albinus [Sat, 9 Dec 2023 09:25:58 +0000 (10:25 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vladimir Kazanov [Sat, 9 Dec 2023 09:25:26 +0000 (10:25 +0100)]
Document ert-font-lock
* doc/misc/ert.texi: Expand the manual.
* etc/NEWS: Mention ert-font-lock.
Michael Albinus [Sat, 9 Dec 2023 09:13:14 +0000 (10:13 +0100)]
New macro connection-local-value
* doc/lispref/variables.texi (Applying Connection Local Variables):
Add macro 'connection-local-value'.
* etc/NEWS: Add macro 'connection-local-value'.
* lisp/files-x.el (connection-local-value): New macro.
(path-separator, null-device): Use it.
* test/lisp/files-x-tests.el
(files-x-test-connection-local-value): New test.
Eli Zaretskii [Sat, 9 Dec 2023 09:07:22 +0000 (11:07 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eshel Yaron [Tue, 5 Dec 2023 20:04:43 +0000 (21:04 +0100)]
; Hide completion preview when switching windows
* lisp/completion-preview.el
(completion-preview--window-selection-change): New function.
(completion-preview-active-mode): Add it to
'window-selection-change-functions'. (Bug#67650)
Michael Albinus [Sat, 9 Dec 2023 09:05:20 +0000 (10:05 +0100)]
; * etc/NEWS: Fix typos.
Philip Kaludercic [Sat, 9 Dec 2023 09:03:37 +0000 (10:03 +0100)]
Remove old VC packages from 'package-alist' after installing
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Wait for all
system operations to have been completed, before proceeding to remove
old package descriptors from 'package-alist'. This avoids loosing a
package if an error occurs during upgrades.
Eli Zaretskii [Sat, 9 Dec 2023 09:04:13 +0000 (11:04 +0200)]
; Fix documentation of 'minibuffer-sort-by-history'
* etc/NEWS:
* lisp/minibuffer.el (completions-sort): Doc fix.
john muhl [Sun, 3 Dec 2023 16:56:04 +0000 (10:56 -0600)]
Add font-lock tests for lua-ts-mode (bug#67605)
* test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-font-lock):
Add ert-font-lock tests.
(lua-ts-mode-test-indentation):
(lua-ts-test-indentation):
(lua-ts-mode-test-movement):
(lua-ts-test-movement): Rename for consistency.
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua: New
file.
Eli Zaretskii [Sat, 9 Dec 2023 08:54:07 +0000 (10:54 +0200)]
; Fix documentation of 'dired-do-open'
* lisp/dired-aux.el (dired-do-open):
* etc/NEWS: Fix documentation of 'dired-do-open'. (Bug#18132)
Jared Finder [Sat, 9 Dec 2023 08:17:05 +0000 (10:17 +0200)]
Fix dragging mode line on text terminals with a mouse (bug#67457)
* lisp/xt-mouse.el (xterm-mouse-translate-1): Fix the 'event-kind'
property of mouse-movement symbols emitted by xt-mouse.
* lisp/term/linux.el (terminal-init-linux): Call 'gpm-mouse-mode'
to set up the terminal for the mouse, if needed.
Eli Zaretskii [Sat, 9 Dec 2023 07:48:40 +0000 (09:48 +0200)]
; * doc/lispref/processes.texi (Network): Fix wording and punctuation.
Po Lu [Sat, 9 Dec 2023 03:49:04 +0000 (11:49 +0800)]
Correct phantom point generation and MDAP
* src/sfnt.c (sfnt_interpret_mdrp): Cease applying cvt
cut in, as this is contrary to the specification.
(sfnt_interpret_simple_glyph): Correct typo.
(main): Revise tests.
Sean Whitton [Fri, 8 Dec 2023 22:37:06 +0000 (22:37 +0000)]
; * lisp/progmodes/project.el (project-any-command): Fix last change
Dmitry Gutov [Fri, 8 Dec 2023 20:30:48 +0000 (22:30 +0200)]
project-any-command: Change the method for passing project root
* lisp/progmodes/project.el (project-any-command): Change the
check which decides whether 'project-current-directory-override'
should be used. Instead of looking in project-prefix-map, see
whether the command's name starts with 'project-', or the symbol
has the property 'project-command' (bug#67171).
Christophe TROESTLER [Fri, 8 Dec 2023 19:39:31 +0000 (21:39 +0200)]
(rust-ts-mode): Set electric-indent-chars
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
Set electric-indent-chars (bug#67701).
João Távora [Fri, 8 Dec 2023 19:13:55 +0000 (19:13 +0000)]
Eglot: unbreak <host>:<port> spec in C-u M-x eglot (bug#67682)
* lisp/progmodes/eglot.el (eglot--guess-contact): Fix.
Eric Abrahamsen [Fri, 8 Dec 2023 17:48:51 +0000 (09:48 -0800)]
Ensure CID filenames are unique when browsing Gnus article HTML
Bug#67002
* lisp/gnus/gnus-art.el (gnus-article-browse-html-save-cid-content):
It's possible that multiple CID parts will have the same filename,
leading to temporary files clobbering one another during browsing.
This ensures that the temporary filenames are unique.
Thierry Volpiatto [Fri, 8 Dec 2023 10:34:08 +0000 (11:34 +0100)]
Add more options to register-use-preview
This allow showing a basic preview buffer or no preview buffer at all.
* lisp/register.el (register-use-preview): Use choice with three
options.
(register-read-with-preview): Use a basic buffer without navigation,
highlighting etc... when register-use-preview is nil, and no buffer
at all when set to 'never.
Thierry Volpiatto [Fri, 8 Dec 2023 07:09:38 +0000 (08:09 +0100)]
Allow inserting registers in minibuffer (bug#67702)
* lisp/register.el (register-read-with-preview): Bind
`enable-recursive-minibuffers`.
Thierry Volpiatto [Sun, 3 Dec 2023 14:21:50 +0000 (15:21 +0100)]
Exit with no confirmation (RET) when register-use-preview
is non nil and .
This is done by exiting minibuffer when selected register is empty or
when just jumping or inserting.
* lisp/register.el (register-read-with-preview): Do it.
Eli Zaretskii [Fri, 8 Dec 2023 08:42:22 +0000 (10:42 +0200)]
; Fix documentation of 'completion-auto-deselect'
* lisp/minibuffer.el (completion-auto-deselect): Doc fix.
* etc/NEWS: Improve wording of corresponding entry.
Po Lu [Fri, 8 Dec 2023 02:55:02 +0000 (10:55 +0800)]
Display glyphs whose first contours commence at origin
* src/sfnt.c (sfnt_build_append): Don't disregard redundant
motion if outline is empty. Problem encountered in the "M"
glyph within Source Code Pro VF Italic.
Dmitry Gutov [Fri, 8 Dec 2023 02:20:39 +0000 (04:20 +0200)]
js-ts-mode: Highlight function parameters inside destructuring
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Highlight function parameters declared using destructuring syntax.
Dmitry Gutov [Fri, 8 Dec 2023 02:12:21 +0000 (04:12 +0200)]
js-ts-mode: Highlight property shorthands in assignments
* lisp/progmodes/js.el (js--treesit-lhs-identifier-query): Match
property shorthands (which turn into variable reference).
(js--treesit-fontify-assignment-lhs): Use the matches.
Dmitry Gutov [Fri, 8 Dec 2023 01:58:18 +0000 (03:58 +0200)]
(js--treesit-font-lock-settings): Highlight parameters in function expression
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Highlight parameters in a function expression (the node type
'function'). Make the matcher for 'formal_parameters' independent
of the parent, that just created duplication.
Dmitry Gutov [Fri, 8 Dec 2023 01:48:45 +0000 (03:48 +0200)]
(js--treesit-font-lock-settings): Remove some duplicates
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Remove queries from 'function' that duplicate entries in
'definition' (one of them with a typo).
Stefan Monnier [Thu, 7 Dec 2023 18:13:47 +0000 (13:13 -0500)]
* lisp/loadup.el: Check advice after `rmc.el`; turn error into warning
Stefan Monnier [Thu, 7 Dec 2023 16:30:22 +0000 (11:30 -0500)]
* lisp/mail/emacsbug.el (report-emacs-bug): Insert empty X-Debbugs-Cc
Michael Albinus [Thu, 7 Dec 2023 13:02:49 +0000 (14:02 +0100)]
Tramp cleanup
* doc/misc/tramp.texi (Remote processes): Adapt index.
* lisp/net/tramp.el (tramp-skeleton-directory-files)
(tramp-skeleton-make-symbolic-link):
* lisp/net/tramp-cache.el (with-tramp-saved-file-property)
(with-tramp-saved-file-properties)
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Use `setf' but `setq' in macro.
* lisp/net/tramp-compat.el (tramp-compat-funcall): Declare debug.
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Exclude lock files.
(tramp-crypt-file-name-handler-alist): Use `identity' for
`abbreviate-file-name'.
(tramp-crypt-add-directory, tramp-crypt-remove-directory):
Adapt docstrings.
(tramp-crypt-cleanup-connection): New defun. Add it to
`tramp-cleanup-connection-hook'
* lisp/net/tramp-sh.el (tramp-sh-extra-args): Extend regexp.
Liu Hui [Thu, 16 Nov 2023 03:45:28 +0000 (11:45 +0800)]
Add option eshell-history-append
* lisp/eshell/em-hist.el (eshell-history-append): New option.
(eshell--save-history): New function.
(eshell-hist-initialize):
(eshell-save-some-history): Replace eshell-write-history with
eshell--save-history, which respects the new option.
* doc/misc/eshell.texi (History): Document the change.
* etc/NEWS: Announce the change. (Bug#66700)
Po Lu [Thu, 7 Dec 2023 06:05:35 +0000 (14:05 +0800)]
Set a default locale on Android
* doc/emacs/android.texi (Android Environment): Revise for
change.
* src/android.c (initEmacs): Set LANG to either en_US.utf8 or C,
subject to whether the system is newer than Android
5.0 (inclusive).
Po Lu [Thu, 7 Dec 2023 05:26:41 +0000 (13:26 +0800)]
Prevent closing Emacs frames upon locale changes
* java/AndroidManifest.xml.in: Express that Emacs can respond
to locale and fontScale changes.
Po Lu [Thu, 7 Dec 2023 05:14:51 +0000 (13:14 +0800)]
; Fix compiler warnings
* lisp/tab-bar.el (touch-screen-delay):
* lisp/tab-line.el (touch-screen-delay): Declare variables.
* lisp/touch-screen.el (touch-screen-hold): Autoload.
Yuan Fu [Wed, 6 Dec 2023 21:25:40 +0000 (13:25 -0800)]
Tweak plus and minus svg icons
Shrink them a tiny bit so they look the same size as cross.
* etc/images/symbols/minus_16.svg:
* etc/images/symbols/plus_16.svg: Shrink a bit.
Juri Linkov [Wed, 6 Dec 2023 17:28:52 +0000 (19:28 +0200)]
* lisp/dired-aux.el (dired-do-open): New command (bug#18132).
* lisp/dired.el (dired-context-menu): Bind 'dired-do-open' to "Open".
* lisp/dired-aux.el (shell-command-guess-xdg): Use 'shell-quote-argument'.
Eshel Yaron [Wed, 6 Dec 2023 13:41:56 +0000 (14:41 +0100)]
; Remove long annotation for word completion candidates
* lisp/textmodes/ispell.el (ispell-completion-at-point): Remove
':annotation-function' from return value.
Po Lu [Wed, 6 Dec 2023 02:34:41 +0000 (10:34 +0800)]
Cease preloading touch-screen.el outside X and Android
* lisp/calc/calc.el (touch-screen-display-keyboard):
* lisp/minibuffer.el (clear-minibuffer-message):
* lisp/term.el (touch-screen-display-keyboard): Declare
touch-screen-display-keyboard before binding or setting it.
* lisp/loadup.el: Don't autoload touch-screen.el outside X and
Android.
* lisp/touch-screen.el: Autoload functions called from commands
responding to touch screen events.
João Távora [Tue, 5 Dec 2023 21:40:49 +0000 (15:40 -0600)]
ElDoc: make eldoc-display-in-echo-are useful from M-x eldoc
M-x eldoc is ElDoc's interactive entry point for on-demand
documentation for users that don't want the behind-the-scenes idle
timer behaviour.
However, eldoc-display-in-echo-area, a member of
eldoc-display-functions, refused to do anything because it thought it
didn't have permission to use the echo area, which isn't true
in interactive use cases. Fix that.
See also: https://github.com/joaotavora/eglot/discussions/1328
* lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use
INTERACTIVE argument. Rework comments.
(Version): Bump to 1.15.0
Stefan Monnier [Tue, 5 Dec 2023 20:02:24 +0000 (15:02 -0500)]
* lisp/emacs-lisp/package.el (package-activate-all): Fix second-order warning
Stefan Monnier [Tue, 5 Dec 2023 19:24:45 +0000 (14:24 -0500)]
(package-activate-all): Be more robust when quickstart fails
Quickstart can fail in all kinds of ways, for example if a package
was removed without updating the quickstart file.
* lisp/emacs-lisp/package.el (package-activate-all): Revert to the slow
path if the quickstart signals an error.
(package--activate-all): Fix compilation warning without an autoload.
Jonas Bernoulli [Tue, 5 Dec 2023 19:04:21 +0000 (20:04 +0100)]
; * lisp/transient.el: Revert accidental changes
Jonas Bernoulli [Tue, 5 Dec 2023 19:01:44 +0000 (20:01 +0100)]
; * lisp/transient.el: Set Version instead of Package-Version
`finder-compile-keywords' only considers the "Version" header.
Jonas Bernoulli [Tue, 5 Dec 2023 18:59:34 +0000 (19:59 +0100)]
Update to Transient v0.5.2
Eli Zaretskii [Tue, 5 Dec 2023 17:12:00 +0000 (19:12 +0200)]
; Another fix of doc string of 'message-mail-user-agent' (bug#67638).
Eli Zaretskii [Tue, 5 Dec 2023 14:29:41 +0000 (16:29 +0200)]
; * lisp/gnus/message.el (message-mail-user-agent): Doc fix (bug#67638).
Po Lu [Tue, 5 Dec 2023 10:37:11 +0000 (18:37 +0800)]
; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.
Jens Schmidt [Mon, 20 Nov 2023 22:42:01 +0000 (23:42 +0100)]
Update handling of advices during preload
* lisp/emacs-lisp/comp-common.el
(native-comp-never-optimize-functions): Remove macroexpand and
rename-buffer from default value.
* lisp/emacs-lisp/comp.el (comp-call-optim-form-call): Document call
optimization for advised primitives.
* lisp/emacs-lisp/nadvice.el (advice-add): Remove references to TODOs
that were completed already earlier.
* lisp/loadup.el: Disallow advices during preload. (Bug#67005)
Andrea Corallo [Mon, 4 Dec 2023 18:14:28 +0000 (19:14 +0100)]
comp: Fix mvar dependency chain (bug#67239)
* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs): Emit assume with
the original mvar as explicit rhs.
(comp-fwprop-insn): Add note.
* test/src/comp-tests.el (67239-1): Add new test.
* test/src/comp-resources/comp-test-funcs.el (comp-test-time)
(comp-test-67239-00-f, comp-test-67239-0-f, comp-test-67239-1-f):
Define.
Andrea Corallo [Sat, 2 Dec 2023 08:53:03 +0000 (09:53 +0100)]
* lisp/emacs-lisp/comp.el (comp--native-compile): Better log.
Andrea Corallo [Mon, 27 Nov 2023 14:39:24 +0000 (15:39 +0100)]
comp: Rename some functions
* lisp/emacs-lisp/comp.el (comp--known-predicate-p)
(comp--pred-to-cstr, comp-edge, comp--edge-make)
(comp--block-preds, comp--gen-counter, comp-func)
(comp--equality-fun-p, comp--arithm-cmp-fun-p, comp--set-op-p)
(comp--assign-op-p, comp--call-op-p, comp--branch-op-p)
(comp--limple-insn-call-p, comp--type-hint-p)
(comp--func-unique-in-cu-p, comp--symbol-func-to-fun)
(comp--function-pure-p, comp--alloc-class-to-container)
(comp--add-const-to-relocs, comp--prettyformat-insn)
(comp--log-func, comp--log-edges, comp-emit-setimm)
(comp-emit-lambda-for-top-level, comp-add-cond-cstrs)
(comp-collect-calls, comp-compute-dominator-tree)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-func-in-unit, comp-call-optim-form-call)
(comp-dead-assignments-func, comp-tco)
(comp-remove-type-hints-func, comp-remove-type-hints)
(comp-compute-function-type, comp-finalize-relocs)
(comp-compile-ctxt-to-file): Rename and update.
Eli Zaretskii [Mon, 4 Dec 2023 17:13:50 +0000 (19:13 +0200)]
; * doc/lispref/files.texi (Changing Files): Fix last change.
Philipp Stephani [Mon, 4 Dec 2023 13:17:31 +0000 (14:17 +0100)]
Don't claim to signal an error when deleting a nonexisting file.
The behavior has changed in commit
1a65afb7ecc2a52127d6164bad19313440237f9d to no longer signal an error
on ENOENT.
* doc/lispref/files.texi (Changing Files): Fix documentation about
error reporting.
Eli Zaretskii [Mon, 4 Dec 2023 13:10:06 +0000 (15:10 +0200)]
Avoid infloop with wide images
* src/xdisp.c (produce_image_glyph): Avoid inflooping under
visual-line-mode when wide images are displayed. (Bug#67533)
Eli Zaretskii [Mon, 4 Dec 2023 12:22:32 +0000 (14:22 +0200)]
* lisp/indent.el (indent-rigidly): Improve prompt (bug#67620).
Stefan Kangas [Sun, 3 Dec 2023 22:31:30 +0000 (23:31 +0100)]
; Fix typos
Andrea Corallo [Sun, 3 Dec 2023 21:14:32 +0000 (22:14 +0100)]
* lisp/emacs-lisp/comp-run.el (bytecomp): Require it (bug#67590)
Stefan Monnier [Sun, 3 Dec 2023 19:22:48 +0000 (14:22 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Fix bug#67568
This fixes a regression introduced in commit
f616edb4ccce.
Spencer Baugh [Tue, 17 Oct 2023 13:09:55 +0000 (09:09 -0400)]
Add historical option to completions-sort
Support sorting candidates in *Completions* by the order they show up
in the minibuffer history.
Also add minibuffer-sort-alphabetically and
minibuffer-sort-by-history, which are usable for both completions-sort
and display-sort-function.
* lisp/minibuffer.el (completions-sort): Document 'historical option.
(minibuffer-completion-help): Support 'historical option.
(minibuffer-sort-alphabetically)
(minibuffer-completion-base, minibuffer-sort-by-history): Add.
* etc/NEWS: Announce it.
Spencer Baugh [Thu, 23 Nov 2023 13:37:29 +0000 (13:37 +0000)]
Deselect the selected completion candidate when typing
minibuffer-choose-completion-or-exit submits the selected completion
candidate, if any, ignoring the contents of the minibuffer. But a
user might select a completion candidate and then want to type
something else in the minibuffer and submit what they typed.
Now typing will automatically deselect the selected completion
candidate so that minibuffer-choose-completion-or-exit will not choose
it.
minibuffer-choose-completion has the same behavior as before, and is
not affected by the deselection.
* lisp/minibuffer.el (completion-auto-deselect, completions--deselect)
(completions--after-change): Add.
(minibuffer-completion-help): Add completions--after-change hook.
(minibuffer-next-completion): Bind completion-auto-deselect to nil to
avoid immediately deselecting the completion.
(minibuffer-choose-completion-or-exit): Bind
choose-completion-deselect-if-after so deselection takes effect.
(display-completion-list): Guarantee a newline at the beginning of
*Completions* to avoid ambiguity about candidate selection.
* lisp/simple.el (choose-completion-deselect-if-after): Add.
(choose-completion): Check choose-completion-deselect-if-after.
* etc/NEWS: Announce.
Eli Zaretskii [Sun, 3 Dec 2023 16:29:09 +0000 (18:29 +0200)]
Improve 'window-text-pixel-size' when buffer includes images
* src/xdisp.c (window_text_pixel_size): Fix computation of Y when
IGNORE_LINE_AT_END is non-nil and there's a 'display' property at
TO. Improve movement to beginning of screen line at start. Fix
computation of Y when lines are truncated and a line begins with a
'display' property at TO.
(produce_image_glyph): Don't crop image glyph when word-wrap is in
effect. (Bug#67533)
Eric Abrahamsen [Sun, 3 Dec 2023 15:16:32 +0000 (07:16 -0800)]
Fix to "Simplify gnus-group-search-forward"
This updates commit
7304cc8a9ca8a7d19baaa24f0a72c7ad9a6a9716.
Christophe Troestler [Sat, 2 Dec 2023 20:51:15 +0000 (21:51 +0100)]
rust-ts-mode--comment-docstring: Handle block doc comments
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): Handle block doc comments.
Inhibit match-data modification.
Vladimir Kazanov [Sun, 26 Nov 2023 11:48:16 +0000 (11:48 +0000)]
Add ert-font-lock
Add ert-font-lock as well as unit tests and testing resources.
* lisp/emacs-lisp/ert-font-lock.el: New library.
* test/lisp/emacs-lisp/ert-font-lock-resources/broken.js:
* test/lisp/emacs-lisp/ert-font-lock-resources/correct.js:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Unit tests.
(Bug#67460)
Christophe TROESTLER [Sat, 2 Dec 2023 16:58:40 +0000 (18:58 +0200)]
rust-ts-mode--comment-docstring: Fix/improve the previous change
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): Match also "inner" line docs.
Stop rebinding 'end' and use the argument's value in the
'treesit-fontify-with-override' call.
Eli Zaretskii [Sat, 2 Dec 2023 15:06:45 +0000 (10:06 -0500)]
Revert "Ensure that directory is expanded in package-vc-checkout"
This reverts commit
bf0b0c9c73d4793beb11e6125496d0e72d4dd67a.
It is only needed in Emacs 29.
Eli Zaretskii [Sat, 2 Dec 2023 15:05:51 +0000 (10:05 -0500)]
Merge from origin/emacs-29
5f882f4ee97 ; Fix doc string punctuation in ruby-ts-mode.el.
546a68925c9 Fix 'Info-goto-node-web' when NODE is given in various forms
7ff943044e9 Fix setting cursor when the window's op line has 'line-pr...
7f0bef47ddd Drop extra parenthesis in example code in Emacs Lisp Intr...
fbaf113bf38 rust-ts-mode: appropriately fontify doc strings
bd62bdbc680 Fix example code in Emacs Lisp Introduction manual
c7e459132a9 Fix example in Emacs Lisp Intro manual
a6e9c26c8f4 ; * doc/emacs/files.texi (Save Commands): Fix last change.
f6a06ed6c5d Elisp manual: Mention 'write-region' for saving the buffer
4774a3abb4b Document, that PROCESS of signal-process can be a string
ab126284081 Fix typescript-ts-mode indentation for switch statements
Eli Zaretskii [Sat, 2 Dec 2023 15:05:51 +0000 (10:05 -0500)]
; Merge from origin/emacs-29
The following commit was skipped:
ab9c62c2b33 Repair `tab-first-completion` (bug#67158)
Eli Zaretskii [Sat, 2 Dec 2023 15:05:50 +0000 (10:05 -0500)]
Merge from origin/emacs-29
cd477bf07d8 Fix behavior of 'split-root-window-*' with 'C-u'
2e5d47f578a ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):...
c46700deb0a Add more text to clarify the behavior of 'with-current-bu...
687c416ce9b Fix example in Emacs user manual
835902179cd ; Fix recent change in 'c-ts-mode'
169a5ff7524 ; Fix typo in Gnus manual (bug#67469).
30841c71a5d Mention Titankey in Tramp, which has passed the tests
dab7cc241f4 Fix c-ts-mode indentation after if/else (bug#67417)
f8d9dc26c78 Fix indentation for else clause in c-ts-mode (bug#67417)
bf0b0c9c73d Ensure that directory is expanded in package-vc-checkout
e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu...
Eli Zaretskii [Sat, 2 Dec 2023 14:49:55 +0000 (16:49 +0200)]
; Fix doc string punctuation in ruby-ts-mode.el.
Eli Zaretskii [Sat, 2 Dec 2023 13:50:45 +0000 (15:50 +0200)]
; Fix last change.
john muhl [Tue, 14 Nov 2023 22:25:43 +0000 (16:25 -0600)]
Improve font-locking in lua-ts-mode (bug#67554)
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property
highlighting to level 4.
(lua-ts--keywords): Remove `true', `false' and `nil' from
keywords.
(lua-ts--font-lock-settings): Highlight assignments, functions
and labels in more places. Distinguish comment delimiters.
(lua-ts--comment-font-lock): New function.
Eli Zaretskii [Sat, 2 Dec 2023 13:25:08 +0000 (15:25 +0200)]
Fix 'Info-goto-node-web' when NODE is given in various forms
* lisp/info.el (Info-goto-node-web): Support all forms of node
input, per 'Info-read-node-name's documentation, and extract
FILENAME from NODE if given there. Default NODE to "Top" if not
provided by the user. (Bug#67531)
(Info-url-for-node): Support browsing the "Top" node.
Eshel Yaron [Sun, 26 Nov 2023 16:00:32 +0000 (17:00 +0100)]
Facilitate using Completion Preview with the mouse (bug#67479)
Allow users to accept the completion suggestion by clicking on it, and
to cycle between completion suggestions by scrolling (with a mouse
wheel or a trackpad) over the preview.
Also display a message by default when cycling to inform the user
about the index of the current suggestion out of the available total.
* lisp/completion-preview.el (completion-preview-highlight): New face.
(completion-preview-message-format): New user option.
(completion-preview--mouse-map): New keymap.
(completion-preview--try-table, completion-preview--show)
(completion-preview-next-candidate): Apply 'keymap' and 'mouse-face'
properties to completion preview string.
(completion-preview--internal-commands): Add 'mwheel-scroll'. This
prevents incidental scrolls outside of the preview from dismissing the
preview when you actually want to cycle it.
(completion-preview--active-p): New function. Use it as a
'completion-predicate' symbol property for commands that should only
be used when the preview is shown to otherwise exclude these commands
from M-x completion candidates.
Eli Zaretskii [Sat, 2 Dec 2023 12:13:24 +0000 (14:13 +0200)]
Fix setting cursor when the window's op line has 'line-prefix'
* src/xdisp.c (set_cursor_from_row): Skip glyphs that come from a
string if their 'avoid_cursor_p' flag is set. (Bug#67486)
Thierry Volpiatto [Sat, 2 Dec 2023 08:04:03 +0000 (09:04 +0100)]
Merge branch 'register_preview'
Xiyue Deng [Sat, 2 Dec 2023 00:19:18 +0000 (16:19 -0800)]
Drop extra parenthesis in example code in Emacs Lisp Introduction
* doc/lispintro/emacs-lisp-intro.texi (Small buffer case): Drop
trailing unmatched parenthesis. (Bug#67576)
Copyright-paperwork-exempt: yes
Thierry Volpiatto [Thu, 30 Nov 2023 10:04:47 +0000 (11:04 +0100)]
Delete register-tests.el now no more needed
* register-tests.el: Deleted file.
Thierry Volpiatto [Thu, 30 Nov 2023 09:53:46 +0000 (10:53 +0100)]
Update register manual
doc/emacs/regs.texi: Do it.
Thierry Volpiatto [Thu, 30 Nov 2023 09:38:52 +0000 (10:38 +0100)]
Fix register-preview-default
We need to print the string representation (one char) of an eventual
key description e.g. "^X" instead of "C-x".
However the key description is still displayed in a display property.
* lisp/register.el (register-preview-default): Use `string' to print register.
Christophe Troestler [Wed, 29 Nov 2023 23:13:10 +0000 (00:13 +0100)]
rust-ts-mode: appropriately fontify doc strings
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): New function.
(rust-ts-mode--font-lock-settings): Use it
(https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00019.html).
Michael Albinus [Fri, 1 Dec 2023 15:29:37 +0000 (16:29 +0100)]
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Extend.
Eli Zaretskii [Fri, 1 Dec 2023 12:15:30 +0000 (14:15 +0200)]
Fix mode-line-inactive face
* src/xfaces.c (Finternal_set_lisp_face_attribute): Fix validation
of the :style attribute of :box. Previously, nil for :style was not
accepted, which causes 'mode-line-inactive' face to be rejected.
(Bug#67567)
Xiyue Deng [Fri, 1 Dec 2023 10:31:49 +0000 (02:31 -0800)]
Fix example code in Emacs Lisp Introduction manual
* doc/lispintro/emacs-lisp-intro.texi (Optional Arguments): Fix
indentation in an example. (Bug#67559)
Copyright-paperwork-exempt: yes
Eli Zaretskii [Fri, 1 Dec 2023 08:47:27 +0000 (10:47 +0200)]
Fix example in Emacs Lisp Intro manual
* doc/lispintro/emacs-lisp-intro.texi (beginning-of-buffer opt
arg): Fix indentation in example. Reported by Xiyue Deng
<manphiz@gmail.com>. (Bug#67560)
Eli Zaretskii [Fri, 1 Dec 2023 08:36:55 +0000 (10:36 +0200)]
; * doc/emacs/files.texi (Save Commands): Fix last change.
Jeremy Bryant [Thu, 30 Nov 2023 23:14:46 +0000 (23:14 +0000)]
Elisp manual: Mention 'write-region' for saving the buffer
* doc/emacs/files.texi (Save Commands): Mention
'write-region'. (Bug#67313)
Juri Linkov [Fri, 1 Dec 2023 07:18:28 +0000 (09:18 +0200)]
* lisp/simple.el (minibuffer-default-add-shell-commands): Require 'dired-aux'.
This is necessary for 'shell-command-guess' after removing autoload cookie
since declare-function doesn't autoload it.
Juri Linkov [Thu, 30 Nov 2023 18:11:36 +0000 (20:11 +0200)]
* lisp/simple.el: Add declare-function for shell-command-guess.
* lisp/dired-aux.el (shell-command-guess): Remove unneeded autoload cookie.