]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agopeg-tests.el: Fix test failures
Stefan Monnier [Sat, 13 Apr 2024 19:35:46 +0000 (15:35 -0400)]
peg-tests.el: Fix test failures

* lisp/progmodes/peg.el (peg-parse): Refine heuristic since unknown
terminals are resolved at run-time rather than compile-time now.
(peg--macroexpand) <stack-action>: Avoid generating a `let` with an
empty body.
(peg--translate-rule-body): Adjust to name change of
`macroexp-warn-and-return` and the fact that it's always available.

* test/lisp/progmodes/peg-tests.el (peg-parse-string):
Add `indent` declaration.
(peg-test): Check that the compiler emits the warnings we expect.

(cherry picked from commit 7b94c6b00b287d2b69d466380a05de7e0ec21ee9)

12 months ago(define-globalized-minor-mode): Require the use of `run-mode-hooks`
Stefan Monnier [Sat, 13 Apr 2024 14:31:28 +0000 (10:31 -0400)]
(define-globalized-minor-mode): Require the use of `run-mode-hooks`

When `define-globalized-minor-mode` was introduced (Emacs-22),
`run-mode-hooks` was brand new, so we could not expect all major
modes to use it and we had to rely on brittle workarounds to try
and approximate `after-change-major-mode-hook`.

These workarounds have undesirable side effects, and (we hope)
they're not needed any more now that virtually all major modes
have been changed to use `run-mode-hooks` (or
`define-derived-mode`).

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Rely only on `after-change-major-mode-hook`, remove the "cmhh"
[typo for the intended "cmmh", BTW] workaround.

* doc/lispref/modes.texi (Mode Hooks): Clarify the importance of
`after-change-major-mode-hook` w.r.t `define-globalized-minor-mode`.
(Defining Minor Modes): Rewrite the explanation of which buffers
are affected, including adjusting it to the fact that
`fundamental-mode` has used run `run-mode-hooks` for last 10 years.

(cherry picked from commit 17e26cf57e18c5df2172a7049591d89fc53b3fb6)

12 months ago(define-globalized-minor-mode): Fix bug#58888
Stefan Monnier [Sat, 13 Apr 2024 14:10:19 +0000 (10:10 -0400)]
(define-globalized-minor-mode): Fix bug#58888

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode) <MODE-cmhh>:
Try and detect well-behaved modes so they're not affected by
those which require the cmhh hack.

(cherry picked from commit 3f7e26e2bed4ee7adab3a5d2bfa289517499e4c8)

12 months agolisp/emacs-lisp/track-changes.el: New file (bug#70077)
Stefan Monnier [Fri, 5 Apr 2024 21:37:32 +0000 (17:37 -0400)]
lisp/emacs-lisp/track-changes.el: New file (bug#70077)

This new package provides an API that is easier to use right than
our `*-change-functions` hooks.

The patch includes changes to `diff-mode.el` and `eglot.el` to
make use of this new package.

* lisp/emacs-lisp/track-changes.el: New file.
* test/lisp/emacs-lisp/track-changes-tests.el: New file.
* doc/lispref/text.texi (Tracking changes): New subsection.

* lisp/progmodes/eglot.el: Require `track-changes`.
(eglot--virtual-pos-to-lsp-position): New function.
(eglot--track-changes): New var.
(eglot--managed-mode): Use `track-changes-register` i.s.o
`after/before-change-functions` when available.
(eglot--track-changes-signal): New function, partly extracted from
`eglot--after-change`.
(eglot--after-change): Use it.
(eglot--track-changes-fetch): New function.
(eglot--signal-textDocument/didChange): Use it.

* lisp/vc/diff-mode.el: Require `track-changes`.
Also require `easy-mmode` before the `eval-when-compile`s.
(diff-unhandled-changes): Delete variable.
(diff-after-change-function): Delete function.
(diff--track-changes-function): Rename from `diff-post-command-hook`
and adjust to new calling convention.
(diff--track-changes): New variable.
(diff--track-changes-signal): New function.
(diff-mode, diff-minor-mode): Use it with `track-changes-register`.

(cherry picked from commit d7a83e23d47ca9e3e6ca70078e956e31301e5e6d)

12 months ago; Additional fixup for truncation of long lines in compilation buffers
Phil Sainty [Sat, 13 Apr 2024 12:49:56 +0000 (00:49 +1200)]
; Additional fixup for truncation of long lines in compilation buffers

* lisp/progmodes/compile.el
(compilation--insert-abbreviated-line): Handle long lines that end
in a newline.  (Bug#70236)

The fix in commit 8f93cba324e4d4022a9422b8c56186213ba2de8d resulted in
the previous "Don't hide the final newline" code causing an off-by-one
error.  With the new code the value of point is what is wanted in both
cases.

(cherry picked from commit f950621e6a177fc3110f3dec7c92b7d499fd25d6)

12 months ago; Fix coding style of last change to xdisp.c
Po Lu [Sat, 13 Apr 2024 12:07:17 +0000 (20:07 +0800)]
; Fix coding style of last change to xdisp.c

* src/xdisp.c (note_fringe_highlight): Stylistic edits.

(cherry picked from commit 66c44c3cd7b37712d5a923966f71a06bbf1fcdb8)

12 months ago; * src/window.c (shrink_mini_window): Revert inadvertent change.
Eli Zaretskii [Sat, 13 Apr 2024 11:45:15 +0000 (14:45 +0300)]
; * src/window.c (shrink_mini_window): Revert inadvertent change.

(cherry picked from commit 199351125a4b17081c5ae8056e61aeb3c33650d2)

12 months agoFix crash upon call to Fset_fontset_font after X server disconnect
Po Lu [Sat, 13 Apr 2024 11:43:40 +0000 (19:43 +0800)]
Fix crash upon call to Fset_fontset_font after X server disconnect

* src/image.c (free_image):

* src/xfaces.c (free_realized_face): Handle scenarios where
free_frame_faces is called with the display connection cut.

* src/xterm.c (x_free_frame_resources): Call free_frame_faces
unconditionally, lest fontsets for this dead frame contaminate
Vfontset_list and produce crashes afterwards.  (bug#66151)

(cherry picked from commit 9fc698479feef6fa660ff13e21619ea50bd404df)

12 months ago; Fix documentation of last change.
Eli Zaretskii [Sat, 13 Apr 2024 11:20:16 +0000 (14:20 +0300)]
; Fix documentation of last change.

* etc/NEWS:
* doc/lispref/display.texi (Other Display Specs):
* doc/lispref/text.texi (Special Properties): Fix last changes.

(cherry picked from commit 952f20fabe76c087aa96645389cfd4786fc95380)

12 months agoSupport tooltips for fringe indicators
Vladimir Kazanov [Sun, 24 Dec 2023 11:13:10 +0000 (11:13 +0000)]
Support tooltips for fringe indicators

* src/xdisp.c (note_fringe_highlight): New function.
(note_mouse_highlight): Call it when the mouse is on the fringes.
* src/frame.c (syms_of_frame) <left-fringe-help>
<right-fringe-help>: DEFSYM them.

* etc/NEWS:
* doc/lispref/text.texi (Special Properties):
* doc/lispref/display.texi (Other Display Specs): Document the new
properties.
* etc/TODO: Remove the todo item about this.

(cherry picked from commit 5734047b812639c06c90eb3baf82ff502db59fb5)

12 months ago; Improve documentation of tree-sitter "things"
Eli Zaretskii [Sat, 13 Apr 2024 08:52:57 +0000 (11:52 +0300)]
; Improve documentation of tree-sitter "things"

* doc/lispref/parsing.texi (User-defined Things): Fix text,
punctuation, and markup.
(Tree-sitter Major Modes): Add the missing "things" reference.

* etc/NEWS: Fix "thing"-related entries.

(cherry picked from commit 8b210a636fe426f47bccdb111af61d6310755dde)

12 months ago; Tweak "(emacs)Bug Reference" formatting/wording.
Basil L. Contovounesios [Sat, 13 Apr 2024 08:36:50 +0000 (10:36 +0200)]
; Tweak "(emacs)Bug Reference" formatting/wording.

(cherry picked from commit f0300fb0597225762ac6e62eeec4e223a7ad1df9)

12 months agoAllow 'help-quick' to use a non-global keymap
Philip Kaludercic [Thu, 11 Apr 2024 07:00:50 +0000 (09:00 +0200)]
Allow 'help-quick' to use a non-global keymap

* lisp/help.el (help-quick-sections): Mention
'help-quick-use-map' in docstring.
(help-quick-use-map): Add new variable, defaulting to the
global-map.
(help-quick): Use new variable.

(cherry picked from commit 6c721af9c8ee2229af57491cc2833f6743c8ddab)

12 months ago; Fix typo in 'help-quick-sections' docstring
Philip Kaludercic [Thu, 11 Apr 2024 06:44:46 +0000 (08:44 +0200)]
; Fix typo in 'help-quick-sections' docstring

(cherry picked from commit 5f6834ab9765943be07dfab6454c37375729f778)

12 months ago; * src/alloc.c (process_mark_stack): Fix commentary.
Eli Zaretskii [Sat, 13 Apr 2024 08:15:18 +0000 (11:15 +0300)]
; * src/alloc.c (process_mark_stack): Fix commentary.

(cherry picked from commit 02e795738b8877f6cf07f5ad2105449d7eb41000)

12 months agoMark Flymake regions more accurately in 'lua-ts-mode'
john muhl [Wed, 13 Mar 2024 13:35:08 +0000 (08:35 -0500)]
Mark Flymake regions more accurately in 'lua-ts-mode'

* lisp/progmodes/lua-ts-mode.el (lua-ts-flymake-luacheck): Use
the end position provided by Luacheck rather than relying on
'thing-at-point' to guess where the end should be.  (Bug#70167)

(cherry picked from commit d5d61618c89899bd082cd29fd81dfb7cd88ea8b8)

12 months agoFix Icalendar export with ISO dates
Eli Zaretskii [Sat, 13 Apr 2024 07:52:55 +0000 (10:52 +0300)]
Fix Icalendar export with ISO dates

* lisp/calendar/icalendar.el (icalendar--datestring-to-isodate):
Accept dashes in ISO-style numeric dates.  Patch by Erwan Hingant
<erwan.hingant@mailo.com>. (Bug#69894)

* test/lisp/calendar/icalendar-tests.el
(icalendar--datestring-to-isodate): Add a test for dashes in
ISO-style numeric dates.

(cherry picked from commit 71f8b2c3242b9b9455e9c6f25ad99ea900a1422f)

12 months agoFix task-switching failures on Android 2.3
Po Lu [Sat, 13 Apr 2024 03:28:23 +0000 (11:28 +0800)]
Fix task-switching failures on Android 2.3

* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow):
Don't specify F_A_MULTIPLE_TASK on Android 4.4 and earlier.

(cherry picked from commit 4fc37710788cdab9ebf4264636999ba999a59547)

12 months ago(elisp-tests-syntax-propertize): New test for bug#24542
Stefan Monnier [Sat, 13 Apr 2024 01:54:53 +0000 (21:54 -0400)]
(elisp-tests-syntax-propertize): New test for bug#24542

* test/lisp/progmodes/elisp-mode-tests.el (elisp-tests-syntax-propertize):
New test.

(cherry picked from commit e8adb8cf5a51ef172fb07786b71e3140b9358764)

12 months agorcs2log now groks add-log-time-zone rule
Paul Eggert [Fri, 12 Apr 2024 20:14:29 +0000 (13:14 -0700)]
rcs2log now groks add-log-time-zone rule

* lib-src/rcs2log (extractTZ): Adjust to renaming of
change-log-time-zone-rule to add-log-time-zone rule, by allowing
either spelling.

(cherry picked from commit c26261c027ef7594427d477208b8126d6e4982bd)

12 months ago(emacs-lisp-mode-syntax-table): Fix bug#24542
Stefan Monnier [Fri, 12 Apr 2024 17:28:45 +0000 (13:28 -0400)]
(emacs-lisp-mode-syntax-table): Fix bug#24542

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-syntax-table):
Remove `p` from the flags of `@`.

(cherry picked from commit 648b7bf7e22577c2f917e389694a76ce1f42dc0e)

12 months ago* lisp/buff-menu.el: Improve 'Buffer-menu-group-by-mode' (bug#70150).
Juri Linkov [Fri, 12 Apr 2024 16:39:49 +0000 (19:39 +0300)]
* lisp/buff-menu.el: Improve 'Buffer-menu-group-by-mode' (bug#70150).

(Buffer-menu-group-by): Replace function-item with const
better suitable for Customization UI.
(Buffer-menu-group-by-mode): Use 'mouse-buffer-menu-mode-groups'
to group buffers by mode.

(cherry picked from commit 5bd4d458676c458d6b534ea1c74cf6f0c1899ea6)

12 months agoNew user option 'tab-line-tabs-buffer-group-function'
Juri Linkov [Fri, 12 Apr 2024 16:35:55 +0000 (19:35 +0300)]
New user option 'tab-line-tabs-buffer-group-function'

* lisp/tab-line.el (tab-line-tabs-buffer-group-function):
Turn defvar into defcustom with the default value
'tab-line-tabs-buffer-group-by-mode'.
(tab-line-tabs-buffer-group-by-mode): New function with body from
'tab-line-tabs-buffer-group-name'.
(tab-line-tabs-buffer-group-by-project): New function.
(tab-line-tabs-buffer-groups): Use fallback name "No group" instead of "All".

(cherry picked from commit 414f8d02c1a361fa780e55fcf0f260fe00a9a62d)

12 months ago; * etc/NEWS: Fix typo.
Michael Albinus [Fri, 12 Apr 2024 13:51:26 +0000 (15:51 +0200)]
; * etc/NEWS: Fix typo.

(cherry picked from commit 2fc7e21f5e75ea6b00d6f7344335f44f5663d955)

12 months ago; Fix documentation of a recent change in dbus.el (bug#70301)
Eli Zaretskii [Fri, 12 Apr 2024 11:26:27 +0000 (14:26 +0300)]
; Fix documentation of a recent change in dbus.el (bug#70301)

* lisp/net/dbus.el (dbus-string-to-byte-array)
(dbus-byte-array-to-string):
* etc/NEWS:
* doc/misc/dbus.texi (Type Conversion): Fix documentation of these
two D-Bus functions.

(cherry picked from commit f93df59e8c9038a10992b71bfd6beeda70f806dd)

12 months ago; Skip commit 4ff852a5582be8d0ba16e598371ce359ba3d3cc6
Eshel Yaron [Sun, 14 Apr 2024 17:09:08 +0000 (19:09 +0200)]
; Skip commit 4ff852a5582be8d0ba16e598371ce359ba3d3cc6

12 months agoImprove D-Bus byte-array conversion
Michael Albinus [Fri, 12 Apr 2024 08:09:45 +0000 (10:09 +0200)]
Improve D-Bus byte-array conversion

* doc/misc/dbus.texi (Type Conversion): Adapt dbus-byte-array-to-string.

* etc/NEWS: D-Bus byte array conversion works over raw UTF-8 bytes.
Fix typos.

* lisp/net/dbus.el (dbus-string-to-byte-array)
(dbus-byte-array-to-string): BYTE-ARRAY must be an UTF-8 raw bytes
sequence.  Make optional argument MULTIBYTE obsolete.  (Bug#70301)
(dbus-call-method-handler, dbus-register-signal)
(dbus-escape-as-identifier): Use `length=' and `length>'.

* test/lisp/net/dbus-tests.el (dbus--test-method-handler)
(dbus-test09-get-managed-objects): Use `length='.
(dbus-test01-type-conversion): Extend test.

* test/lisp/net/secrets-tests.el (secrets-test03-items): Extend test.

(cherry picked from commit a69890eea946beb0858273a20d260a170485b79a)

12 months agoDisplay Info buffer after ensuring it contains text
Joseph Turner [Sat, 6 Apr 2024 01:32:36 +0000 (18:32 -0700)]
Display Info buffer after ensuring it contains text

* lisp/info.el (info-pop-to-buffer): Move display of Info buffer
to a later stage after its text contents is ready to display.
This helps to use fit-window-to-buffer in display-buffer-alist (bug#70213).

(cherry picked from commit 21775a936bd3838adaae38bd5c5ec776434736c1)

12 months ago; Improve documentation of completion commands
Eli Zaretskii [Thu, 11 Apr 2024 18:48:47 +0000 (21:48 +0300)]
; Improve documentation of completion commands

* doc/emacs/mini.texi (Completion Commands): Mention that '?' also
shows a couple of commands.

(cherry picked from commit 0fab2649e288c7a350018293443e709eba6b0fe2)

12 months agominibuffer-completion-help: Fix regression when END < EOB
Dmitry Gutov [Thu, 11 Apr 2024 17:33:16 +0000 (20:33 +0300)]
minibuffer-completion-help: Fix regression when END < EOB

Which can happen with in-buffer completion (though this scenario
is preffed off by default).

* lisp/minibuffer.el (minibuffer-completion-help): Include the
buffer contents after END into BASE-SUFFIX (bug#48356).

(cherry picked from commit 0284b296f2ee469e0edeba8bd043b4a813cfd977)

12 months agoetags-regen--tags-generate: Handle spaces in project root name
Eli Zaretskii [Thu, 11 Apr 2024 17:09:49 +0000 (20:09 +0300)]
etags-regen--tags-generate: Handle spaces in project root name

* lisp/progmodes/etags-regen.el (etags-regen--tags-generate):
Quote the tags file name (bug#70329).

(cherry picked from commit af57516ed8991ea6238f1ec4907f9ce751cadb27)

12 months agoFix file names with embedded whitespace in Ediff
Eli Zaretskii [Thu, 11 Apr 2024 16:14:56 +0000 (19:14 +0300)]
Fix file names with embedded whitespace in Ediff

* lisp/vc/ediff-ptch.el (ediff-patch-file-internal): Quote file
names that can include special characters.  (Bug#70329)

(cherry picked from commit bbe98eddf70200228dc50b58f26f53351604cf83)

12 months ago; * lisp/bindings.el (mode-line-mode-menu): Add Completion Preview.
Eli Zaretskii [Thu, 11 Apr 2024 16:04:25 +0000 (19:04 +0300)]
; * lisp/bindings.el (mode-line-mode-menu): Add Completion Preview.

(cherry picked from commit c4a8976d59aa4c9a325a6331b52ce329cb5de248)

12 months agoFix display of vscrolled windows
Eli Zaretskii [Thu, 11 Apr 2024 15:34:53 +0000 (18:34 +0300)]
Fix display of vscrolled windows

* src/xdisp.c (redisplay_window): Fix condition for resetting the
window's vscroll.  (Bug#70038)

(cherry picked from commit ea62a14ea3b7f3f6feb0c7c803eeabe3c8499276)

12 months agoDon't hide flymake diagnostics on empty first line (bug#70310)
Mattias Engdegård [Thu, 11 Apr 2024 11:55:39 +0000 (13:55 +0200)]
Don't hide flymake diagnostics on empty first line (bug#70310)

A diagnostic first in the buffer, typically the lexical cookie warning,
got lost if that line was empty.

* lisp/progmodes/elisp-mode.el (elisp-flymake--byte-compile-done):
Make sure the location interval doesn't go beyond the buffer bounds.

(cherry picked from commit b436f430e3897e1aa6dcb5a39564a3553bbf631f)

12 months ago; * etc/NEWS: Group JSON changes.
Mattias Engdegård [Thu, 11 Apr 2024 09:48:40 +0000 (11:48 +0200)]
; * etc/NEWS: Group JSON changes.

(cherry picked from commit fba8f3a6f1a8a099d93e70400d477ca6fe96007b)

12 months ago; * lisp/minibuffer.el (completion-base-suffix): Doc fix (bug#48356).
Eli Zaretskii [Thu, 11 Apr 2024 06:53:34 +0000 (09:53 +0300)]
; * lisp/minibuffer.el (completion-base-suffix): Doc fix (bug#48356).

(cherry picked from commit afc0aa3683568dc93469f636367f85e579ab2612)

12 months ago; Fix whitespace in editfns-tests.el
Eli Zaretskii [Thu, 11 Apr 2024 05:55:12 +0000 (08:55 +0300)]
; Fix whitespace in editfns-tests.el

* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): Fix whitespace.

(cherry picked from commit 5d35ef858a9a949f682ef7b5fc6c0eae9f415936)

12 months agoGuarantee presence of emacs-module.h during cross-compilation
Po Lu [Thu, 11 Apr 2024 02:31:17 +0000 (10:31 +0800)]
Guarantee presence of emacs-module.h during cross-compilation

* cross/Makefile.in (src/emacs-module.h): New rule.
(src/libemacs.so): Depend on the same.

(cherry picked from commit ad428e39d7380f091a487d58ee47e7b1c094b5f9)

12 months agoGuarantee presence of epaths.h during cross-compilation
Po Lu [Thu, 11 Apr 2024 02:25:29 +0000 (10:25 +0800)]
Guarantee presence of epaths.h during cross-compilation

* cross/Makefile.in (src/epaths.h): New rule.
(src/libemacs.so): Depend on the same.

(cherry picked from commit 3b6bc312f2383aaf275f1085621aaa593d18fc87)

12 months agoOptimize R8 configuration
Po Lu [Thu, 11 Apr 2024 02:15:25 +0000 (10:15 +0800)]
Optimize R8 configuration

* java/org/gnu/emacs/EmacsWindowManager.java (WindowConsumer):
Mark as package-local.

* java/proguard.conf: List only symbols that must be preserved,
enabling R8 to optimize the remainder.

(cherry picked from commit b9acfd7c2b9d1fa5c49e7bd9f78a040f7485b29b)

12 months agoAdjust priority of Emacs background service notification
Po Lu [Thu, 11 Apr 2024 01:11:44 +0000 (09:11 +0800)]
Adjust priority of Emacs background service notification

* java/org/gnu/emacs/EmacsService.java (onStartCommand): Reword
lightly and set importance to IMPORTANCE_LOW.

(cherry picked from commit 7720c614afcf2b657c1edd1901cdc688e372a53c)

12 months ago; * java/Makefile.in: Render config.status relative to builddir.
Po Lu [Thu, 11 Apr 2024 00:54:08 +0000 (08:54 +0800)]
; * java/Makefile.in: Render config.status relative to builddir.

(cherry picked from commit 2733329b46a4687ef9e3d260cb776391ded47f52)

12 months agoGeneralize the file-name specific workaround in minibuffer-completion-help
Dmitry Gutov [Thu, 11 Apr 2024 00:57:09 +0000 (03:57 +0300)]
Generalize the file-name specific workaround in minibuffer-completion-help

* lisp/minibuffer.el (completion-base-suffix):
New function (bug#48356).
(minibuffer-completion-help): Use it here.
(minibuffer-completion-help): Cut off the double completion
boundary when it occurs inside
completion-list-insert-choice-function..

(cherry picked from commit 0288bc6c949e82f72790a60d067da31428ca433a)

12 months agoSuppress bogus messages in the echo area
Arash Esbati [Wed, 10 Apr 2024 21:05:39 +0000 (23:05 +0200)]
Suppress bogus messages in the echo area

* lisp/textmodes/reftex-dcr.el (reftex-view-crossref-when-idle):
Check if point inside a mandatory argument where the cite/ref key
usually resides.  For example, with \cite[45]{emacs:30} and point
on 4, the following bogus message in the echo area is suppressed:
"cite: no such database entry: \cite[45]".  (bug#38258)
Fix docstring.

(cherry picked from commit ca528f7c6ac9b907564298bc96663579d09f9434)

12 months ago; * doc/emacs/files.texi (Backup): Clarify "saving" (bug#70326).
Eli Zaretskii [Wed, 10 Apr 2024 19:31:57 +0000 (22:31 +0300)]
; * doc/emacs/files.texi (Backup): Clarify "saving" (bug#70326).

(cherry picked from commit 4cefa3c0b1f7270ca5317caa02101a0257595b9c)

12 months ago; Improve documentation of 'world-clock'
Eli Zaretskii [Wed, 10 Apr 2024 13:52:21 +0000 (16:52 +0300)]
; Improve documentation of 'world-clock'

* lisp/time.el (zoneinfo-style-world-list)
(legacy-style-world-list): Doc fixes.

(cherry picked from commit db7b571aaaf4aa16fc6a88a53a8740c3a102ce60)

12 months ago* doc/emacs/misc.texi (emacsclient Options): Suggest forwarding sockets.
Peter Oliver [Wed, 10 Apr 2024 08:42:39 +0000 (10:42 +0200)]
* doc/emacs/misc.texi (emacsclient Options): Suggest forwarding sockets.

(Bug#66667)

(cherry picked from commit 6a0bb7beae3ed4e3d2b420b73abcfaada38f53ee)

12 months agoUpdate go-ts-mode to support latest tree-sitter-go grammar
Yuan Fu [Tue, 9 Apr 2024 03:20:25 +0000 (20:20 -0700)]
Update go-ts-mode to support latest tree-sitter-go grammar

tree-sitter-go changed method_spec to method_elem in
https://github.com/tree-sitter/tree-sitter-go/commit/b82ab803d887002a0af11f6ce63d72884580bf33

* lisp/progmodes/go-ts-mode.el:
(go-ts-mode--method-elem-supported-p): New function.
(go-ts-mode--font-lock-settings): Conditionally use method_elem or
method_spec in the query.

(cherry picked from commit 859b4227e3de9f8e7bc26367540aa315cefc37dc)

12 months agoFix c++-ts-mode defun navigation (bug#65885)
Yuan Fu [Tue, 9 Apr 2024 04:07:11 +0000 (21:07 -0700)]
Fix c++-ts-mode defun navigation (bug#65885)

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add BOL and EOL marker
in the regexp.

(cherry picked from commit 407e85ce139c2f0ab8bc7f9643ee7506a4e561a1)

12 months ago; Fix last change.
Eli Zaretskii [Sun, 7 Apr 2024 07:33:14 +0000 (10:33 +0300)]
; Fix last change.

(cherry picked from commit aca5064f128e20a495e9ddf254248ab77b613754)

12 months ago; * etc/PROBLEMS: An entry about focus issues with XFCE (bug#70046).
Eli Zaretskii [Sun, 7 Apr 2024 07:32:47 +0000 (10:32 +0300)]
; * etc/PROBLEMS: An entry about focus issues with XFCE (bug#70046).

(cherry picked from commit 55aab2d471024bda1878897e81e3b5695e242f09)

12 months ago; * doc/emacs/misc.texi (emacsclient Options): Fix typo. (Bug#70238)
Michael Albinus [Sun, 7 Apr 2024 07:15:42 +0000 (09:15 +0200)]
; * doc/emacs/misc.texi (emacsclient Options): Fix typo.  (Bug#70238)

(cherry picked from commit 19cee16576ef09990ac14d1ec5f0ddcd4594f5ce)

12 months ago; * src/filelock.c (Flock_file): Doc fix (bug#70216).
Eli Zaretskii [Sun, 7 Apr 2024 06:24:58 +0000 (09:24 +0300)]
; * src/filelock.c (Flock_file): Doc fix (bug#70216).

(cherry picked from commit 2a41b6ba51457448b3937fbb1d9e06f62c3d5a9f)

12 months ago(completion-preview-prev-candidate): add numeric prefix argument
Eshel Yaron [Fri, 12 Apr 2024 21:19:13 +0000 (23:19 +0200)]
(completion-preview-prev-candidate): add numeric prefix argument

* lisp/completion-preview.el (completion-preview-prev-candidate):
Add numeric prefix argument N.
(completion-preview-next-candidate): Update documentation.

12 months ago; Fix Completion Preview mode mouse-click bindings
Eshel Yaron [Sun, 14 Apr 2024 07:21:03 +0000 (09:21 +0200)]
; Fix Completion Preview mode mouse-click bindings

* lisp/completion-preview.el (completion-preview--ignore): New
internal command.
(completion-preview--internal-commands): Add it.
(completion-preview--mouse-map): Use it to fix bindings.

12 months agoNew command 'completion-preview-complete'
Eshel Yaron [Fri, 12 Apr 2024 20:41:10 +0000 (22:41 +0200)]
New command 'completion-preview-complete'

This command completes the symbol at point up to the longest
common prefix of all completions candidates.  We also add an
indication of the longest common prefix in the completion
preview by highlighting that part of the preview with the
'completion-preview-exact' face.  To facilitate these features
we change the way we store the completion candidates while the
preview is visible, to explicitly keep the common prefix along
with a list of its suffixes.

* lisp/completion-preview.el (completion-preview--try-table):
Return longest common prefix and list of suffixes instead of
list of full candidates.  Add illustrative comment.
(completion-preview--capf-wrapper, completion-preview--update)
(completion-preview--show, completion-preview-insert)
(completion-preview-next-candidate): Adjust.
(completion-preview-common): New face.
(completion-preview-exact): Tweak to distinguish it from
'completion-preview-common'.
(completion-preview-complete): New command.
(completion-preview-active-mode-map): Bind it.
(completion-preview-mode): Mention it in docstring.
(completion-preview-commands): Add 'completion-preview-complete'.
(completion-preview--make-overlay): Simplify.
(completion-preview--internal-command-p): Remove.
(completion-preview-require-certain-commands): Update.
(completion-preview--inhibit-update): New inline function.
(completion-preview--inhibit-update-p): New local variable.
(completion-preview--post-command, completion-preview-hide):
Reset it to nil.

* test/lisp/completion-preview-tests.el
(completion-preview-tests--check-preview): Check the 'face'
property of both the first and last character.  Update callers.
(completion-preview-insert-calls-exit-function)
(completion-preview-complete): New tests.

12 months ago; Optimize 'completion-preview--try-table'
Eshel Yaron [Thu, 11 Apr 2024 17:16:26 +0000 (19:16 +0200)]
; Optimize 'completion-preview--try-table'

* lisp/completion-preview.el (completion-preview-completion-styles):
New variable.  Default to only include the 'basic' completion style.
(completion-preview--try-table): Let-bind 'completion-styles' when
calling 'completion-all-completions'.  With the default value of
'completion-preview-completion-styles', this yields a significant
performance improvement (up to 4 times faster compared to the
'substring' style when tested with 'elisp-completion-at-point').

Suggested by Ergus <spacibba@aol.com>

12 months ago; Remove obsolete 'mouse-wheel-up/down-event' bindings
Eshel Yaron [Wed, 10 Apr 2024 19:55:38 +0000 (21:55 +0200)]
; Remove obsolete 'mouse-wheel-up/down-event' bindings

Following commit e720ba62193 'mouse-wheel-up-event' and
'mouse-wheel-down-event' are translated to 'wheel-up/down'
events, so we only need to bind 'wheel-down/up' in
'completion-preview--mouse-map'.

* lisp/completion-preview.el: Don't require 'mwheel'.
(completion-preview--mouse-map): Remove bindings for
'mouse-wheel-up/down-event'.

(cherry picked from commit 3a91186ad3707c7e3754616f1c7a2735d40fc33d)

12 months ago* doc/lispref/parsing.texi (Parsing Program Source): Fix menu.
Juri Linkov [Wed, 10 Apr 2024 18:07:21 +0000 (21:07 +0300)]
* doc/lispref/parsing.texi (Parsing Program Source): Fix menu.

Add the new node "User-defined Things" to the menu.

(cherry picked from commit 103a2fdf18d99c872e4adb01a15a8300164acd66)

12 months ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr-type-p): Improve last change.
Andrea Corallo [Wed, 10 Apr 2024 16:45:47 +0000 (18:45 +0200)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-type-p): Improve last change.

(cherry picked from commit 3eb462405e541175df99974cc06395bf191d412a)

12 months ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr-type-p): New function.
Andrea Corallo [Wed, 10 Apr 2024 16:15:12 +0000 (18:15 +0200)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-type-p): New function.

(cherry picked from commit ee03a73375796feea94bb066cff7d7de680cae32)

12 months ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Simplify.
Andrea Corallo [Wed, 10 Apr 2024 16:03:26 +0000 (18:03 +0200)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Simplify.

(cherry picked from commit d4d8575bf00bb722bbb913fa5aa5b68c6dbef4d3)

12 months ago* lisp/emacs-lisp/comp-cstr.el (comp-cstr-fixnum-p): Fix.
Andrea Corallo [Wed, 10 Apr 2024 15:35:08 +0000 (17:35 +0200)]
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-fixnum-p): Fix.

(cherry picked from commit 219b98916bc498bf15bbef6577af648834d4727d)

12 months ago(en/decode_coding_object): Fix `after-change-functions`
Stefan Monnier [Wed, 10 Apr 2024 16:15:26 +0000 (12:15 -0400)]
(en/decode_coding_object): Fix `after-change-functions`

For `en/decode-coding-string/region`, `after-change-functions`
were either not run at all, or run only after deleting the text
but not after inserting it.

* src/coding.c (decode_coding_object, encode_coding_object): Run the
after-change-functions after inserting the result.

* test/src/editfns-tests.el (sanity-check-change-functions-with-op):
New macro.
(sanity-check-change-functions-errors): New function.
(editfns-tests--before/after-change-functions): Use them to add
cases for `en/decode-coding-string/region`.

(cherry picked from commit 36cb16556c60bf4e703764eefd4fb6668ccc37cc)

12 months ago* java/Makefile.in (classes.dex): Make proguard.conf relative to srcdir.
Po Lu [Wed, 10 Apr 2024 15:22:38 +0000 (23:22 +0800)]
* java/Makefile.in (classes.dex): Make proguard.conf relative to srcdir.

(cherry picked from commit 15bafc04322e9c4e85a00fe593239935eb723b6e)

12 months ago* java/proguard.conf: New file.
Po Lu [Wed, 10 Apr 2024 14:33:33 +0000 (22:33 +0800)]
* java/proguard.conf: New file.

(cherry picked from commit 049bdfdaec4ee0c791fbf034b683e06ee84ce1db)

12 months agoOptimize generated Android DEX bytecode
Po Lu [Wed, 10 Apr 2024 14:33:08 +0000 (22:33 +0800)]
Optimize generated Android DEX bytecode

* configure.ac (D8): Attempt to locate the bundle where d8 is
installed, detect whether an installation of `r8' is similarly
present, and use this installation in place of d8 if so.

* java/Makefile.in (ANDROID_MIN_SDK, IS_D8_R8): New
substitutions.
(classes.dex): Provide --min-api, --debug or --release and
--pg-conf to d8 or r8.

(cherry picked from commit ed88bed3afbc9922f020cf3a8803e08f2811e89b)

12 months agoFix 'format-seconds' when all values are zero and %z is used
Eli Zaretskii [Wed, 10 Apr 2024 14:00:34 +0000 (17:00 +0300)]
Fix 'format-seconds' when all values are zero and %z is used

* lisp/calendar/time-date.el (format-seconds): Fix all-zero time.

* test/lisp/calendar/time-date-tests.el (test-format-seconds): Add
two new tests.  (Bug#70322)

(cherry picked from commit 33516970808a6c50709325edfc1af125c2b2c401)

12 months ago* lisp/emacs-lisp/cl-macs.el (cl-typep): Add docstring.
Andrea Corallo [Wed, 10 Apr 2024 13:27:46 +0000 (15:27 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl-typep): Add docstring.

(cherry picked from commit f4711811298b320ea6875e635a7346f3bc23a603)

12 months agoRecognize Android TLS certificates by default
Po Lu [Wed, 10 Apr 2024 04:12:33 +0000 (12:12 +0800)]
Recognize Android TLS certificates by default

* lisp/net/gnutls.el (gnutls-trustfiles): Append directories
holding system and user-provided certificates on Android.

(cherry picked from commit f2f13fa630bd2658ea3f90c4362fe6201d32e67e)

12 months ago(cl--describe-class-slots): Avoid cryptic `t` type
Stefan Monnier [Tue, 9 Apr 2024 22:33:01 +0000 (18:33 -0400)]
(cl--describe-class-slots): Avoid cryptic `t` type

* lisp/emacs-lisp/cl-extra.el (cl--describe-class-slots): Use the empty
string for the trivial `t` type.

* lisp/emacs-lisp/cl-preloaded.el (cl-structure-class):
Fix non-existing `bool` => `boolean`.

(cherry picked from commit dd6b9c9426c5d7dde66974c5790815c3520a755b)

12 months ago; Minor copy edits
Dmitry Gutov [Tue, 9 Apr 2024 19:40:14 +0000 (22:40 +0300)]
; Minor copy edits

(cherry picked from commit 73bd48de3cf45de02c0f1caf5bd5196f4d4b08f5)

12 months agoAdd Flymake backend to rust-ts-mode using Clippy
Dmitry Gutov [Tue, 9 Apr 2024 19:39:32 +0000 (22:39 +0300)]
Add Flymake backend to rust-ts-mode using Clippy

* lisp/progmodes/rust-ts-mode.el (rust-ts-flymake-command):
New option (bug#70260).
(rust-ts--flymake-proc): New variable.
(rust-ts-flymake--helper): New function.
(rust-ts-flymake): New function.
(rust-ts-mode): Add it to flymake-diagnostic-functions.

(cherry picked from commit ccced8c3e4323b9c3d24b2480fc7b8df946fce88)

12 months ago(test-replace-match-modification-hooks): Delete test
Stefan Monnier [Tue, 9 Apr 2024 15:01:36 +0000 (11:01 -0400)]
(test-replace-match-modification-hooks): Delete test

* test/src/search-tests.el (test-replace-match-modification-hooks):
Delete, this is testing a functionality we can't really support.

(cherry picked from commit e3861aeb484c59c36b2448e17b54a37d779f6486)

12 months ago(mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events
Stefan Monnier [Mon, 29 Jan 2024 14:35:09 +0000 (09:35 -0500)]
(mouse-wheel-buttons): Map old-style wheel buttons to actual wheel events

Change the handling of the old X11 convention that uses mouse-4/5/6/7
events to represent wheel events: instead of asking downstream
packages to use the `mouse-wheel-*-event` variables to know which events
represent wheel events, use new var `mouse-wheel-buttons` to directly
convert those events into the standard `wheel-up/down/left/right` events
used everywhere else.

This will simplify the work of packages which can thus just bind their
commands to `wheel-up/down/left/right`.

* lisp/mouse.el (mouse-wheel-buttons): New custom variable.

* src/keyboard.c (make_lispy_event): Adjust for "wheel-clicks" on the tab-bar.
* src/xterm.c (x_construct_mouse_click): Add `xi2` argument and
obey `mouse-wheel-buttons` variable.
(handle_one_xevent): Adjust calls accordingly.
(syms_of_xterm): Define the `mouse-wheel-buttons` and the
`wheel-up/down/left/right`symbols.

* lisp/xt-mouse.el: Don't require `mwheel` any more.
(xterm-mouse--same-button-p): Delete function.
(xterm-mouse--read-event-sequence): Use `mouse-wheel-buttons`.

* lisp/mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Make obsolete.
(mouse-wheel-obey-old-style-wheel-buttons): Delete variable.

* lisp/completion-preview.el (completion-preview--mouse-map):
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/edmacro.el (edmacro-fix-menu-commands): Silence warnings.

(cherry picked from commit e720ba6219394d275dd741c5f17feea1ee0bf9af)

12 months agoMove over optional arguments in parentheses correctly
Arash Esbati [Tue, 9 Apr 2024 12:08:17 +0000 (14:08 +0200)]
Move over optional arguments in parentheses correctly

* lisp/textmodes/reftex-parse.el (reftex-move-to-previous-arg):
Recognize ')' as closing delimiter for optional argument.
Fix docstring.
(reftex-what-macro): Identify LaTeX macros with optional arguments
in parentheses correctly.  This is necessary to make
`reftex-view-crossref' work with biblatex on entries like:
\parencites(Glob.Pre)(Glob.Post)[Pre][Post]{key1}[Pre][Post]{key2}
(bug#31132)

(cherry picked from commit 7236010d2e1d3525943bb50598d29061a4c25b58)

12 months agoInhibit flymake lexical cookie warning in *scratch* (bug#70068)
Mattias Engdegård [Mon, 8 Apr 2024 17:07:19 +0000 (19:07 +0200)]
Inhibit flymake lexical cookie warning in *scratch* (bug#70068)

Add a hack to prevent flymake from complaining about a missing lexical
cookie when enabled in *scratch*.

* lisp/emacs-lisp/bytecomp.el
(bytecomp--inhibit-lexical-cookie-warning): New variable.
(byte-compile-file): Use it to gate the warning.
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile):
Set the inhibitor when spawning a check in lisp-interaction-mode.

(cherry picked from commit cda5155c618d774810ce5e044efe1101846054ac)

12 months ago; Avoid byte-compiler warnings in 'ls-lisp-test-bug70271'.
Eli Zaretskii [Tue, 9 Apr 2024 08:01:52 +0000 (11:01 +0300)]
; Avoid byte-compiler warnings in 'ls-lisp-test-bug70271'.

(cherry picked from commit 2c6eb49fa2d62fc07ccecdd1c074235064bf5375)

12 months agoFix misalignment of entries created by Dired file operations
Po Lu [Tue, 9 Apr 2024 07:24:30 +0000 (15:24 +0800)]
Fix misalignment of entries created by Dired file operations

* lisp/dired.el (dired-insert-directory): Insert leading space
if absent before calling dired-align-file.

(cherry picked from commit 22386c5634ba72d4f7b321524509c1e3549fe4d2)

12 months agoFix window-point-context-set and window-point-context-use (bug#33871)
Juri Linkov [Tue, 9 Apr 2024 06:43:55 +0000 (09:43 +0300)]
Fix window-point-context-set and window-point-context-use (bug#33871)

* lisp/window.el (window-point-context-set)
(window-point-context-use): Add 'window-buffer' for 'buffer-name'.

(cherry picked from commit b31f7e67de52c276dd1bcb6fbd048ef12435a327)

12 months ago; * etc/NEWS: Announce new ls-lisp options. (Bug#70721)
Eli Zaretskii [Tue, 9 Apr 2024 03:28:49 +0000 (06:28 +0300)]
; * etc/NEWS: Announce new ls-lisp options.  (Bug#70721)

(cherry picked from commit 677bc276998de0a467803b35134925d833d1ab9d)

12 months ago; Fix the test in last change.
Eli Zaretskii [Tue, 9 Apr 2024 03:21:38 +0000 (06:21 +0300)]
; Fix the test in last change.

(cherry picked from commit 93576969c2b53ff9d0d7b08768782e770f0cb0f4)

12 months agoSupport more long time options in 'ls-lisp'
Lin Sun [Mon, 8 Apr 2024 06:59:21 +0000 (06:59 +0000)]
Support more long time options in 'ls-lisp'

* lisp/ls-lisp.el (ls-lisp--sanitize-switches): Support '--time'
and '--sort=time'.  (Bug#70271)

* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug70271): New
test case.

(cherry picked from commit a4c766e057b9b05685433db010b6536148f29f1d)

12 months agoImprove treatment of aborted touch events in Speedbar and elsewhere
Po Lu [Tue, 9 Apr 2024 02:37:47 +0000 (10:37 +0800)]
Improve treatment of aborted touch events in Speedbar and elsewhere

* lisp/dframe.el (dframe-popup-kludge): Mark as a
mouse-1-menu-command.

* lisp/touch-screen.el (touch-screen-handle-point-up): New
argument CANCELED.  Implement specific responses to cancellation
for each tool state.
(touch-screen-handle-touch): Adjust to match.

(cherry picked from commit 64eb4ce0af80b840c7b1da137e4323a3d06062fa)

12 months agoDisable tab-bar by default in Speedbar frames
Po Lu [Tue, 9 Apr 2024 02:00:42 +0000 (10:00 +0800)]
Disable tab-bar by default in Speedbar frames

* lisp/speedbar.el (speedbar-frame-parameters): Set
tab-bar-lines to 0.

(cherry picked from commit 9e22cd30ebd68326c26a6e511d3722bdb5b9164c)

12 months ago(completion-hilit-commonality): Support `completion-lazy-hilit`
Daniel Mendler [Thu, 4 Apr 2024 05:19:58 +0000 (07:19 +0200)]
(completion-hilit-commonality): Support `completion-lazy-hilit`

* lisp/minibuffer.el (completion-hilit-commonality): Support lazy
completion candidate highlighting via `completion-lazy-hilit`.

(cherry picked from commit f30801a20338cdc7716c3eff1443f1be603aa94e)

12 months agoImprove documentation of Text Mode
Eli Zaretskii [Mon, 8 Apr 2024 18:02:01 +0000 (21:02 +0300)]
Improve documentation of Text Mode

* doc/emacs/text.texi (Text Mode): Improve indexing.  Document
'text-mode-ispell-word-completion'.

(cherry picked from commit 6c9855d3364b4e9b18d436aa1d6490e004d05d7b)

12 months ago(cl--describe-class): Improve based on dicussion in bug#70077
Stefan Monnier [Mon, 8 Apr 2024 17:59:33 +0000 (13:59 -0400)]
(cl--describe-class): Improve based on dicussion in bug#70077

* lisp/emacs-lisp/cl-extra.el (cl--describe-class): Move docstring
after the class' slots.
(cl--describe-class-slots): Buttonize the types.

(cherry picked from commit dc5fe95a48f5bff5dfac8841d05c66b300b09aab)

12 months ago; * lisp/align.el: Remove unnecessary :group keywords. (bug#70262)
Arash Esbati [Sun, 7 Apr 2024 19:12:05 +0000 (21:12 +0200)]
; * lisp/align.el: Remove unnecessary :group keywords. (bug#70262)

(cherry picked from commit 600ac35cc6597b63306786bffd0d762f70555322)

12 months ago(define-globalized-minor-mode): Fix bug#69431
Stefan Monnier [Mon, 8 Apr 2024 12:18:31 +0000 (08:18 -0400)]
(define-globalized-minor-mode): Fix bug#69431

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
When `after-change-major-mode-hook` runs, enable the mode only
in the current buffer and not in other pending buffers.

(cherry picked from commit 9506b9392e8c3548b769d9951a1c9d4abad9ee21)

12 months agoUpdate INSTALL for native compilation of Lisp files
Stephen Berman [Mon, 8 Apr 2024 11:56:56 +0000 (13:56 +0200)]
Update INSTALL for native compilation of Lisp files

* INSTALL: Add section "Native compilation of Lisp files" under
ADDITIONAL DISTRIBUTION FILES and correspondingly augment item 6
of DETAILED BUILDING AND INSTALLATION.  In the latter also note
differences between in-source-tree and out-of-tree builds for
running 'src/emacs' uninstalled.

(cherry picked from commit b9b2bc7192e75e0208c064e44cb4afc418ec3d28)

12 months ago* Make comp ignore EIEIO classes (bug#70141)
Andrea Corallo [Mon, 8 Apr 2024 09:21:37 +0000 (11:21 +0200)]
* Make comp ignore EIEIO classes (bug#70141)

* lisp/emacs-lisp/comp-cstr.el (comp--all-classes): Ignore EIEIO classes.

(cherry picked from commit c9d7721db6eeda8efa7b5a49c9a4bcaacd078791)

12 months ago* Fix out of date comp pass names in comp-tests.el
Andrea Corallo [Mon, 8 Apr 2024 08:46:50 +0000 (10:46 +0200)]
* Fix out of date comp pass names in comp-tests.el

* test/src/comp-tests.el (comp-tests-tco, comp-tests-fw-prop-1)
(comp-tests-pure): Update out of date pass names.

(cherry picked from commit 4d486bd378b409c2a96b3e9af36534aa8eb5b3af)

12 months agoDocument tree-sitter things feature (bug#70016) (bug#68824)
Yuan Fu [Sun, 7 Apr 2024 22:59:48 +0000 (15:59 -0700)]
Document tree-sitter things feature (bug#70016) (bug#68824)

* doc/lispref/parsing.texi (Retrieving Nodes): Mention new kinds of
predicate argument that the tree-traversing functions accept (which are
thing symbols and thing definitions).
(User-defined Things): New node dedicated to thing definition and
navigation functions.

(cherry picked from commit 4efe3b99a5d0d72b6a96bf339601f9390ca5c03a)

12 months agoMake tree-sitter thing feature public and remove obsolete functions
Yuan Fu [Sun, 7 Apr 2024 20:33:31 +0000 (13:33 -0700)]
Make tree-sitter thing feature public and remove obsolete functions

* lisp/treesit.el (treesit--things-around): Remove function.
(treesit-forward-sexp):
(treesit-beginning-of-thing):
(treesit-end-of-thing):
(treesit-navigate-thing):
(treesit-thing-at-point):
(treesit-outline-search): Use public version of thing-functions.
(treesit--thing-prev):
(treesit--thing-next):
(treesit--thing-at):
(treesit--navigate-thing): Make public.

* test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Use
public version of thing-functions.

(cherry picked from commit 64854869ae0cacddb16926670e2a67c03a3f9618)

12 months agoFix invisible erc-speedbar cursor in text terminals
F. Jason Park [Sun, 31 Mar 2024 23:32:44 +0000 (16:32 -0700)]
Fix invisible erc-speedbar cursor in text terminals

* lisp/erc/erc-speedbar.el
(erc-speedbar--reset-last-ran-on-timer): Use `with-current-buffer'
instead of `setf' and `buffer-local-value'.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable)
(erc-speedbar-toggle-nicknames-window-lock): Revise doc string.
(erc-speedbar-toggle-nicknames-window-lock): Set `cursor-type' in
speedbar buffer.
(erc-nickbar-toggle-nicknames-window-lock): New function alias.  Note
that this name flouts traditional library namespacing conventions.
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Use
`cursor-type' instead of `internal-show-cursor'.  (Bug#63595)

(cherry picked from commit ee377aaddf9d73116b93c3d54b1ffef9a3a8b925)

12 months agoAllow updating of /IGNORE timeouts in ERC
F. Jason Park [Mon, 1 Apr 2024 22:27:47 +0000 (15:27 -0700)]
Allow updating of /IGNORE timeouts in ERC

* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string.  Add new optional
`timespec' parameter, primarily to aid in testing.  Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output.  Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one.  Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;;   (and (equal (car a) (car b))
;;        (eq (buffer-local-value 'erc-server-process (cadr a))
;;            (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test.  (Bug#70127)

(cherry picked from commit e0df2841fb78251d5461a17e2d9be581c152bdc2)

12 months ago; * lisp/erc/erc-nicks.el: Fix typo in Commentary.
F. Jason Park [Mon, 1 Apr 2024 15:14:52 +0000 (08:14 -0700)]
; * lisp/erc/erc-nicks.el: Fix typo in Commentary.

(cherry picked from commit c1266d355a2801271f2f875a1f7d47030c6c0e7a)

12 months ago(Freplace_match): Fix bug#65451
Stefan Monnier [Sun, 7 Apr 2024 18:16:38 +0000 (14:16 -0400)]
(Freplace_match): Fix bug#65451

* src/search.c (Freplace_match): For ordering of *-change-functions.

* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): New test.
(sanity-check--message, sanity-check-change-functions-error)
(sanity-check-change-functions-check-size)
(sanity-check-change-functions-before)
(sanity-check-change-functions-after): New functions.
(sanity-check--verbose, sanity-check-change-functions-beg)
(sanity-check-change-functions-end)
(sanity-check-change-functions-buffer-size)
(sanity-check-change-functions-errors): New vars.

(cherry picked from commit 63588775fcb64e4fd88a97e0882aae38c9f5fb1c)