Stefan Kangas [Sun, 10 Dec 2023 21:06:54 +0000 (22:06 +0100)]
Mark `;#@` as :safe for asm-comment-char
* lisp/progmodes/asm-mode.el (asm--safe-comment-char-p): New function
that returns true for characters #, @, and ;.
(asm-comment-char): Use new function as :safe predicate.
Stefan Kangas [Sun, 10 Dec 2023 21:04:51 +0000 (22:04 +0100)]
; Use ?c instead of integer in local variables
* exec/loader-armeabi.s (timespec):
* exec/loader-mips64el.s (__start):
* exec/loader-mipsel.s (__start): Use ?c instead of integer in local
variables.
Yuan Fu [Sun, 10 Dec 2023 09:24:25 +0000 (01:24 -0800)]
Fix c-ts-mode indent heuristic (bug#67417)
This is a continuation of the first two patches for bug#67417. The
c-ts-mode--prev-line-match heuristic we added is too broad, so for now
we are just adding a very specific heuristic for the else case.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prev-line-match): Remove function.
(c-ts-mode--else-heuristic): New function.
(c-ts-mode--indent-styles): Use c-ts-mode--else-heuristic.
nverno [Wed, 22 Nov 2023 00:33:04 +0000 (16:33 -0800)]
Fix c-ts-mode indentation (bug#67357)
1. In a compund_statement, we indent the first sibling against the
parent, and the rest siblings against their previous sibling. But
this strategy falls apart when the first sibling is not on its own
line. We should regard the first sibling that is on its own line as
the "first sibling"", and indent it against the parent.
2. In linux style, in a do-while statement, if the do-body is
bracket-less, the "while" keyword is indented to the same level as the
do-body. It should be indented to align with the "do" keyword
instead.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--no-prev-standalone-sibling): New function.
(c-ts-mode--indent-styles): Use
c-ts-mode--no-prev-standalone-sibling. Add while keyword indent rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.
Dmitry Gutov [Sat, 9 Dec 2023 17:04:55 +0000 (19:04 +0200)]
ruby-mode: Better detect regexp vs division (bug#67569)
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Add grouping around methods from the whitelist.
(ruby-syntax-propertize): Also look for spaces around the slash.
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.
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)
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.
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.
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.
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).
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.
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.
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: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).
* 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'
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)
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 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.
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)
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)
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)
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: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: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...