Dmitry Gutov [Thu, 23 Nov 2023 22:00:32 +0000 (00:00 +0200)]
Make python-ts-mode's syntax-highlighting more standardized
This was brought up in a Reddit discussion.
* lisp/progmodes/python.el (python--treesit-fontify-variable):
Use font-lock-variable-use-face (since it applies to references).
(python-ts-mode): Move 'property' from 3rd to 4th
treesit-font-lock-level.
George Kuzler [Thu, 23 Nov 2023 00:45:55 +0000 (19:45 -0500)]
Fix "Text is read-only" on backspacing initial Calc input
Immediately after `calc-mode' opens the minibuffer for input
(because you typed a digit, "e", etc), pressing backspace
should clear the minibuffer and return you to the *Calculator*
buffer. Instead, it leaves the minibuffer as-is and prints the
message "Text is read-only"; this is because the function used,
`erase-buffer', tries to erase the read-only minibuffer prompt.
Using `delete-minibuffer-contents' fixes this, since it doesn't
attempt to delete the prompt.
* lisp/calc/calc.el (calcDigit-backspace): Use
`delete-minibuffer-contents' instead of `erase-buffer'. (Bug#67395)
Eli Zaretskii [Thu, 23 Nov 2023 14:07:31 +0000 (16:07 +0200)]
Allow listing Emoji from a read-only buffer
* lisp/international/emoji.el (emoji-list): Don't barf here if the
original buffer is read-inly...
(emoji-list-select): ...barf here instead. (Bug#67400)
(emoji-list): Doc fix.
Michael Albinus [Wed, 22 Nov 2023 12:29:19 +0000 (13:29 +0100)]
Fix CRLF handling in Tramp (don't merge)
* lisp/net/tramp-sh.el (tramp-send-command-and-read): Use 'space'
instead of 'blank' in rx expression, in order to handle also CR
and alike. Reported by Dominique Quatravaux
<dominique@quatravaux.org>.
Backport: Add some basic tests for java-ts-mode and typescript-ts-mode
* test/lisp/progmodes/java-ts-mode-resources/indent.erts: New file
with tests for indentation.
* test/lisp/progmodes/java-ts-mode-resources/movement.erts: New file
with tests for movement.
* test/lisp/progmodes/java-ts-mode-tests.el: New tests.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: New
file with tests for indentation.
* test/lisp/progmodes/typescript-ts-mode-tests.el: New tests.
Dmitry Gutov [Sat, 18 Nov 2023 16:35:18 +0000 (18:35 +0200)]
Fix string-pixel-width with global setting of display-line-numbers
* lisp/emacs-lisp/subr-x.el (string-pixel-width):
Instead of checking for display-line-numbers-mode, set the
display-line-numbers variable to nil (bug#67248).
Eli Zaretskii [Sat, 18 Nov 2023 09:52:48 +0000 (11:52 +0200)]
Document changes in 'edmacro-parse-keys'
* lisp/edmacro.el (edmacro-parse-keys): Add a comment for forcing
output to be a vector.
(read-kbd-macro): Adjust the doc string to changes in
'edmacro-parse-keys'. (Bug#67182)
Eli Zaretskii [Sat, 18 Nov 2023 09:11:04 +0000 (11:11 +0200)]
Add 2 SQLite extensions to allow-list.
* src/sqlite.c (Fsqlite_load_extension): Add 2 Free Software
extensions to the allow-list. For the details, see
https://lists.gnu.org/archive/html/emacs-devel/2023-11/msg00234.html.
Eli Zaretskii [Tue, 14 Nov 2023 13:14:01 +0000 (15:14 +0200)]
Fix spell-checking email message with citations
This became broken 7 years ago, when the 'boundp condition was
removed, and with it an important unrelated part of the code.
* lisp/textmodes/ispell.el (ispell-message): Fix cite-regexp.
Eli Zaretskii [Sat, 11 Nov 2023 10:02:24 +0000 (12:02 +0200)]
Improve documentation of read syntax and printed representation
* doc/lispref/objects.texi (Syntax for Strings): Describe in more
detail how to specify special characters in string literals.
(Printed Representation, Character Type, Nonprinting Characters):
Improve information and add cross-references about printed
representation and read syntax. (Bug#67033)
Stephen Berman [Wed, 8 Nov 2023 23:13:06 +0000 (00:13 +0100)]
Prevent an infinite loop in todo-mode (bug#66994)
* lisp/calendar/todo-mode.el (todo-item-start): Moving an item to
a todo file (with `C-u m') that had not yet been read into a
buffer puts point at the beginning of the file, from where it is
impossible to reach todo-item-start by this function, so don't try
in that case.
Randy Taylor [Wed, 1 Nov 2023 02:08:25 +0000 (22:08 -0400)]
Fix cmake-ts-mode indentation (Bug#66845)
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--indent-rules):
Support versions v0.3.0 and v0.4.0 of the grammar.
(cmake-ts-mode--font-lock-compatibility-fe9b5e0): Fix docstring.
Mauro Aranda [Mon, 23 Oct 2023 21:04:25 +0000 (18:04 -0300)]
Fix minor defcustom issues in Gnus (Bug#66715)
* lisp/gnus/gnus-art.el (gnus-button-prefer-mid-or-mail): Allow
function and add :tag to const values.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bookmark-inline-details):
Fix docstring.
* lisp/gnus/gnus-sum.el (gnus-simplify-subject-fuzzy-regexp): Allow a
single regexp as value.
* lisp/gnus/message.el (message-indent-citation-function): Allow a
single function as value.
(message-mail-alias-type): Allow for a list of options as value.
(message-dont-reply-to-names): Allow a function as value.
* lisp/gnus/spam-report.el (spam-report-url-ping-function): Fix
default value for the function widget.
Stefan Kangas [Mon, 23 Oct 2023 11:57:28 +0000 (13:57 +0200)]
Make Dired honor `insert-directory-program´ with globs
Starting with commit 6f6639d6ed6c6314b2643f6c22498fc2e23d34c7
(Bug#27631), Dired stopped respecting the value of
'insert-directory-program' when using directory wildcards/globs.
* lisp/dired.el (dired-insert-directory): Honor the value of
'insert-directory-program' when using directory wildcards.
Mauro Aranda [Thu, 19 Oct 2023 11:46:35 +0000 (08:46 -0300)]
Fix State button for customize-icon (Bug#66635)
* lisp/cus-edit.el (custom-icon-action): New function.
(custom-icon): Use it as the :action. Otherwise, clicking the State
button is a noop. Remove irrelevant stuff from the docstring and
comment out some copy-pasta.
(custom-icon-extended-menu): New variable, the menu to show upon
:action.
(custom-icon-set): Really redraw the widget with the new settings.
Comment out strange call to custom-variable-backup-value.
(custom-icon-save): New function.
* lisp/emacs-lisp/icons.el (icons--merge-spec): Fix call to plist-get
and avoid infloop.
Yuan Fu [Sun, 22 Oct 2023 04:08:44 +0000 (21:08 -0700)]
Fix the use of adaptive-fill-regexp in treesit indent preset
* lisp/treesit.el (treesit-simple-indent-presets):
adaptive-fill-regexp don't have a capture group (the group in the
default value is supposed to be a non-capture group), so don't use the
group. Also, in the second diff hunk, replace looking-at with
looking-at-p so it doesn't override match data that we use later.
Yuan Fu [Sun, 22 Oct 2023 03:34:07 +0000 (20:34 -0700)]
Fix treesit-explore-mode (bug#66431)
* lisp/treesit.el (treesit-explore-mode): Reset
treesit--explorer-last-node before calling treesit--explorer-refresh,
so that in the rare case described in the bug report, the explorer
buffer don't show the outdated node.
Dmitry Gutov [Sat, 21 Oct 2023 12:05:45 +0000 (15:05 +0300)]
tsx-ts-mode--font-lock-compatibility-bb1f97b: Re-fix the previous fix
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--font-lock-compatibility-bb1f97b): Make sure the
tested query is actually valid in the new grammar (bug#66646).
Jens Schmidt [Wed, 18 Oct 2023 20:43:37 +0000 (22:43 +0200)]
; Fix argument name for function `copy-file'
* doc/lispref/files.texi (Changing Files): Change name of last
argument of function `copy-file' from `preserve-extended-attributes'
to `preserve-permissions', as used in the function's description, its
doc string and the description below in the manual.
Michael Albinus [Thu, 19 Oct 2023 14:28:26 +0000 (16:28 +0200)]
Update Tramp version (don't merge with master)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.2.29.2".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.2.
Po Lu [Tue, 17 Oct 2023 00:33:25 +0000 (08:33 +0800)]
Correctly register focus events concomitant with alpha changes
* src/xterm.c (x_frame_highlight, x_frame_unhighlight): Skip
changing the frame alpha when the frame is not eligible for
focus state-specific alpha values; otherwise, the alpha might be
reset by the time a alpha change wrought by a focus change
arrives, impeding handle_one_xevent from subsequently restoring
the initial value. (bug#66398)