]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agoFix signed/unsigned promotion errors involving Emacs_Rectangle
Po Lu [Sun, 11 Feb 2024 02:00:33 +0000 (10:00 +0800)]
Fix signed/unsigned promotion errors involving Emacs_Rectangle

* src/androidterm.c (android_note_mouse_movement):

* src/pgtkterm.c (note_mouse_movement):

* src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph)
(expose_area, expose_window, gui_intersect_rectangles): Cast
width or height fields in Emacs_Rectangles to int before summing
with or subtracting them from their coordinate fields, as they
are unsigned outside X, and the sign of the coordinates is thus
not preserved.

(cherry picked from commit e67e7185ce81e59c90741f92c2ba3209412f417e)

14 months agoFix behavior of gnus-summary-very-wide-reply with prefix arg
Eric Abrahamsen [Sat, 10 Feb 2024 18:33:51 +0000 (10:33 -0800)]
Fix behavior of gnus-summary-very-wide-reply with prefix arg

* lisp/gnus/gnus-msg.el (gnus-summary-very-wide-reply): If a prefix
argument has been given, the value of YANK will be a list containing the
current article number.  This should not be used to retrieve a number of
work articles; that should be derived from the value of the
current-prefix-arg (or marked articles).
* doc/misc/gnus.texi: The interplay of prefix arg and marked articles is
complex; attempt to clarify.

(cherry picked from commit 7a0ee5d65f214102734dd22edb641b164a1b73af)

14 months ago* lisp/buff-menu.el: Force other-window commands to use other window.
Juri Linkov [Sat, 10 Feb 2024 17:56:39 +0000 (19:56 +0200)]
* lisp/buff-menu.el: Force other-window commands to use other window.

(Buffer-menu-other-window, Buffer-menu-switch-other-window):
Let-bind 'display-buffer-overriding-action' to
'(nil (inhibit-same-window . t))' that will force the buffer
to be displayed in another window in any case (bug#68978).

(cherry picked from commit 3e5aba883770312536ca7a8f289bf679e55802f5)

14 months ago* lisp/menu-bar.el (menu-bar-showhide-menu): Add "Outlines" (bug#68979).
Juri Linkov [Sat, 10 Feb 2024 17:34:23 +0000 (19:34 +0200)]
* lisp/menu-bar.el (menu-bar-showhide-menu): Add "Outlines" (bug#68979).

The menu item "Outlines" toggles 'outline-minor-mode' when one
of outline-search-function/outline-regexp/outline-level is defined
in the current buffer.

(cherry picked from commit 0a01b998d13027e5672592f9e60919aa683bad9e)

14 months agoRecord dependencies in packages installed via package-vc
Steven Allen [Sat, 27 Jan 2024 16:17:08 +0000 (08:17 -0800)]
Record dependencies in packages installed via package-vc

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Record a
package's declared dependencies in the package's metadata
file.  (Bug#68761)

(cherry picked from commit 55b4a743b6f3d452d98f135763b00965caba5240)

14 months ago; Skip commit 7e8b1863af8c820c2969c1a4666ae4451cbcea92
Eshel Yaron [Sun, 11 Feb 2024 16:28:05 +0000 (17:28 +0100)]
; Skip commit 7e8b1863af8c820c2969c1a4666ae4451cbcea92

14 months ago; * etc/NEWS: Announce support of 'lzip' compressed Info files (bug#69004).
Eli Zaretskii [Sat, 10 Feb 2024 09:22:01 +0000 (11:22 +0200)]
; * etc/NEWS: Announce support of 'lzip' compressed Info files (bug#69004).

(cherry picked from commit 7f3baf352bad03de50135556a561af0c7fb1bd6a)

14 months agoSupport Info files compressed by 'lzip'
Eli Zaretskii [Sat, 10 Feb 2024 09:20:22 +0000 (11:20 +0200)]
Support Info files compressed by 'lzip'

* lisp/info.el (Info-suffix-list): Support lzip compression of
Info files.  (Bug#69004)

(cherry picked from commit 13ee21eb48bedc1779985c3f60010aadbbd99630)

14 months ago* lisp/bind-key.el (personal-keybindings): Autoload it (bug#68999).
Eli Zaretskii [Sat, 10 Feb 2024 09:10:08 +0000 (11:10 +0200)]
* lisp/bind-key.el (personal-keybindings): Autoload it (bug#68999).

(cherry picked from commit 86c5b7c49c0b61413e41f8a95a2f0c7f09cd1db7)

14 months agoAvoid errors in winner.el's 'post-command-hook'
Eli Zaretskii [Sat, 10 Feb 2024 09:04:22 +0000 (11:04 +0200)]
Avoid errors in winner.el's 'post-command-hook'

* lisp/winner.el (winner-save-old-configurations): Don't save
configuration of dead frames.  (Bug#68977)

(cherry picked from commit 20f7a022f817eaed5f6889d9a892c22fc46f0d2f)

14 months agoFix warning in tramp-register-archive-autoload-file-name-handler
Michael Albinus [Sat, 10 Feb 2024 08:50:12 +0000 (09:50 +0100)]
Fix warning in tramp-register-archive-autoload-file-name-handler

* lisp/net/tramp-archive.el
(tramp-register-archive-autoload-file-name-handler): Do not use
read syntax #' for `tramp-archive-file-name-handler', it isn't
autoloaded.

(cherry picked from commit 55aea7967604112343ff67597cbe9fc20acd9196)

14 months ago; Skip commit f1e7b5230ad93aab20af1fd7b09931a746a89d5d
Eshel Yaron [Sun, 11 Feb 2024 16:27:18 +0000 (17:27 +0100)]
; Skip commit f1e7b5230ad93aab20af1fd7b09931a746a89d5d

14 months ago; Mention defface's and their :version tags in CONTRIBUTE.
Eli Zaretskii [Fri, 9 Feb 2024 06:49:55 +0000 (08:49 +0200)]
; Mention defface's and their :version tags in CONTRIBUTE.

(cherry picked from commit 7d3a144486461869b943f04a45e84c0c3d926732)

14 months ago* admin/notes/kind-communication: New file.
Stefan Kangas [Thu, 8 Feb 2024 21:19:40 +0000 (22:19 +0100)]
* admin/notes/kind-communication: New file.

(cherry picked from commit 09c53b717d4941e2ddd113f3f6817bf65ae196f4)

14 months ago; And another fix of CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 20:28:08 +0000 (22:28 +0200)]
; And another fix of CONTRIBUTE.

(cherry picked from commit 31ca4e5501ffa7c80f114c1145ae0ea55fb76d11)

14 months ago; Another clarification in CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 19:26:36 +0000 (21:26 +0200)]
; Another clarification in CONTRIBUTE.

(cherry picked from commit d65499e79083fb764517447d4d40ea3222ea2fa2)

14 months ago; Clarify "ChangeLog entries" in CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 19:07:10 +0000 (21:07 +0200)]
; Clarify "ChangeLog entries" in CONTRIBUTE.

(cherry picked from commit 571ec583d644b718ce52f938f111d4aa98192471)

14 months agoDon't skip links to "." and ".." in Dired when marking files
Eli Zaretskii [Thu, 8 Feb 2024 11:51:55 +0000 (13:51 +0200)]
Don't skip links to "." and ".." in Dired when marking files

* lisp/dired.el (dired-mark): Skip "." and "..", but not symlinks
to those two.  (Bug#38729)  (Bug#68814)

(cherry picked from commit e2682316867ecb22ee1db5e3028a8150d95d1a80)

14 months agoPass unquoted filename to user-supplied MUSTMATCH predicate
Joseph Turner [Wed, 31 Jan 2024 06:08:50 +0000 (22:08 -0800)]
Pass unquoted filename to user-supplied MUSTMATCH predicate

* lisp/minibuffer.el (read-file-name-default): Pass REQUIRE-MATCH
argument through substitute-in-file-name.
* lisp/minibuffer.el (read-file-name): Update docstring.

Resolves bug#68815.

(cherry picked from commit e25d11314d84cc3e606515d6551e878cec4cfee4)

14 months ago* doc/lispref/parsing.texi (Retrieving Nodes): Improve documentation.
Juri Linkov [Sun, 4 Feb 2024 17:22:21 +0000 (19:22 +0200)]
* doc/lispref/parsing.texi (Retrieving Nodes): Improve documentation.

Update optional arguments 'predicate' and 'include-node'
of 'treesit-node-top-level'.

(cherry picked from commit 4749699370370a6bf0d50612dafe871dbaf52924)

14 months agoUse buffer local value of 'history-add-new-input' in minibuffer
Eshel Yaron [Sun, 11 Feb 2024 15:18:48 +0000 (16:18 +0100)]
Use buffer local value of 'history-add-new-input' in minibuffer

Avoid let-binding 'history-add-new-input', since that affects all nested
recursive minibuffers, and instead use a buffer-local setting in the
appropriate minibuffer.

* doc/lispref/minibuf.texi (Minibuffer History): Update.
* lisp/emacs-lisp/crm.el (completing-read-multiple): Use
'history-add-new-input' instead of manually removing raw input from
minibuffer history.
* lisp/isearch.el (isearch-edit-string)
* lisp/replace.el (query-replace-read-from)
(query-replace-read-to, read-regexp)
* lisp/simple.el (read-from-kill-ring): Set 'history-add-new-input'
locally in the minibuffer, instead of let-binding it.
* src/minibuf.c (read_minibuf): Use 'history-add-new-input' local value.

14 months ago; Fix 'thing-at-point' edge case involving overlapping matches
Eshel Yaron [Sat, 10 Feb 2024 16:30:27 +0000 (17:30 +0100)]
; Fix 'thing-at-point' edge case involving overlapping matches

* lisp/thingatpt.el (thing-at-point-looking-at): When finding a match
that ends before point, continue searching from the beginning of that
match, not its end, in case the match we're looking is overlapping with
this one.
* test/lisp/thingatpt-tests.el
(thing-at-point-looking-at-overlapping-matches): New test.

14 months ago; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug#68914).
Eli Zaretskii [Sun, 4 Feb 2024 14:11:20 +0000 (16:11 +0200)]
; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug#68914).

(cherry picked from commit d0673ea0d42048c140f4e5c6db18f78a43303256)

14 months agoRun 'read-only-mode-hook' when visiting a file that is not writable
Eli Zaretskii [Sat, 10 Feb 2024 08:35:18 +0000 (10:35 +0200)]
Run 'read-only-mode-hook' when visiting a file that is not writable

* lisp/files.el (after-find-file): Run 'read-only-mode-hook'
when the visited file is not writable.  (Bug#68648)

(cherry picked from commit 59b849d1eaffb8babb208f6a39c5e0dbc73e3127)

14 months agoFix volume refresh bug in mpc
john muhl [Fri, 26 Jan 2024 03:23:45 +0000 (21:23 -0600)]
Fix volume refresh bug in mpc

* lisp/mpc.el (mpc-volume-refresh): Only refresh volume when mpd
is playing.  When stopped or paused, volume is nil.  (Bug#68785)

(cherry picked from commit 4330eb2864181e49ace5736665c45d8683a5ce1d)

14 months ago; Improve documentation of a recent change in Gnus
Eli Zaretskii [Sat, 10 Feb 2024 07:28:11 +0000 (09:28 +0200)]
; Improve documentation of a recent change in Gnus

* lisp/image.el (find-image): Doc fix.
* lisp/gnus/gnus.el (gnus-mode-line-logo): Fix doc string and
:type texts.  Add :version.  (Bug#68985)

(cherry picked from commit 6195a57b8e8ebff4eaaf4ff8d62719cbd55f579f)

14 months agoMake miscellaneous improvements to the Android port
Po Lu [Sat, 10 Feb 2024 07:02:39 +0000 (15:02 +0800)]
Make miscellaneous improvements to the Android port

* java/org/gnu/emacs/EmacsActivity.java (onCreate): Deal with
omitted calls to onWindowFocusChanged after activity recreation.

* java/org/gnu/emacs/EmacsService.java (clearWindow, clearArea):
Delete redundant wrapper functions.
(getUsefulContentResolver, getContentResolverContext): Delete
functions.
(openContentUri, checkContentUri): Stop searching for an
activity content resolver, as that's actually not necessary.

* src/android.c (android_init_emacs_service)
(android_init_emacs_window, android_clear_window)
(android_clear_area): Adjust to match.

(cherry picked from commit e7d1b12878ed83ad8c6995d8443f3367750ff0c9)

14 months agoAdd option gnus-mode-line-logo
Mekeor Melire [Wed, 7 Feb 2024 22:00:08 +0000 (23:00 +0100)]
Add option gnus-mode-line-logo

* lisp/gnus/gnus.el (gnus-mode-line-logo): New option specifying
whether and which logo will be displayed in the mode-line.
* etc/NEWS: Announce the change.

(cherry picked from commit 6568a9a0099e7745bfd142a0fd16b4d7215c0250)

14 months agoAdd concept indices for some Eshell commands
Jim Porter [Thu, 8 Feb 2024 19:44:05 +0000 (11:44 -0800)]
Add concept indices for some Eshell commands

* doc/misc/eshell.texi (List of Built-ins): Add indices for some
directory- and process-related commands.
(Aliases): Change to concept index.

(cherry picked from commit de5acc3b0d854aeb7dbf104c0977efe2f2266e1a)

14 months agoIn Eshell manual, put command index anchors above the item
Jim Porter [Thu, 8 Feb 2024 19:31:17 +0000 (11:31 -0800)]
In Eshell manual, put command index anchors above the item

This makes sure that when navigating to the command's documentation from
the index, it shows the item heading (which lists the supported
arguments).

* doc/misc/eshell.texi (List of Built-ins, Tramp extensions)
(Extra built-in commands): Adjust placement of '@cmindex'.

(cherry picked from commit b5b80de49c5a37778945d7a0234090b09acc104f)

14 months agoPut the list of built-in Eshell commands in its own manual node
Jim Porter [Thu, 8 Feb 2024 01:58:31 +0000 (17:58 -0800)]
Put the list of built-in Eshell commands in its own manual node

* doc/misc/eshell.texi (Built-ins): Fix capitalization of node to be
more consistent with the rest of the manual.  Fix a cross reference.
List child nodes.
(List of Built-ins): New section and node.
(Defining New Built-ins): Make this a node.  Fix capitalization.

(cherry picked from commit 7a13e705b1aead8f527dfa5407d9f87301b1f252)

14 months agomodula2.el: Avoid font-lock-*-face variables
Stefan Monnier [Fri, 9 Feb 2024 19:22:14 +0000 (14:22 -0500)]
modula2.el: Avoid font-lock-*-face variables

* lisp/progmodes/modula2.el (m3-font-lock-keywords-1)
(m3-font-lock-keywords-2): Refer to the font-lock faces directly

(cherry picked from commit efedb8f479f1f2cf4d7ce703c6411dd756d2843d)

14 months ago* lisp/subr.el (with-output-to-temp-buffer): Add `indent` rule
Stefan Monnier [Fri, 9 Feb 2024 19:13:29 +0000 (14:13 -0500)]
* lisp/subr.el (with-output-to-temp-buffer): Add `indent` rule

(cherry picked from commit 3c3702b9bbc79f63026606dc0f391da3d795226d)

14 months ago* lisp/subr.el (read-char-from-minibuffer): Fix bug#68995
Stefan Monnier [Fri, 9 Feb 2024 19:08:51 +0000 (14:08 -0500)]
* lisp/subr.el (read-char-from-minibuffer): Fix bug#68995

(cherry picked from commit c4ec6d0472beac2a0cb4f5c8baec79e39dfc410b)

14 months agoTramp: Handle PIN requests from security keys
Michael Albinus [Fri, 9 Feb 2024 10:21:05 +0000 (11:21 +0100)]
Tramp: Handle PIN requests from security keys

* doc/misc/tramp.texi (Frequently Asked Questions): Clarify FIDO entry.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-security-key-pin-regexp'.

* lisp/net/tramp.el (tramp-security-key-pin-regexp): New defcustom.
(tramp-action-otp-password, tramp-read-passwd): Trim password prompt.
(tramp-action-show-and-confirm-message): Expand for PIN requests.

(cherry picked from commit 8d6a8e573f9a1e4eb9ebbc0ec244907263e61bb8)

14 months agoPort to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e
Paul Eggert [Fri, 9 Feb 2024 07:17:04 +0000 (23:17 -0800)]
Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e

Problem reported by Collin Funk (Bug#68996).
* GNUmakefile (.): New macro.
(help): Use ‘$.’ instead of ‘$ ’.
* cross/verbose.mk.android, src/verbose.mk.in (.): New macro.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_GEN):
Use ‘$.’ instead of ‘$ ’.
* lib-src/Makefile.in (install): Use ‘$.’ instead of ‘$ ’.

(cherry picked from commit 8d09e1def55e57a8c627ba704289f796c48a085d)

14 months agoFix treesit_traverse_get_predicate (bug#68954)
Dominique Quatravaux [Thu, 8 Feb 2024 09:19:10 +0000 (10:19 +0100)]
Fix treesit_traverse_get_predicate (bug#68954)

Commit d005e685e1df7692085378633348db39a5190374 should have used
assq_no_signal, but didn't, this commit fixes that.

* src/treesit.c (treesit_traverse_get_predicate): Replace assq_no_quit
with assq_no_signal.

Copyright-paperwork-exempt: yes
(cherry picked from commit 4e5068b7b3a06aaba6b93dff759a93b385ab8fd0)

14 months agoSet adstyle within sfnt font objects
Po Lu [Fri, 9 Feb 2024 05:15:57 +0000 (13:15 +0800)]
Set adstyle within sfnt font objects

* src/sfntfont.c (sfntfont_open): Don't incorrectly clear
desc->adstyle.

(cherry picked from commit b3821357696d44e3f553af14c209a21e69187c32)

14 months agoDon't lose track of adstyles during face merging
Po Lu [Fri, 9 Feb 2024 02:43:48 +0000 (10:43 +0800)]
Don't lose track of adstyles during face merging

* src/xfaces.c (merge_face_vectors): If an adstyle exists in
FROM, guarantee that a font spec will exist in TO with the same.

(cherry picked from commit 5af4e346b0b078d6e8f3dd90bb66899d3ed99810)

14 months agoReplace a few calls to intern with constant strings
Po Lu [Fri, 9 Feb 2024 01:53:33 +0000 (09:53 +0800)]
Replace a few calls to intern with constant strings

* src/fns.c (do_yes_or_no_p, Fyes_or_no_p): Use symbol globals
rather than intern.
(syms_of_fns) <Qyes_or_no_p, Qy_or_n_p>: New symbols.

* src/lread.c (readevalloop): Use symbol global.
(syms_of_lread) <Qinternal_macroexpand_for_load>: New symbol.

(cherry picked from commit 8290a1bacb019f5026caa08334a7087802ebc6f9)

14 months agoRespect the delimiter of completer in Python shell completion
Liu Hui [Thu, 18 Jan 2024 04:00:00 +0000 (12:00 +0800)]
Respect the delimiter of completer in Python shell completion

* lisp/progmodes/python.el: (python-shell-completion-setup-code): Fix
the completion code of IPython.  Change the return value to JSON string
and ...
(python-shell-completion-get-completions): ... simplify parsing.
(inferior-python-mode): Update docstring.
(python-shell-readline-completer-delims): New variable indicating the
word delimiters of readline completer.
(python-shell-completion-native-setup): Set the completer delimiter.
(python-shell-completion-native-get-completions): Convert output string
to completions properly.
(python-shell--get-multiline-input)
(python-shell--extra-completion-context)
(python-shell-completion-extra-context): New functions.
(python-shell-completion-at-point): Send text beginning from the line
start if the completion backend does not need word splitting.  Remove
the detection of import statement because it is not needed anymore.
Create proper completion table based on completions returned from
different backends.

* test/lisp/progmodes/python-tests.el (python-tests--completion-module)
(python-tests--completion-parameters)
(python-tests--completion-extra-context): New helper functions.
(python-shell-completion-at-point-jedi-completer)
(python-shell-completion-at-point-ipython): New tests.  (bug#68559)

(cherry picked from commit 0b9c7148fd681c8ad63fd0eb3895db44403e9f8c)

14 months agoFix 'browse-url-url-at-point' so that scheme does not duplicate
USAMI Kenta [Sat, 3 Feb 2024 18:20:24 +0000 (03:20 +0900)]
Fix 'browse-url-url-at-point' so that scheme does not duplicate

* lisp/net/browse-url.el (browse-url-url-at-point): Prepend
the default scheme only if no scheme present.  (Bug#68913)

(cherry picked from commit ebf4ef2022a5f0a69cdd881eb41104e7b59d698e)

14 months ago`file-remote-p' must not return an error
Michael Albinus [Thu, 8 Feb 2024 10:17:22 +0000 (11:17 +0100)]
`file-remote-p' must not return an error

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler):
`file-remote-p' must not return an error.  (Bug#68976)

(cherry picked from commit 08c81db7c8e522278fb2c8de8fbe556d109c135f)

14 months agoAdd minibuffer history to 'C-x /' in minibuffer
Eshel Yaron [Fri, 9 Feb 2024 10:41:12 +0000 (11:41 +0100)]
Add minibuffer history to 'C-x /' in minibuffer

* lisp/minibuffer.el (minibuffer-completion-styles-history): New var.
(minibuffer-set-completion-styles): Use it.

14 months agoRemove minibuffer up-to-one-word completion
Eshel Yaron [Fri, 9 Feb 2024 10:15:24 +0000 (11:15 +0100)]
Remove minibuffer up-to-one-word completion

Deprecate 'minibuffer-complete-word', and cease binding 'SPC' during
minibuffer completion altogether.

* lisp/minibuffer.el (minibuffer-complete-word): Turn it into an
obsolete alias of 'minibuffer-complete'.
(minibuffer-confirm-exit-commands): Remove 'minibuffer-complete-word'.
(completion--try-word-completion): Drop it.
(minibuffer-local-completion-map): Cease binding 'SPC'.
(minibuffer-local-filename-completion-map)
(completion-pcm-complete-word-inserts-delimiters): Deprecate.
(completion-pcm--string->pattern, completing-read-default): Simplify.

* doc/emacs/custom.texi (Minibuffer Maps)
* doc/emacs/mini.texi (Completion Commands)
* doc/lispref/help.texi (Keys in Documentation)
* doc/lispref/minibuf.texi (Completion Commands)
* lisp/emulation/viper-ex.el (viper-complete-filename-or-exit)
* lisp/gnus/mm-decode.el (mm-viewer-completion-map)
* lisp/man.el (Man-completion-table)
* lisp/menu-bar.el (map)
* test/lisp/help-tests.el (help-tests--test-keymap)
(help-tests-substitute-command-keys/keymaps): Adjust.

* etc/NEWS: Announce.

14 months ago; Improve documentation of 'echo-keystrokes-help'
Eli Zaretskii [Thu, 8 Feb 2024 06:56:42 +0000 (08:56 +0200)]
; Improve documentation of 'echo-keystrokes-help'

* doc/emacs/display.texi (Display Custom): Document
'echo-keystrokes-help'.

* etc/NEWS: Mark the 'echo-keystrokes-help' entry documented.

(cherry picked from commit d6c7092ff0713087f38b9492d53be0177af67514)

14 months ago; * src/keyboard.c (echo_dash): Mention F1 in echo_keystrokes_help.
Eli Zaretskii [Thu, 8 Feb 2024 06:48:20 +0000 (08:48 +0200)]
; * src/keyboard.c (echo_dash): Mention F1 in echo_keystrokes_help.

(cherry picked from commit a48cf0c94ca4a4e3fe045be6149025955e9dfa4f)

14 months ago* lisp/touch-screen.el (touch-screen): Fix defgroup version.
Po Lu [Thu, 8 Feb 2024 05:20:28 +0000 (13:20 +0800)]
* lisp/touch-screen.el (touch-screen): Fix defgroup version.

(cherry picked from commit 1db2255c7c7fc232e371d379cb60827a9931e24d)

14 months agoPrevent echo area help message from being printed repeatedly
Po Lu [Thu, 8 Feb 2024 02:32:28 +0000 (10:32 +0800)]
Prevent echo area help message from being printed repeatedly

* src/keyboard.c (echo_dash): Detect echo_keystrokes_help
messages and return if they be present.

(cherry picked from commit ed2450e79b597e0306f14b542e934a90dfd9786f)

14 months agoFix earlier change to keyboard.c
Po Lu [Thu, 8 Feb 2024 02:01:57 +0000 (10:01 +0800)]
Fix earlier change to keyboard.c

* src/keyboard.c (echo_dash): Do not pass automatic string to
Lisp!
(syms_of_keyboard) <echo_keystrokes_help>: Improve doc string.

(cherry picked from commit 1f9781ee7816ad3ec786ca7e10b4e82d1ad989c5)

14 months agoPort better to Autoconf 2.72
Paul Eggert [Wed, 7 Feb 2024 21:17:57 +0000 (13:17 -0800)]
Port better to Autoconf 2.72

* configure.ac: Set ac_cv_type_gid_t=yes to pacify Autoconf 2.72
AC_TYPE_GETGROUPS.  Problem reported by Nick Bowler in:
https://lists.gnu.org/r/autoconf-patches/2024-02/msg00001.html

(cherry picked from commit e34ebc0ccc6c27e7e1217baad9ca74dd7bea4c37)

14 months agoMention 'C-h' in echo for unfinished commands
Dmitry Gutov [Wed, 7 Feb 2024 19:50:37 +0000 (21:50 +0200)]
Mention 'C-h' in echo for unfinished commands

* etc/NEWS: Mention it here.

* lisp/cus-start.el (standard): Add type and version for it.

* src/keyboard.c (echo-keystrokes-help): New user option
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00174.html).

* src/keyboard.c (echo_dash): Use it.

(cherry picked from commit f444786e58737a4ae6071957dfc60075bbd96edc)

14 months agoImprove wording of message in buff-menu.el
Eli Zaretskii [Wed, 7 Feb 2024 17:14:20 +0000 (19:14 +0200)]
Improve wording of message in buff-menu.el

* lisp/buff-menu.el (Buffer-menu--selection-message): Improve
wording of selection messages.

(cherry picked from commit 2ecaa60f0521446c9d2c054a3493faaf46275223)

14 months ago(file-notify--test-wait-event): Rename from `file-notify--test-read-event`
Stefan Monnier [Wed, 7 Feb 2024 16:20:46 +0000 (11:20 -0500)]
(file-notify--test-wait-event): Rename from `file-notify--test-read-event`

* test/lisp/filenotify-tests.el (file-notify--test-wait-event):
Rename to better reflect its purpose rather than
its implementation.  Also make it return nil so callers won't be
tempted to use the return value.

(cherry picked from commit f9ffa0148c3fb9e07671fae8f8ca72dd2d403163)

14 months agoPrefer \` and \' when matching the beg/end of string
Stefan Monnier [Wed, 7 Feb 2024 16:17:35 +0000 (11:17 -0500)]
Prefer \` and \' when matching the beg/end of string

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case)
(tramp-test01-file-name-syntax): Use more precise regexp

(cherry picked from commit 12fb298e21d877c772a19fc8f2fec68a40bcda14)

14 months ago* test/lisp/minibuffer-tests.el (completion-test--pcm-bug38458): New test
Stefan Monnier [Wed, 7 Feb 2024 16:15:59 +0000 (11:15 -0500)]
* test/lisp/minibuffer-tests.el (completion-test--pcm-bug38458): New test

(cherry picked from commit 2f3c435056dac17242b2d147bc73df8742c3e374)

14 months agoUse `defvar` for variables that are not constant
Stefan Monnier [Wed, 7 Feb 2024 16:13:56 +0000 (11:13 -0500)]
Use `defvar` for variables that are not constant

* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive)
(tramp-archive-test-archive):
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-b):
Don't use `defconst` if it's not constant.

(cherry picked from commit cc5d4f15f96f97b6c4eb8b58144d0a0f217d393a)

14 months agoUse slot names rather than their :initargs
Stefan Monnier [Wed, 7 Feb 2024 16:11:38 +0000 (11:11 -0500)]
Use slot names rather than their :initargs

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-39-clone-instance-inheritor-with-args):

* test/lisp/auth-source-tests.el (auth-source-ensure-ignored-backend)
(auth-source-backend-parse-macos-keychain)
(auth-source-backend-parse-macos-keychain-generic-string)
(auth-source-backend-parse-macos-keychain-internet-string)
(auth-source-backend-parse-macos-keychain-internet-symbol)
(auth-source-backend-parse-macos-keychain-generic-symbol)
(auth-source-backend-parse-macos-keychain-internet-default-string)
(auth-source-backend-parse-plstore, auth-source-backend-parse-netrc)
(auth-source-backend-parse-netrc-string)
(auth-source-backend-parse-secrets)
(auth-source-backend-parse-secrets-strings)
(auth-source-backend-parse-secrets-alias)
(auth-source-backend-parse-secrets-symbol)
(auth-source-backend-parse-secrets-no-alias):
Use slot names rather than their :initargs.

(cherry picked from commit b068725d40dd1ab918178b3cbca7b5672037210f)

14 months ago; Fix last changes in buffer-menu.el and NEWS
Mattias Engdegård [Wed, 7 Feb 2024 13:35:44 +0000 (14:35 +0100)]
; Fix last changes in buffer-menu.el and NEWS

* etc/NEWS: Remove superfluous mention of key binding.
* lisp/buff-menu.el (Buffer-menu--selection-message): Go back to
previous wording.  It's not about what is hidden but what is shown;
the message is displayed in response to different actions.

(cherry picked from commit ef3fed1a4898c3e3d6012ba01006d827a4aba0ef)

14 months agoDon't compile lib/copy-file-range.c on MS-Windows
Eli Zaretskii [Wed, 7 Feb 2024 13:33:51 +0000 (15:33 +0200)]
Don't compile lib/copy-file-range.c on MS-Windows

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_copy-file-range): Set to
true to avoid compiling copy-file-range.c on MS-Windows.  The
function 'copy_file_range' is not used on MS-Windows, while
compiling the file triggers warnings because lib/unistd.h, where
its prototype is declared, is omitted in the MS-Windows build.

(cherry picked from commit d03f3a827d80e2a0962128216223bab21998cf0a)

14 months agoFix DEBUG_THREADS in the Android port
Po Lu [Wed, 7 Feb 2024 13:09:18 +0000 (21:09 +0800)]
Fix DEBUG_THREADS in the Android port

* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
`mainThread'.
(onCreate): Set `mainThread' to the thread where the service's
looper executes.
(checkEmacsThread): Compare against SERVICE.mainThread.

(cherry picked from commit e5cb268b2cf612492dfaf39d28f43357710003a6)

14 months agoDeclare function properties in Tramp
Michael Albinus [Wed, 7 Feb 2024 12:19:27 +0000 (13:19 +0100)]
Declare function properties in Tramp

* lisp/net/tramp-message.el (tramp-backtrace, tramp-error)
(tramp-error-with-buffer, tramp-user-error):
Declare `tramp-suppress-trace' property.

(cherry picked from commit ccae58a425674c36cb6f17bcebc4416d34f23a37)

14 months ago; .dir-locals.el (log-edit-mode) <fill-column>: Set to 64.
Po Lu [Wed, 7 Feb 2024 02:48:27 +0000 (10:48 +0800)]
; .dir-locals.el (log-edit-mode) <fill-column>: Set to 64.

(cherry picked from commit 9ccaa09a63548770ca8902758985aeb2c609f5ad)

14 months agoelixir-ts-mode: Highlight more method definitions
Wilhelm Kirschbaum [Wed, 7 Feb 2024 02:18:30 +0000 (04:18 +0200)]
elixir-ts-mode: Highlight more method definitions

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Also highlight method definitions where the arguments are literal
values, not identifiers (bug#67246).

(cherry picked from commit 8a39216ce920d82b86a40471429e30d75c6ee42d)

14 months agoelixir-ts-mode: Bring the faces' use closer to other ts modes
Dmitry Gutov [Wed, 7 Feb 2024 01:54:29 +0000 (03:54 +0200)]
elixir-ts-mode: Bring the faces' use closer to other ts modes

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Rename feature 'elixir-function-name' to 'elixir-definition' and
update all deferences.  Add parameters' highlighting with
font-lock-variable-name-face.  Change variable references'
highlighting to use font-lock-variable-use-face.
Move the feature 'elixir-variable' from feature level 3 to level 4, to
match other ts modes (bug#67246).

(cherry picked from commit eb90fb52b08a16ae2bdc8bad6929492b9e693f72)

14 months agoAdd access_call fontification to elixir-ts-mode
Wilhelm Kirschbaum [Fri, 29 Dec 2023 15:09:00 +0000 (17:09 +0200)]
Add access_call fontification to elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--font-lock-settings):
Add access_call queries to the elixir-variable feature (bug#67246).

(cherry picked from commit c1cdbb987299f6878072fec539bd363e2c3ca015)

14 months ago; Fix typo in configure.ac
Po Lu [Wed, 7 Feb 2024 01:24:32 +0000 (09:24 +0800)]
; Fix typo in configure.ac

* configure.ac: Fix typo.  Reported by Juri Linkov
<juri@linkov.net>.

(cherry picked from commit a45e1237b290a9c04b416703825b105321139608)

14 months ago(loaddefs-generate--compute-prefixes): Fix thinko in last change
Stefan Monnier [Tue, 6 Feb 2024 20:36:18 +0000 (15:36 -0500)]
(loaddefs-generate--compute-prefixes): Fix thinko in last change

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--compute-prefixes):
 Fix thinko in last change.  Also,       reduce memory allocation.

(cherry picked from commit 77f240012f1e9a7cfee60adedebc8e6a230ce49b)

14 months ago; Fix last change in buffer-menu.el
Eli Zaretskii [Tue, 6 Feb 2024 19:55:57 +0000 (21:55 +0200)]
; Fix last change in buffer-menu.el

* etc/NEWS: Elaborate about the binding of the new command.

* lisp/buff-menu.el (Buffer-menu--selection-message): Fix wording
of new message.
(Buffer-menu-toggle-internal): Doc fix.  (Bug#68949)

(cherry picked from commit ab318cce1e97f4b9c78adc3290784105b78f0728)

14 months ago(loaddefs-generate--parse-file): Be a bit more defensive
Stefan Monnier [Tue, 6 Feb 2024 18:21:22 +0000 (13:21 -0500)]
(loaddefs-generate--parse-file): Be a bit more defensive

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Don't fail in case of an error while generating the prefixes.
(loaddefs-generate--compute-prefixes): Don't burp when
`read-from-string` returns something else than a symbol.

(cherry picked from commit a2201a2034a86b4cc90132ab2d920456866c11e3)

14 months agoUse new variable Buffer-menu-show-internal in project-list-buffers.
Juri Linkov [Tue, 6 Feb 2024 17:55:41 +0000 (19:55 +0200)]
Use new variable Buffer-menu-show-internal in project-list-buffers.

* lisp/progmodes/project.el (project-list-buffers): Add the new variable
`Buffer-menu-show-internal' used to toggle internal buffers (bug#68949).

(cherry picked from commit ce7365b591852dd5556e0a4bf6a0ba63a8733802)

14 months agoRearrange and pack hash table fields to reduce space
Mattias Engdegård [Tue, 6 Feb 2024 14:23:53 +0000 (15:23 +0100)]
Rearrange and pack hash table fields to reduce space

* src/lisp.h (struct Lisp_Hash_Table): Move and reduce width of fields
where possible; this saves an entire word at no apparent cost.

(cherry picked from commit 05e3183ede3a08993a7d209fb14153abaed0c74e)

14 months agoChange hash range reduction from remainder to multiplication
Mattias Engdegård [Mon, 15 Jan 2024 08:25:02 +0000 (09:25 +0100)]
Change hash range reduction from remainder to multiplication

This makes both lookups and rehashing cheaper.  The index vector size
is now always a power of 2.  The first table size is reduced to
6 (from 8), because index vectors would become excessively big
otherwise.

* src/lisp.h (struct Lisp_Hash_Table): Replace index_size with
index_bits.  All references adapted.
(hash_table_index_size): New accessor; use it where applicable.
* src/fns.c (hash_index_size): Replace with...
(compute_hash_index_bits): ...this new function, returning the log2 of the
index size.  All callers adapted.
(hash_index_index): Knuth multiplicative hashing instead of remainder.
(maybe_resize_hash_table): Reduce first table size from 8 to 6.

(cherry picked from commit e66870400d45e3d08265df9f6acd4631a5712139)

14 months agoOptionally show internal buffers in Buffer Menu mode
Mattias Engdegård [Tue, 6 Feb 2024 11:39:11 +0000 (12:39 +0100)]
Optionally show internal buffers in Buffer Menu mode

Internal buffers were never shown before but they can be of interest
to Elisp developers, especially since there is no general mechanism to
remove unused buffers.

* lisp/buff-menu.el (Buffer-menu-show-internal)
(Buffer-menu--selection-message, Buffer-menu-toggle-internal): New.
(Buffer-menu-mode-map): Bind to `I`.
(Buffer-menu-mode-menu): Add menu entry.
(list-buffers--refresh): Extend filtering logic.
* etc/NEWS: Announce.

(cherry picked from commit f6225d125c07bbde8c828b40eb6e81333e051c2a)

14 months agoImplement Lisp threading on Android
Po Lu [Tue, 6 Feb 2024 09:52:33 +0000 (17:52 +0800)]
Implement Lisp threading on Android

Much like the NS port, only the main thread receives input from
the user interface, which is fortunately not a major problem for
packages such as lsp-mode that create Lisp threads.

* configure.ac: Enable with_threads under Android.

* src/android.c (android_init_events): Set `main_thread_id' to
the ID of the main thread.
(setEmacsParams): Set new global variable `android_jvm' to the
JVM object, for the purpose of attaching Lisp threads to the
JVM.
(android_select): [THREADS_ENABLED]: If the caller isn't the
main thread, resort to pselect.  Don't check query before select
returns.
(android_check_query): Export.

* src/android.h (_ANDROID_H_): Define new macro and update
prototypes.

* src/process.c (android_select_wrapper): New function.
(wait_reading_process_output): If THREADS_ENABLED, call
thread_select through the Android select wrapper.

* src/thread.c (post_acquire_global_lock): Call
android_check_query; replace android_java_env with the incoming
Lisp thread's.
(run_thread): Attach and detach the thread created to the JVM.
(init_threads): Set the main thread's JNI environment object.

* src/thread.h (struct thread_state) <java_env>: New field.

(cherry picked from commit 42db7292c3e05920bc9f2fa5c3478eb2ba835c5c)

14 months agoDon't forcibly display dialogs on Android if a keyboard is present
Po Lu [Tue, 6 Feb 2024 05:10:57 +0000 (13:10 +0800)]
Don't forcibly display dialogs on Android if a keyboard is present

* java/org/gnu/emacs/EmacsService.java (detectKeyboard): New
function.

* lisp/subr.el (use-dialog-box-p): Don't always return t if a
keyboard is present on Android.

* src/android.c (android_init_emacs_service): Link to new
function.
(android_detect_keyboard): New function.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_detect_keyboard)
(syms_of_androidfns): New function.

(cherry picked from commit 0d2b7120783255fbb0f8e98717573c35425f4df6)

14 months agoUse treesit-node-match-p in treesit-parent-while
Yuan Fu [Tue, 6 Feb 2024 07:12:36 +0000 (23:12 -0800)]
Use treesit-node-match-p in treesit-parent-while

The previous commit should've done this, but I missed it.

* lisp/treesit.el (treesit-parent-while): Use treesit-node-match-p.

(cherry picked from commit cebd26b2e16d75a939e2a9f91becc6ec702122a7)

14 months agoPrefer `ITREE_FOREACH` over `overlays_in`
Stefan Monnier [Mon, 5 Feb 2024 22:58:47 +0000 (17:58 -0500)]
Prefer `ITREE_FOREACH` over `overlays_in`

Use `ITREE_FOREACH` instead of `overlays_in` if that can save us from
allocating an array.

* src/buffer.c (overlays_in): Mark as static.
(mouse_face_overlay_overlaps): Use `ITREE_FOREACH` instead of `overlays_in`.
(disable_line_numbers_overlay_at_eob): Same, and also change return
value to a boolean.
* src/buffer.h (overlays_in): Don't declare.
* src/editfns.c (overlays_around): Delete function.
(Fget_pos_property): Use `ITREE_FOREACH` and keep the "best so far"
instead of using `overlays_in` and sorting the elements.

* src/lisp.h (disable_line_numbers_overlay_at_eob): Change return
type to a boolean.
* src/xdisp.c (should_produce_line_number): Adjust accordingly.

(cherry picked from commit 10faaa3c91045390755791c21349cd562546fdea)

14 months ago(gitmerge-mode-font-lock-keywords): Don't use font-lock-*-face vars
Stefan Monnier [Mon, 5 Feb 2024 19:50:45 +0000 (14:50 -0500)]
(gitmerge-mode-font-lock-keywords): Don't use font-lock-*-face vars

* admin/gitmerge.el (gitmerge-mode-font-lock-keywords): Refer to the
faces directly.

(cherry picked from commit aedfb4f04837ef7b6f50d6a9d833a3ec0f33b11d)

14 months agoGrudgingly accept function values in the function position
Mattias Engdegård [Mon, 5 Feb 2024 16:56:11 +0000 (17:56 +0100)]
Grudgingly accept function values in the function position

* lisp/emacs-lisp/cconv.el (cconv-convert):
Warn about (F ...) where F is a non-symbol function value (bytecode
object etc), but let it pass for compatibility's sake (bug#68931).
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--fun-value-as-head):
New test.

(cherry picked from commit 5e69376292994ffe69b7f8f52ae1ad85c60c2d29)

14 months ago(edebug-signal): Simplify
Stefan Monnier [Mon, 5 Feb 2024 15:13:56 +0000 (10:13 -0500)]
(edebug-signal): Simplify

Also, prefer #' to quote function names.

* lisp/emacs-lisp/edebug.el (edebug-signal): Instead of re-signaling
the error, let `signal_or_quit` continue processing it.

(cherry picked from commit 95c8bfb11ec82e67652e5903495c1fcb5c61ace2)

14 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Mon, 5 Feb 2024 11:56:36 +0000 (12:56 +0100)]
; * etc/NEWS: Fix typos.

(cherry picked from commit 798310f0100e7819bc79fb7f9bdcf59b8f534b4b)

14 months ago* lisp/net/tramp.el (tramp-local-host-regexp): Adapt :version.
Michael Albinus [Mon, 5 Feb 2024 11:55:27 +0000 (12:55 +0100)]
* lisp/net/tramp.el (tramp-local-host-regexp): Adapt :version.

(cherry picked from commit dbc5fafa311823f3a78d4ad5a395e4d87d31d9bd)

14 months agoAdapt cache handling in Tramp
Michael Albinus [Mon, 5 Feb 2024 11:54:56 +0000 (12:54 +0100)]
Adapt cache handling in Tramp

* 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): Do not change KEY
destructively.

(cherry picked from commit edf61edfd6f04ab97785dca92fc68e8e5783586e)

14 months agoFix stale cache in Tramp
Michael Albinus [Mon, 5 Feb 2024 11:54:03 +0000 (12:54 +0100)]
Fix stale cache in Tramp

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Flush file properties in time.  (Bug#68805)

(cherry picked from commit c7539a363b8b109d24457aaeb60fb51bd0a03e4f)

14 months agoFix frame focus tracking under Android
Po Lu [Mon, 5 Feb 2024 10:34:22 +0000 (18:34 +0800)]
Fix frame focus tracking under Android

* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus): New
argument WHENCE, a unique number identifying the circumstances
leading up to the call.  All callers changed.
(attachWindow): Call `invalidateFocus' from the UI thread.
(onWindowFocusChanged): Don't remove activity from
`focusedActivities' if it already exists should `hasWindowFocus'
return true.

(cherry picked from commit c1f8fe09e6641cc6c1195edcb8666ace1e6e8829)

14 months agoDon't respect ROUND_XY_TO_GRID when decomposing uninterpreted glyph
Po Lu [Mon, 5 Feb 2024 09:17:51 +0000 (17:17 +0800)]
Don't respect ROUND_XY_TO_GRID when decomposing uninterpreted glyph

* src/sfnt.c (sfnt_decompose_compound_glyph): Remove useless
code; don't pretend to round glyph coordinates.

(cherry picked from commit 98d62c5f7675b24ad66e010765ce3012046f2ff8)

14 months ago; Fix last change
Stefan Kangas [Mon, 5 Feb 2024 07:30:31 +0000 (08:30 +0100)]
; Fix last change

* lisp/filesets.el (filesets-quote): Resurrect as obsolete alias for
'shell-quote-argument'.

(cherry picked from commit ea53a26d03da8d03652696939431b3a7e63053d7)

14 months agofilesets: Safely invoke `shell-command*' functions
Xi Lu [Thu, 23 Feb 2023 12:58:00 +0000 (20:58 +0800)]
filesets: Safely invoke `shell-command*' functions

* lisp/filesets.el:
(filesets-select-command, filesets-quote): Remove unused functions.
(filesets-external-viewers): Remove old comments.
(filesets-which-command, filesets-get-quoted-selection)
(filesets-spawn-external-viewer): Use `shell-quote-argument'.  (Bug#61709)

(cherry picked from commit 7756e9c73611c25002a90194b4a32c23051cb234)

14 months agoDocument arguments to Eshell's built-in commands
Jim Porter [Wed, 16 Aug 2023 01:51:20 +0000 (18:51 -0700)]
Document arguments to Eshell's built-in commands

* lisp/eshell/em-unix.el (eshell/ln): LINK_NAME is required.

* lisp/eshell/esh-ext.el (eshell/addpath):
* lisp/eshell/esh-var.el (eshell/env): Improve help strings slightly.

* doc/misc/eshell.texi (Scripts): Explain $0, $1, etc.
(Dollars Expansion): Use "@dots{}" instead of "...".
(Built-ins, Tramp extensions, Extra built-in commands): Document
command-line arguments.

(cherry picked from commit 5c43ef86bf169a79b87bd082d2f884757f7c2efc)

14 months agoUse treesit-node-match-p in treesit-parent-until/while
Yuan Fu [Mon, 5 Feb 2024 03:26:42 +0000 (19:26 -0800)]
Use treesit-node-match-p in treesit-parent-until/while

* lisp/treesit.el (treesit-parent-until): Use treesit-node-match-p.
(treesit-parent-while): Update docstring.
* doc/lispref/parsing.texi (Retrieving Nodes): Update docstring.

(cherry picked from commit be6de56906f0d1c09a0fad4f5165d864dddbc3ee)

14 months agoImprove treesit-forward-sexp behavior for leaf nodes (bug#68899)
Yuan Fu [Sun, 4 Feb 2024 05:24:29 +0000 (21:24 -0800)]
Improve treesit-forward-sexp behavior for leaf nodes (bug#68899)

treesit-forward-sexp uses treesit--navigate-thing with 'restricted'
tactic.  In this tactic we don't move over the parent thing.  However,
this makes forward-sexp useless for symbols when point is in the
symbol rather than at the beginning of it: in that case, the symbol is
considered parent and treesit-forward-sexp won't move to the end of
it.

To solve that, we allow to move across the parent even in 'restricted'
mode if the parent is a leaf thing.

Here, "leaf thing" is defined as "doesn't have any child 'thing'
inside it".

* lisp/treesit.el (treesit--navigate-thing): Move over parent in
'restricted' tactic if the parent is a leaf thing.

(cherry picked from commit 9dbbf93a4a08f71cf5f2278ec2a22a722fe0e0f7)

14 months ago* lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-message-string`
Stefan Monnier [Sun, 4 Feb 2024 19:39:02 +0000 (14:39 -0500)]
* lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-message-string`

(cherry picked from commit b2d350cfc0bf8f0e3198bffcebe60a43341fb340)

14 months ago* src/lread.c (bytecode_from_rev_list): Fix assertion failure
Stefan Monnier [Sun, 4 Feb 2024 18:51:13 +0000 (13:51 -0500)]
* src/lread.c (bytecode_from_rev_list): Fix assertion failure

The assertion failure was raised at lread.c:411 during the
`lread-invalid-bytecodes` test in `test/src/lread-tests.el`.
I suspect we could remove the assertion instead.

(cherry picked from commit 7d3c3cad9392d3f8e59f85522053c249aff062e5)

14 months ago* src/lread.c (build_load_history): Be careful with in-place updates
Stefan Monnier [Sun, 4 Feb 2024 17:58:56 +0000 (12:58 -0500)]
* src/lread.c (build_load_history): Be careful with in-place updates

Don't leave a "broken" value in `Vcurrent_load_list`.

(cherry picked from commit 52abeaf1333427f156a23f0acf057e81bcc5e9e2)

14 months ago* src/window.c (set_window_buffer): Flush the `base_line_number` cache
Stefan Monnier [Sun, 4 Feb 2024 17:52:01 +0000 (12:52 -0500)]
* src/window.c (set_window_buffer): Flush the `base_line_number` cache

(cherry picked from commit a1aa9028f83e5d3da71bdb5877d8baa5d6c1e98a)

14 months ago(w->base_line_number): Rework the way we flush the cache
Stefan Monnier [Sun, 4 Feb 2024 17:50:55 +0000 (12:50 -0500)]
(w->base_line_number): Rework the way we flush the cache

* src/xdisp.c (BASE_LINE_NUMBER_VALID_P): New macro.
(try_scrolling): Use it.
(redisplay_window, Fformat_mode_line): Use it to flush the
base_line_number (if it's stale) once at the beginning.
(decode_mode_spec): Don't use (or set) `w->start` and
`w->base_line_number` when operating on another buffer!

(cherry picked from commit 57024e1e9314501b103a4d36b9b166761a2ad756)

14 months ago; Fix my last commit
Stefan Kangas [Sun, 4 Feb 2024 12:20:15 +0000 (13:20 +0100)]
; Fix my last commit

(cherry picked from commit a4587646fabf2b7f0cb19a7e0bee090f9106a73a)

14 months agoPrefer setq-local in more places
Stefan Kangas [Sun, 4 Feb 2024 12:16:59 +0000 (13:16 +0100)]
Prefer setq-local in more places

* lisp/erc/erc-compat.el (erc-set-write-file-functions):
* lisp/obsolete/iswitchb.el (iswitchb-minibuffer-setup-hook)
(iswitchb-minibuffer-setup):
* lisp/obsolete/longlines.el (longlines-mode):
* lisp/obsolete/rcompile.el (remote-compile):
* lisp/progmodes/cperl-mode.el (cperl-file-style):
* test/lisp/erc/erc-tests.el (erc-ring-previous-command):
Prefer setq-local.

(cherry picked from commit 70c10204f0025eac844a88b0ef85cfca44cff61c)

14 months agoPrevent cache of diff-mode buffers to grow without bounds
Mattias Engdegård [Sat, 3 Feb 2024 15:46:59 +0000 (16:46 +0100)]
Prevent cache of diff-mode buffers to grow without bounds

Previously, these " *diff-syntax:..." buffers were never removed.
Now we discard the least recently used half of them every hour.

* lisp/vc/diff-mode.el (diff--cached-revision-buffers)
(diff--cache-clean-interval, diff--cache-clean-timer, diff--cache-clean)
(diff--cache-schedule-clean, diff--get-revision-properties): New.
(diff-syntax-fontify-hunk): Use diff--get-revision-properties.

(cherry picked from commit 4d57187a248d3243dcc8b5da5d8365cb1b54a347)