Michael Albinus [Sat, 15 Mar 2025 11:43:35 +0000 (12:43 +0100)]
; Minor Tramp changes
* doc/misc/tramp.texi (Top): Add Key Index to menu.
(Key Index): New node.
* lisp/net/tramp-cmds.el (tramp-dired-buffer-command-completion-p):
New defun.
(tramp-dired-find-file-with-sudo): Add property
`completion-predicate'.
(cherry picked from commit
4b8b7bb5cfc27b88fdf892a87931f5b89ff8c4a3)
Eli Zaretskii [Sat, 15 Mar 2025 11:42:12 +0000 (13:42 +0200)]
Fix 'whitespace-mode' in CJK locales
* lisp/international/characters.el (ambiguous-width-chars): Remove
U+00A4 and U+00B7 from the list of ambiguous-width characters.
(cjk-ambiguous-chars-are-wide): Doc fix. (Bug#76852)
(cherry picked from commit
1a8fbf69e3378996e633cf299b6a2d0716722d86)
Sean Whitton [Sat, 15 Mar 2025 11:32:35 +0000 (19:32 +0800)]
; Touch up tramp-*-with-sudo documentation, add FIXMEs
* doc/emacs/dired.texi (Dired Visiting):
* doc/emacs/files.texi (Reverting):
* doc/misc/tramp.texi (Ad-hoc multi-hops):
* etc/NEWS:
* lisp/net/tramp-cmds.el (tramp-revert-buffer-with-sudo)
(tramp-dired-find-file-with-sudo): Touch up documentation of
these features. Add FIXMEs about renaming the two commands.
(cherry picked from commit
a57e9f45db6007bdb4af21a444f0ed62d1b2010e)
Phil Sainty [Tue, 18 Feb 2025 12:02:22 +0000 (01:02 +1300)]
; * lisp/so-long.el: Documentation
(cherry picked from commit
87f9c09ab5fbfa9652aabe2799df654456d5e04c)
Phil Sainty [Tue, 18 Feb 2025 12:07:04 +0000 (01:07 +1300)]
; * lisp/so-long.el: Backwards-compatibility fix for Emacs < 30
We support Emacs 24.4 and later (for ELPA releases), so revert the
change from commit
7705bdfa5b89f78dab049f73f636b9680a3c12bc
(cherry picked from commit
25eabcde0d6ec7d8c161c2e05a5600b1c22fa43d)
Phil Sainty [Thu, 9 Jan 2025 08:21:55 +0000 (21:21 +1300)]
; * lisp/so-long.el: Backwards-compatibility fix for Emacs < 27
We support Emacs 24.4 and later (for ELPA releases), and ad-find-advice
only changed from a macro to a function in Emacs 27, so this change is
to restore compatibility with older versions where we do need the macro
definition loaded at byte-compilation time.
This effectively combines the related changes from:
- commit
986c12b20fa29c37f13563846fddf6edcd0b4945
- commit
c221db0402031c23b983eea3a6bc129e5abb98f6
(cherry picked from commit
03a6d5a76331e814368f17a61718208242e44bee)
Eli Zaretskii [Sat, 15 Mar 2025 09:48:36 +0000 (11:48 +0200)]
; Improve documentation of 'gui-get-selection' use on X
* doc/lispref/frames.texi (Window System Selections):
* lisp/select.el (gui-get-selection): Suggest to use an explicit
DATA-TYPE when calling 'gui-get-selection'.
(cherry picked from commit
01c03043e6e93dd12570a960ca54108d543578db)
Michael Albinus [Sat, 15 Mar 2025 08:57:39 +0000 (09:57 +0100)]
* lisp/bindings.el (tramp-revert-buffer-with-sudo): Declare.
(cherry picked from commit
5d1b696e9953f69ad918af094e5d09562a4deeaf)
Eli Zaretskii [Sat, 15 Mar 2025 08:52:45 +0000 (10:52 +0200)]
; Fix last change (bug#76789)
* doc/misc/speedbar.texi (Frames Windows and Faces): Fix node
name. Fix markup and punctuation.
(Introduction): Fix markup.
(cherry picked from commit
f69cc74c897b2e9c3eb0ad9a140743ad4d69a019)
Vincenzo Pupillo [Thu, 6 Mar 2025 12:39:01 +0000 (13:39 +0100)]
Add a new command `speedbar-window'.
Speedbar now can be opened in a window instead of a separate frame. The
frame remains the default.
* doc/emacs/frames.texi: Mention Speedbar window mode.
* doc/misc/speedbar.texi: Document 'speedbar-window'.
* lisp/speedbar.el
(speedbar-prefer-window): New user option. If t, the command `speedbar'
open the speedbar in a window.
(speedbar-window-dedicated-window): New user option. If t the window is
dedicated.
(speedbar-window-side): New user option. The side of 'speedbar-window',
defaults to left.
(speedbar-window-default-width): New user option. The default size of
the 'speedbar-window'.
(speedbar-window-max-width): New user option. Limits the width of the
'speedbar-window'. The user can resize the window as desired, but this
option will be the width of the window when restored.
(speedbar--buffer-name): New variable, the buffer name used for both
'speedbar-frame-mode' and 'speedbar-window-mode'.
(speedbar--window): New variable, the window displaying 'speedbar-window'.
(speedbar--window-width): New variable, store the current width of
'speedbar-window'.
(speedbar-easymenu-definition-trailer): Now it is a function that
returns a different trailer for 'speedbar-frame' and 'speedbar-window'.
(speedbar): Now it is a function that calls 'speedbar-frame-mode', the
default or 'speedbar-window-mode' based on the value of
'speedbar-prefer-window'.
(speedbar-frame-mode): Before opening a frame, close 'speedbar-window'
if it is open.
(speedbar-frame-or-window): New function, returns 'frame', 'window'
or nil if speedbar is not open.
(speedbar-window): New alias for 'speedbar-window-mode'.
(speedbar-window-mode): Enable of disable 'speedbar-window'.
(speedbar-window--window-live-p): New function, return non-nil if the
'speedbar-window' is live.
(speedbar-window--buffer-live-p): New function, return non-nil if the
'speedbar-buffer' is live.
(speedbar-window--live-p): New function, return t if 'speedbar-window'
is open.
(speedbar-window-current-window): New function, return t if the selected
window is speedbar-window.
(speedbar-window--close): New function, close the 'speedbar-window'.
(speedbar-window--width): New function, return the current width of
'speedbar-window'.
(speedbar-width): New function, return the 'speedbar' of
'speedbar-frame-mode' of 'speedbar-frame-mode'.
(speedbar-set-mode-line-format): Use the new 'speedbar-width' function.
(speedbar-directory-buttons): Use the new 'speedbar-width' function.
(speedbar--speedbar-live-p): New function, returns t if
'speedbar-frame-mode' or 'speedbar-window-mode' are open.
(speedbar-timer-fn): Now handle 'speedbar-frame-mode' and
'speedbar-window-mode'.
(cherry picked from commit
c1aab8c49b763abc482a6dbc402782bbe5370da0)
Eli Zaretskii [Sat, 15 Mar 2025 08:17:20 +0000 (10:17 +0200)]
; * doc/lispref/commands.texi (Click Events): Fix a thinko.
(cherry picked from commit
c8471129dd6e576aaf2dfdc65e09fcf297d1ff3c)
Eshel Yaron [Sat, 15 Mar 2025 17:14:02 +0000 (18:14 +0100)]
Eli Zaretskii [Sat, 15 Mar 2025 08:10:14 +0000 (10:10 +0200)]
; Fix documentation of recent change in mouse.el
* lisp/mouse.el (mouse-event-areas-with-no-buffer-positions): Doc
fix.
(mouse-posn-property): Add commentary.
(cherry picked from commit
82e44e86754427864305fcc2e03a52a54a1cae2f)
Eli Zaretskii [Sat, 15 Mar 2025 08:04:01 +0000 (10:04 +0200)]
; Fix documentation of mouse-click events
* doc/lispref/commands.texi (Click Events): Add menu-bar events to
the description. Add missing details about tab-bar click events.
(cherry picked from commit
6e28c2019e772aa19040cf17e314fcee23bb33d4)
Eli Zaretskii [Sat, 15 Mar 2025 07:36:03 +0000 (09:36 +0200)]
; * lisp/dired.el (project-root): Declare.
(cherry picked from commit
e09cb3aee9a7dfb851d0470f30bd71426c3434bf)
Gerd Möllmann [Fri, 14 Mar 2025 14:44:04 +0000 (15:44 +0100)]
Fix mouse-posn-property
* doc/lispref/commands.texi (Click Events): Mention menu-bar.
* lisp/mouse.el (mouse-event-areas-with-no-buffer-positions):
New defvar including all areas mentioned in the Lisp reference.
(mouse-posn-property): Use it.
(cherry picked from commit
b105089715c8b5d467282513965035faf955a5e3)
Po Lu [Sat, 15 Mar 2025 04:47:40 +0000 (12:47 +0800)]
; * src/w32.c (term_ntproc): Fix capitalization of commentary.
(cherry picked from commit
88e30e1ac5a154d9828954f8052e1a04aed15999)
Po Lu [Sat, 15 Mar 2025 04:46:32 +0000 (12:46 +0800)]
; Fix punctuation and typos in w32proc.c
* src/w32proc.c (WFO_MAX_WAIT, wait_objects_context)
(start_wait_objects, stop_wait_objects, end_wait_and_return)
(shrink_wait_pool, free_wait_pool, wait_for_objects)
(msg_wait_for_objects, delete_child, WINAPI, create_child)
(waitpid): Repunctuate sentences and correct typos.
(cherry picked from commit
1749ad825e2d7bd456665ce02fb7faf79a6e9143)
Stefan Kangas [Sat, 15 Mar 2025 01:37:44 +0000 (02:37 +0100)]
Delete pre-Emacs 20 documentation from term.el
* lisp/term.el: Delete comment titled "Converting process modes to use
term mode". This comment from 1994 is only of historical interest.
(cherry picked from commit
aa66edeeba508bf5be89a5257216a5d995e47d89)
Stefan Kangas [Sat, 15 Mar 2025 00:17:24 +0000 (01:17 +0100)]
; * etc/symbol-releases.eld: Add current-global-map.
This avoids saying that it was introduced in Emacs 29.1.
(cherry picked from commit
3864b9352a01804af2e4b43a6bc171953375cdf7)
Stefan Kangas [Sat, 15 Mar 2025 00:01:16 +0000 (01:01 +0100)]
Recommend using 'keymap-set' in Commentaries
* lisp/calendar/timeclock.el, lisp/comint.el, lisp/ehelp.el:
* lisp/gnus/gnus-bookmark.el, lisp/gnus/smiley.el, lisp/ido.el:
* lisp/isearchb.el, lisp/mail/mailabbrev.el, lisp/net/ange-ftp.el:
* lisp/net/goto-addr.el, lisp/play/fortune.el, lisp/saveplace.el:
* lisp/shell.el, lisp/term.el, lisp/textmodes/makeinfo.el:
* lisp/textmodes/refer.el, lisp/textmodes/remember.el:
* lisp/textmodes/table.el, lisp/woman.el: Recommend using
'keymap-set' instead of 'define-key' in Commentaries.
(cherry picked from commit
ecd756dd391c1436820593e240f1f7b8a28b2c6e)
Stefan Kangas [Fri, 14 Mar 2025 23:09:45 +0000 (00:09 +0100)]
Recommend using 'keymap-global-set' in Commentaries
* lisp/bs.el, lisp/calculator.el, lisp/cedet/data-debug.el:
* lisp/help-at-pt.el, lisp/hilit-chg.el, lisp/mail/mspools.el:
* lisp/mh-e/mh-e.el, lisp/mouse-copy.el, lisp/mouse-drag.el:
* lisp/net/browse-url.el, lisp/net/webjump.el, lisp/printing.el:
* lisp/progmodes/cfengine.el, lisp/progmodes/ebnf2ps.el:
* lisp/ps-print.el, lisp/repeat.el, lisp/term/wyse50.el:
* lisp/term/x-win.el, lisp/vcursor.el, lisp/woman.el:
Recommend using 'keymap-global-set' instead of 'global-set-key'.
(cherry picked from commit
679ad95a67fbecafd203c9e7f55547a312b3833b)
Stefan Kangas [Fri, 14 Mar 2025 22:38:42 +0000 (23:38 +0100)]
Use defvar-keymap in which-func.el
* lisp/progmodes/which-func.el (which-func-keymap): Use defvar-keymap.
(which-func-maxout): Change :type to natnum.
(which-func-format): Use substitute-command-keys.
(cherry picked from commit
2009ae85935beb345ce605abe398dbbe6cd84b9b)
Stefan Kangas [Fri, 14 Mar 2025 22:22:11 +0000 (23:22 +0100)]
Add :set attribute to winner-dont-bind-my-keys
* lisp/winner.el (winner--set-dont-bind-my-keys): New function.
(winner-dont-bind-my-keys): Allow setting with setopt.
(winner-mode-map): Use defvar-keymap.
* test/lisp/winner-tests.el: New file.
(cherry picked from commit
33cc5427cbec224d55fac9d76b7c2978fdd5034b)
Stefan Kangas [Fri, 14 Mar 2025 22:11:15 +0000 (23:11 +0100)]
Use defvar-keymap for command-history-mode-map
* lisp/chistory.el (command-history-mode-map): Use defvar-keymap.
(cherry picked from commit
6b295347a9f7491ae4c16d942b3b12a54fc2373a)
Eshel Yaron [Sat, 15 Mar 2025 17:11:38 +0000 (18:11 +0100)]
Dmitry Gutov [Sat, 15 Mar 2025 02:26:43 +0000 (04:26 +0200)]
dired-copy-filename-as-kill: Support project-relative names
* lisp/dired.el (dired-copy-filename-as-kill): Support new value
of ARG, to mean file name relative to project root (bug#76792).
* doc/emacs/dired.texi (Misc Dired Features): Mention it.
* etc/NEWS: Same.
(cherry picked from commit
af81b3af4ce99c664b040313b548910770bc5854)
Tomas Nordin [Sat, 15 Mar 2025 02:08:47 +0000 (04:08 +0200)]
Teach diff-apply-hunk to handle hunks with empty context
* lisp/vc/diff-mode.el (diff-find-source-location):
Consider the case when there is no diff context above or below
edited lines. (bug#72556)
* test/lisp/vc/diff-mode-tests.el: Add tests for undoing hunks
from diffs with addtions only in the beginning or end of the
source file.
(cherry picked from commit
4980287e081d3efd29f64973938ca2a0575f521e)
Eshel Yaron [Sat, 15 Mar 2025 17:10:38 +0000 (18:10 +0100)]
Stefan Kangas [Fri, 14 Mar 2025 18:50:22 +0000 (19:50 +0100)]
Make turn-on-flyspell/turn-off-flyspell obsolete
* lisp/textmodes/flyspell.el (turn-on-flyspell): Make into obsolete
function alias for 'flyspell-mode'.
(turn-off-flyspell): Declare obsolete.
(text-mode-hook): Don't redundantly set :options here.
* lisp/textmodes/text-mode.el (text-mode-hook): Prefer 'flyspell-mode'
to 'turn-on-flyspell' in :options. (Bug#76535)
(cherry picked from commit
bad2cd198abbd150cc205aee7879ad718e724dad)
Michael Albinus [Fri, 14 Mar 2025 15:31:51 +0000 (16:31 +0100)]
Improve tramp-*-with-sudo commands
* doc/emacs/dired.texi (Dired Visiting):
Add tramp-dired-find-file-with-sudo.
* doc/emacs/files.texi (Reverting):
Add tramp-revert-buffer-with-sudo.
* doc/misc/tramp.texi (Ad-hoc multi-hops): Extend wrt
`tramp-*-with-sudo' commands.
* etc/NEWS: Add tramp-dired-find-file-with-sudo.
Fix typos.
* lisp/bindings.el (ctl-x-x-map):
* lisp/dired.el (dired-mode-map): Add "@" binding. (Bug#76974)
* lisp/net/tramp-cmds.el (dired-get-file-for-visit): Declare.
(with-tramp-file-name-with-method): New macro.
(tramp-revert-buffer-with-sudo): Autoload. Preserve position.
Use `with-tramp-file-name-with-method'.
(tramp-dired-find-file-with-sudo): New command.
(cherry picked from commit
24ffcbb3da9a010cf564bb496af3f5ce0b805f17)
Eshel Yaron [Sat, 15 Mar 2025 17:07:59 +0000 (18:07 +0100)]
Eli Zaretskii [Fri, 14 Mar 2025 13:05:29 +0000 (15:05 +0200)]
; * src/w32.h (free_wait_pool): Move prototype from w32.c.
(cherry picked from commit
c87f0e8a199826f1d05d5c1ff9722577b5fc70de)
Yue Yi [Mon, 10 Mar 2025 16:30:40 +0000 (00:30 +0800)]
Increase FD_SETSIZE on Windows to support more subprocesses
Earlier versions of Emacs were limited to at most 32 subprocesses or
network connections on Windows due to the 64-object limit imposed by
WaitForMultipleObjects. To overcome this, a simple waiting thread
pool is implemented, allowing Emacs to efficiently wait on up to
2048 objects.
Each thread in the pool can wait on up to 63 objects, and a total of
32 threads are used, together with the main thread, to expand the
waiting capability. This enables Emacs to support approximately 1024
subprocesses, which is comparable to the 'pty' method on GNU/Linux
when using the default FD_SETSIZE of 1024.
To minimize overhead, the threads remain active instead of being
frequently created and destroyed, reducing unnecessary system
resource consumption. Idle threads can be terminated after a
period of inactivity to free up memory.
* src/w32.h (FD_SETSIZE): Change from 64 to 2048.
* src/w32.c (term_ntproc): Call 'free_wait_pool' to free waiting
threads.
* src/w32proc.c (WFO_ABANDONED, WFO_TIMEOUT, WFO_FAILED)
(WFO_MAX_WAIT): New macros.
(wait_objects_context, wait_objects_pool, wait_objects_info):
New structures for managing the thread pool.
(wait_objects_pool, wait_objects_info): New static variables for
managing the thread pool.
(wait_objects_thread, start_wait_objects, stop_wait_objects)
(end_wait_and_return, shrink_wait_pool, free_wait_pool):
New functions for waiting and managing the thread pool.
(wait_for_objects, msg_wait_for_objects): New functions as
replacements for WaitForMultipleObjects and
MsgWaitForMultipleObjects.
(wait_pid): Use 'wait_for_objects' and new macros.
(sys_select): Make some variables static to avoid stack
allocation. Use 'wait_for_objects', 'msg_wait_for_objects', and
the new macros.
(cherry picked from commit
e02466a579a58fceda33ad51d822e39543bc883c)
Eli Zaretskii [Fri, 14 Mar 2025 12:00:16 +0000 (14:00 +0200)]
Fix a recent change in isearch.el
* lisp/isearch.el (isearch-yank-x-selection): Ignore errors
signaled by 'gui-get-primary-selection', to better emulate what
'gui-get-selection' was doing. In particular,
'gui-get-primary-selection' can signal an error on MS-Windows.
(cherry picked from commit
5d4056c7658d9a6c64267821bd56450e82de01cb)
Eli Zaretskii [Fri, 14 Mar 2025 11:52:54 +0000 (13:52 +0200)]
; * lisp/isearch.el (isearch-yank-x-selection): Doc fix.
(cherry picked from commit
0e93029353bafa530cf9278a558741c22a956278)
Po Lu [Fri, 14 Mar 2025 07:52:59 +0000 (15:52 +0800)]
Enable yanking non-Latin-1 primary selections in I-Search
* lisp/isearch.el (isearch-yank-x-selection): Call
`gui-get-primary-selection', which accounts for non-Latin-1
encodings.
(cherry picked from commit
1437fc2bca2e42cd2a28754bbb4d9ac1403b87b7)
Ulrich Müller [Thu, 13 Mar 2025 20:06:01 +0000 (21:06 +0100)]
New configure option --with-systemduserunitdir
* configure.ac (systemduserunitdir): New variable and option.
* Makefile.in (systemduserunitdir): New, set by configure.
(install-etc, uninstall): Don't install emacs.service when
systemduserunitdir is unspecified.
* etc/NEWS: Announce the new configure option. (Bug#76924)
(cherry picked from commit
5dc0981875b64f2ffe38e59871cc34db05ab5f18)
Eshel Yaron [Sat, 15 Mar 2025 15:29:36 +0000 (16:29 +0100)]
Eli Zaretskii [Thu, 13 Mar 2025 20:19:14 +0000 (22:19 +0200)]
Fix aborts and text corruption in 'replace-buffer-contents'
* src/insdel.c (replace_range): Fix a thinko. Fix commentary.
(Bug#76997)
(cherry picked from commit
89441e12e2a25d43d1d5567ac356a7ecb8193063)
Juri Linkov [Thu, 13 Mar 2025 18:44:54 +0000 (20:44 +0200)]
Handle narrowed buffers in treesit-forward-sentence (bug#76679)
* lisp/treesit.el (treesit-forward-sentence): When no more
sentences are found, move to the end of the buffer or to
the range boundary at the 'treesit-parser' overlay's end.
(cherry picked from commit
59a67dcde4ecf8b8c346164f2d2cf90905762350)
Juri Linkov [Thu, 13 Mar 2025 18:29:50 +0000 (20:29 +0200)]
Support more embedded ranges in treesit-up-list and treesit-outline-level
* lisp/treesit.el (treesit-up-list, treesit-outline-level):
Add a loop to handle all nested parsers.
(cherry picked from commit
d1ce9fbf49bfacd00f1d1f152b457367c88d28df)
Juri Linkov [Thu, 13 Mar 2025 18:25:29 +0000 (20:25 +0200)]
* lisp/textmodes/css-mode.el (css-ts-mode--outline-predicate): Improve.
Set separate value that differs from 'css--treesit-simple-imenu-settings'
by adding new node "at_rule".
(cherry picked from commit
abeeb6eb748652b48124fa34db718f7c749b4d8b)
Mauro Aranda [Thu, 13 Mar 2025 18:19:05 +0000 (15:19 -0300)]
Fix error when trying to recommend setopt
* lisp/help-fns.el (help--recommend-setopt): Don't assume that
variable-documentation stores only strings. (Bug#76994)
(cherry picked from commit
8298bbada4fdef9415c552e691d2d4791d0e51ca)
Basil L. Contovounesios [Thu, 13 Mar 2025 12:37:25 +0000 (13:37 +0100)]
; Fix recent defvar-local docstring metavars.
(cherry picked from commit
f9d805cef3ef9a9818ef09e77c4379d23c2afb55)
Basil L. Contovounesios [Thu, 13 Mar 2025 12:36:19 +0000 (13:36 +0100)]
; Fix with-delayed-message docstring metavars.
(cherry picked from commit
20ac26e6751664b08636d16e515abfa1b8419a2d)
Eli Zaretskii [Thu, 13 Mar 2025 11:35:54 +0000 (13:35 +0200)]
Allow control of indicating empty rectangular selections
* lisp/rect.el (rectangle-indicate-zero-width-rectangle): New user
option.
(rectangle--highlight-for-redisplay): Use it to decide whether to
indicate empty rectangles on display. (Bug#16403)
* etc/NEWS: Announce the feature.
(cherry picked from commit
cecaec20e7ad525719d7d05233f1e6e2ba6a1475)
Eli Zaretskii [Thu, 13 Mar 2025 10:34:23 +0000 (12:34 +0200)]
Fix 'dired-movement-style' in Dired when subdirs are shown
* lisp/dired.el (dired--move-to-next-line): Don't consider
sub-directory lines as empty. (Bug#76596)
(cherry picked from commit
04034cd9ce746e3914daa66add34c66ad2db032d)
Eli Zaretskii [Thu, 13 Mar 2025 10:21:28 +0000 (12:21 +0200)]
; Fix last change (bug#75543)
* lisp/textmodes/remember.el (remember-initial-major-mode)
(remember-data-files-regex): Fix :version and doc strings.
* etc/NEWS: Fix last added entries.
(cherry picked from commit
d29e0add71d6b7058930527194b8227233e50c3a)
Matthias Meulien [Mon, 13 Jan 2025 22:04:54 +0000 (23:04 +0100)]
Turn 'remember-mode' into a minor mode
* lisp/textmodes/remember.el (remember-initial-major-mode):
Major mode for remember buffer.
(remember-data-files-regex): Regular expression to filter files.
(remember-append-in-data-directory): Handler to append data to
files.
(remember-mode): Change to a minor mode.
(remember-prefix-map): New. (Bug#75543)
(cherry picked from commit
e937167253208c7e9d22350795e72818dfa2f35b)
Mauro Aranda [Thu, 13 Mar 2025 09:48:39 +0000 (06:48 -0300)]
Recognize graphic as a type when customizing a face
* lisp/cus-edit.el (custom-display): Add checkbox for graphic.
(Bug#76975)
(cherry picked from commit
32ff6c9db150e5a4819cc4d7795dddfa554cad2c)
Eshel Yaron [Sat, 15 Mar 2025 15:27:09 +0000 (16:27 +0100)]
john muhl [Mon, 10 Mar 2025 01:40:58 +0000 (20:40 -0500)]
Simplify and improve indent rules in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (c-ts-common): Require it.
(lua-ts-mode): Set 'c-ts-common' variables.
(lua-ts--simple-indent-rules): Replace custom indent rules for
tables, arguments and parameters with
'c-ts-common-baseline-indent-rule'.
Improve consistency of indentation for IIFEs and nested functions.
(lua-ts--variable-declaration-continuation)
(lua-ts--variable-declaration-continuation-anchor): Reformat.
(lua-ts--comment-first-sibling-matcher)
(lua-ts--first-child-matcher, lua-ts--first-real-sibling-anchor)
(lua-ts--function-definition-p, lua-ts--g-g-g-parent)
(lua-ts--g-g-parent, lua-ts--nested-function-argument-matcher)
(lua-ts--nested-function-block-include-matcher)
(lua-ts--nested-function-block-matcher)
(lua-ts--nested-function-end-argument-matcher)
(lua-ts--nested-function-end-matcher)
(lua-ts--nested-function-last-function-matcher)
(lua-ts--top-level-function-call-matcher): Remove.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Update tests. (Bug#76986)
(cherry picked from commit
1528d315643d864204f327acb4ec19dd8d859de8)
Stefan Kangas [Thu, 13 Mar 2025 07:13:24 +0000 (08:13 +0100)]
Fix loading follow.el
* lisp/follow.el (follow-mode-prefix-key): Avoid changing
follow-mode-map before it is defined. (Bug#76977)
* test/lisp/follow-tests.el: New file.
(cherry picked from commit
b51fb2e107a4b3b17f5ced188247479cff0a3c92)
Jeremy Bryant [Sun, 9 Mar 2025 22:25:03 +0000 (22:25 +0000)]
; Add texinfo reference to GNU Coding Standards.
* doc/emacs/trouble.texi (Coding Standards): Add texinfo reference to
GNU Coding Standards manual. (Bug#76901)
(cherry picked from commit
f729828bcfbca8e972467ace85dd32744e4dd6de)
Daniel Mendler [Sat, 8 Mar 2025 08:23:53 +0000 (09:23 +0100)]
window-tool-bar: Use `static-if' from Compat 30
* lisp/window-tool-bar.el (window-tool-bar--static-if): Remove macro.
(window-tool-bar--ignored-event-types): Use `static-if' from Compat
instead. (Bug#76858)
(cherry picked from commit
ae33aad7f582864a8dbb0fee10f891fd67abdbe3)
Stefan Kangas [Wed, 12 Mar 2025 08:15:53 +0000 (09:15 +0100)]
; Fix mistake in defvar-keymap conversion
A mix of `keymap-set` and `define-key` confused the automated
conversion. Problem reported by Juri Linkov <juri@linkov.net>.
(cherry picked from commit
99d034cfd3fd807570b14a56413fc61e2c964c65)
Michael Albinus [Wed, 12 Mar 2025 19:56:24 +0000 (20:56 +0100)]
Tramp: Don't offer non-existing containers in completion
* doc/misc/tramp.texi (File name completion):
Explain "completion-use-cache" property.
* lisp/net/tramp-cache.el (tramp-get-method-parameter): Declare.
(tramp-get-hash-table): Mark connection properties.
(tramp-dump-connection-properties): Remove empty lists.
(tramp-parse-connection-properties): Take connection property
"completion-use-cache" into account. (Bug#76950)
* lisp/net/tramp-container.el (tramp-methods) <docker, dockercp, podman>
<podmancp, kubernetes, toolbox, distrobox, flatpak, apptainer, nspawn>:
Add `tramp-completion-use-cache' argument.
(cherry picked from commit
13a043fec95f9f6b9721b3c6ff0a3248b14d40cc)
Eli Zaretskii [Wed, 12 Mar 2025 12:53:03 +0000 (14:53 +0200)]
; * lisp/files.el (executable-find): Doc fix.
(cherry picked from commit
a6abb88fdcc71f2959c95ee5cda57c28719c5a0a)
Arash Esbati [Wed, 12 Mar 2025 17:48:22 +0000 (18:48 +0100)]
; Improve `reftex-toc-help'
* lisp/textmodes/reftex-toc.el (reftex-toc-help): Remove
unnecessary spaces. Use \` for key sequence.
(cherry picked from commit
85c00405b9e349eeabbdb305e5f8da41600d0b89)
Stephen Gildea [Wed, 12 Mar 2025 14:02:44 +0000 (07:02 -0700)]
time-stamp: optimize resource use
* lisp/time-stamp.el (time-stamp-string-preprocess): Replace
n-squared string 'concat' with linear list 'push'.
(cherry picked from commit
6ab65281c54a1fcef90786f9d50142e3427781fb)
Stephen Gildea [Wed, 12 Mar 2025 13:48:55 +0000 (06:48 -0700)]
time-stamp: refactor for readability
* lisp/time-stamp.el (time-stamp-string-preprocess): Move all of the
big 'while' loop to the end of the function, to better expose its
structure of iterating over the format string.
(cherry picked from commit
1bfbaacc056c23fa7c5c8741b6cdd43201e0a65f)
Po Lu [Wed, 12 Mar 2025 09:28:27 +0000 (17:28 +0800)]
Don't warn about Xft >= 2.3.6
* configure.ac: Don't warn about Xft >= 2.3.6. Clarify warning
message printed on old releases.
(cherry picked from commit
26f5e6339be08d6a1c8831d87779788d93eeda9b)
Sean Whitton [Wed, 12 Mar 2025 03:59:46 +0000 (11:59 +0800)]
; exchange-point-and-mark-highlight-region: Add more detail here too
(cherry picked from commit
a5f2d6279e0793aa0f8ba1939273866b6464b7e7)
Sean Whitton [Wed, 12 Mar 2025 03:56:13 +0000 (11:56 +0800)]
; Add more detail to exchange-point-and-mark docstring
It didn't mention that exchange-point-and-mark-highlight-region
affects C-u C-x C-x too.
(cherry picked from commit
cd1defc441fc7694aaa0adac617edf790d8444d6)
Eshel Yaron [Wed, 12 Mar 2025 19:04:25 +0000 (20:04 +0100)]
Sean Whitton [Wed, 12 Mar 2025 02:33:55 +0000 (10:33 +0800)]
; Document recent change to diff-apply-buffer
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document diff-apply-buffer considering an active
region and its new prefix argument.
(cherry picked from commit
9838b88c2e154fd4a319e06612b385f20c286177)
Eshel Yaron [Wed, 12 Mar 2025 19:04:18 +0000 (20:04 +0100)]
Sean Whitton [Wed, 12 Mar 2025 02:13:07 +0000 (10:13 +0800)]
; Touch up docs for exchange-point-and-mark-highlight-region
(cherry picked from commit
d01a391195e4f6282a587fcc581bb6cd8b2204e1)
Sean Whitton [Tue, 11 Mar 2025 06:35:48 +0000 (14:35 +0800)]
Correct some outdated docs for hack-local-variables
* doc/lispref/variables.texi (File Local Variables):
<hack-local-variables>: Say that it applies directory-local
variables too. Add a cross-reference.
(Directory Local Variables): Document dir-local-variables-alist.
* lisp/files.el (hack-local-variables): Say that it always puts
into effect directory-local variables.
(cherry picked from commit
202910460538401ec585e9be80c05adb55279573)
Eshel Yaron [Wed, 12 Mar 2025 19:04:07 +0000 (20:04 +0100)]
Stefan Kangas [Wed, 12 Mar 2025 01:42:40 +0000 (02:42 +0100)]
; Fix :version tag
Reported by Campbell Barton <ideasman42@gmail.com>.
(cherry picked from commit
85b147d32100d8da89366a19ab77f996fe011043)
Eshel Yaron [Wed, 12 Mar 2025 19:04:01 +0000 (20:04 +0100)]
F. Jason Park [Tue, 11 Mar 2025 17:41:18 +0000 (10:41 -0700)]
Add erc-compat adapter for xml-escape-string
* lisp/erc/erc-compat.el (erc-compat--xml-escape-string): New macro to
call `xml-escape-string' sans the NO-ERROR argument on Emacs 27.
* lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): Use
compat macro.
(cherry picked from commit
dd1b11d34cd1389fe5ee0dd80784f9cd0d66026d)
F. Jason Park [Tue, 11 Mar 2025 02:02:48 +0000 (19:02 -0700)]
Suppress log module when inserting date stamps in ERC
* lisp/erc/erc-log.el (erc-truncate-buffer-on-save): Use
`make-obsolete-variable' because `erc-truncate-buffer-on-save' is an
option, not a function. Already mentioned in etc/ERC-NEWS.
(erc-logging-enabled): Return nil if `log' appears in the `erc--skip'
msg prop.
* lisp/erc/erc-stamp.el (erc-stamp--defer-date-insertion-on-post-modify):
Add `log' to `erc--skip' msg prop. This tells the log module to defer
advancing the `erc-last-saved-position' marker until after stamps have
been inserted, thus ensuring they're included in logs when
`erc-log-write-after-insert' is non-nil.
* test/lisp/erc/erc-scenarios-log.el
(erc-scenarios-log--save-buffer-in-logs/truncate-on-save): Suppress
warning for `erc-truncate-buffer-on-save'.
(erc-scenarios-log--write-after-insert): New test. (Bug#76875)
(cherry picked from commit
3db65ff5cb3d6f58b83052760b4ce04eb77db1bc)
Sean Whitton [Wed, 12 Mar 2025 01:20:05 +0000 (09:20 +0800)]
; Replace non-standard "CLisp" abbreviation for "Common Lisp"
(cherry picked from commit
261205dbb57f77e3426df9f27fcc5429aae48c05)
Stefan Kangas [Wed, 12 Mar 2025 00:16:37 +0000 (01:16 +0100)]
lisp/emacs-lisp/track-changes.el: Make GNU ELPA release
(cherry picked from commit
ffb7d656a2c89f86ccd2de51379de9612c7a4aa3)
Stefan Kangas [Wed, 12 Mar 2025 00:15:07 +0000 (01:15 +0100)]
Unbreak track-changes in Emacs 24
* lisp/emacs-lisp/track-changes.el (track-changes--after): Don't use
'incf', added in Emacs 31; this :core package supports Emacs 24.
(cherry picked from commit
523f7924570ae339a9661c910cc99c41676d7349)
Stefan Kangas [Tue, 11 Mar 2025 23:04:50 +0000 (00:04 +0100)]
Automatically document when setopt is needed
* lisp/help-fns.el (help--recommend-setopt): New function to
automatically document the need to use `setopt` to set the values of
any defcustoms with a `:set` property.
(help-fns-describe-variable-functions): Add above new function to
hook.
* lisp/follow.el (follow-mode-prefix-key):
* lisp/minibuffer.el (minibuffer-regexp-prompts):
* lisp/register.el (register-use-preview):
* lisp/savehist.el (savehist-autosave-interval):
* lisp/saveplace.el (save-place-autosave-interval):
* lisp/tab-bar.el (tab-bar-define-keys):
* lisp/textmodes/text-mode.el (text-mode-ispell-word-completion):
Delete now redundant text from docstrings.
(cherry picked from commit
77b7e2d37b2c68b73ad770ec680281c1f82d26f1)
Stefan Kangas [Tue, 11 Mar 2025 22:46:15 +0000 (23:46 +0100)]
; Delete commented out code in help-fns.el
(cherry picked from commit
f4b20c3f768c4d833c304ace2a9cf0a028346fdb)
Stefan Kangas [Tue, 11 Mar 2025 22:22:26 +0000 (23:22 +0100)]
Delete XEmacs compatibility kludge from follow.el
* lisp/follow.el (follow-select-if-end-visible): Remove XEmacs
compatibility kludge.
(cherry picked from commit
57f7d5f44a136c95958030b7920e5eca4b285309)
Stefan Kangas [Tue, 25 Feb 2025 01:58:09 +0000 (02:58 +0100)]
New user option follow-mode-prefix-key
* lisp/follow.el (Commentary): Document modern keymap functions.
(follow-mode-prefix): Make obsolete in favor of...
(follow-mode-prefix-key): ...this new user option. Allow changing the
prefix using `setopt`.
(follow-mode-submap): New variable.
(follow-mode-map): Define using defvar-keymap.
(cherry picked from commit
27b31ebeaf32de6aec2fefe2d6824e22a102de30)
Stefan Monnier [Tue, 11 Mar 2025 21:10:30 +0000 (17:10 -0400)]
(Freplace_buffer_contents): Preserve markers more carefully
Use `replace_range` rather than `delete+insert`.
* src/insdel.c (replace_range): Allow NEW to specify a chunk
of buffer text.
* src/editfns.c (Freplace_buffer_contents): Use it.
* test/src/editfns-tests.el (replace-buffer-contents-1): Remove
incorrect check which happened to succeed because point was not
preserved carefully enough. Make the replacement text share a bit
more content to make the test a bit more strict.
(editfns-tests--replace-region): Doesn't fail any more.
(cherry picked from commit
40d8650d5177bd291747d225c7d2cf2b4ba55856)
Eshel Yaron [Wed, 12 Mar 2025 19:01:28 +0000 (20:01 +0100)]
Stefan Kangas [Tue, 11 Mar 2025 20:26:51 +0000 (21:26 +0100)]
; Fix project-list-file on Emacs 26.1
* lisp/progmodes/project.el (project-list-file): Unbreak use of
'locate-user-emacs-file' on Emacs 26.1.
Problem reported by Dmitry Gutov <dmitry@gutov.dev>.
(cherry picked from commit
ceee1a0ae7a804fbd5307f99db4f81f3d427e40e)
Stefan Kangas [Tue, 11 Mar 2025 02:36:22 +0000 (03:36 +0100)]
Use defvar-keymap for outline-mode-prefix-map
* lisp/outline.el (outline-mode-prefix-map): Use defvar-keymap.
(cherry picked from commit
b3d8e7ebb5dfb1eb9918d73571c996950026ead0)
Stefan Kangas [Tue, 11 Mar 2025 20:20:38 +0000 (21:20 +0100)]
Remove variable aliases obsolete since Emacs 23.2
* lisp/dired.el (dired-advertised-find-file):
* lisp/simple.el (advertised-undo):
* lisp/wid-edit.el (advertised-widget-backward): Remove variable
aliases obsolete since Emacs 23.2. They are replaced by
':advertised-binding' properties.
* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/obsolete/landmark.el (landmark-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/proced.el (proced-mode-map): Don't bind above removed commands.
(cherry picked from commit
af851dd82e465a3e5e28065b35332ad35162beab)
Stefan Kangas [Tue, 11 Mar 2025 20:18:24 +0000 (21:18 +0100)]
Don't recommend legacy keymap functions in documentation
* doc/emacs/mule.texi (Input Methods):
* doc/lispintro/emacs-lisp-intro.texi (Miscellaneous):
* doc/lispref/text.texi (Clickable Text):
* doc/misc/calc.texi (Defining Functions, Defining Simple Commands)
(Customizing Calc):
* doc/misc/efaq.texi (Matching parentheses, Modifying pull-down menus)
(Deleting menus and menu options, Binding keys to commands)
(Invalid prefix characters)
(Terminal setup code works after Emacs has begun)
(Backspace invokes help, Swapping keys, No Escape key)
(Binding combinations of modifiers and function keys)
(Replying to the sender of a message):
* doc/misc/eudc.texi (Installation, Emacs-only Configuration)
(External Configuration):
* doc/misc/gnus.texi (Group Parameters, Misc Group Stuff)
(Summary Buffer, Generic Marking Commands, RSS)
(nnmairix tips and tricks, Oort Gnus):
* doc/misc/ido.texi (Customization):
* doc/misc/mairix-el.texi (Using):
* doc/misc/mh-e.texi (HTML, Miscellaneous Commands and Options)
(Folders, Composing):
* doc/misc/octave-mode.texi (Running Octave from Within Emacs):
* doc/misc/reftex.texi (Citations Outside LaTeX):
* doc/misc/remember.texi (Quick Start):
* doc/misc/sem-user.texi (Smart Jump):
* doc/misc/viper.texi (Key Bindings, Vi Macros):
* doc/misc/widget.texi (Defining New Widgets):
* doc/misc/woman.texi (Word at point): Recommend 'keymap-set',
'keymap-global-set', 'keymap-global-unset', 'keymap-local-set', and
'key-translate', instead of their legacy equivalents. (Bug#55647)
(cherry picked from commit
96a704346a282fc2783e54de3d9c30cd8f9ce955)
Michael Heerdegen [Wed, 5 Mar 2025 15:09:30 +0000 (16:09 +0100)]
Fix overlay-start and overlay-end gv setters
This fixes Bug#76730.
* lisp/emacs-lisp/gv.el (overlay-start, overlay-end):
Avoid computing the set value twice.
(cherry picked from commit
0c8d30045bd92a908c0cf2067615fc1b2fbcc33d)
Juri Linkov [Tue, 11 Mar 2025 18:18:24 +0000 (20:18 +0200)]
Adapt treesit-outline-search to the recent improvements (bug#76398)
* lisp/treesit.el (treesit-closest-parser-boundary):
Remove temporary function.
(treesit-outline-search): Use 'previous/next-single-char-property-change'
with 'treesit-parser' property to find the closest parser boundary.
(treesit-outline-level): Get the 'treesit-host-parser' overlay
and find the parent parser node with 'treesit-node-at'.
(cherry picked from commit
b741023070e6cfb03a178cab0f6818244af1b0e2)
Thierry Volpiatto [Sun, 9 Mar 2025 15:08:41 +0000 (16:08 +0100)]
New user variable `exchange-point-and-mark-highlight-region`
When set to nil, this modifies `exchange-point-and-mark' so that it doesn't
activate mark when it is not already active.
* etc/NEWS: Introduce new variable
exchange-point-and-mark-highlight-region.
* lisp/simple.el
(exchange-point-and-mark-highlight-region): New.
(exchange-point-and-mark): Use it.
(cherry picked from commit
ef79c8cf3d63f510107536901925c05e37740275)
Eli Zaretskii [Tue, 11 Mar 2025 11:50:56 +0000 (13:50 +0200)]
; * lisp/treesit.el (local-parser-overlay): Fix wording of commentary.
(cherry picked from commit
5e9675367ad0697f615b5168441bf6490977168c)
Eli Zaretskii [Tue, 11 Mar 2025 11:45:52 +0000 (13:45 +0200)]
; * lisp/treesit.el (treesit-local-parsers-on): Doc fix.
(cherry picked from commit
982aeaf8a104fe4314a37237f70cad41ef6a7348)
Sean Whitton [Tue, 11 Mar 2025 11:17:04 +0000 (19:17 +0800)]
diff-apply-buffer: Operate on region, add prefix argument
* lisp/vc/diff-mode.el (diff-apply-buffer): Interactively,
operate on an active region. Reverse-apply hunks with a prefix
argument, like C-u C-c C-a already does.
(cherry picked from commit
942bb22c9f936a5f2f55dcf12748601ec4046deb)
Yuan Fu [Tue, 11 Mar 2025 09:36:11 +0000 (02:36 -0700)]
Fix c-ts-common-baseline-indent-rule for lists (bug#76908)
* lisp/progmodes/c-ts-common.el:
(c-ts-common-baseline-indent-rule): Use the first non-comment
sibling rather than first sibling.
(cherry picked from commit
3b3170244da44d3d0d76139b138df65ea6adc064)
Yuan Fu [Tue, 11 Mar 2025 08:34:06 +0000 (01:34 -0700)]
Make sure treesit-local-parsers-on works when BEG = END (bug#76398)
(Unrelated to the topic of the bug, but mentioned in the thread.)
* lisp/treesit.el (treesit-local-parsers-on): Use overlays-at
when BEG = END.
(cherry picked from commit
abaff36c3c26850fe883d44fa8a3359a90322d06)
Yuan Fu [Tue, 11 Mar 2025 08:15:20 +0000 (01:15 -0700)]
Handle deleted parser in treesit-explore-mode (bug#76398)
(Unrelated to the topic of the bug, but mentioned in the
thread.)
* lisp/treesit.el (treesit--explorer-refresh-1): New function.
(treesit--explorer-refresh): Handle 'treesit-parser-deleted'
error.
(cherry picked from commit
0bcc67c8305aa649be54e036fbe475bb82ca3a8b)
Michael Albinus [Tue, 11 Mar 2025 08:26:58 +0000 (09:26 +0100)]
; Adapt comment in tramp.el
(cherry picked from commit
894b0e3a2fe064690eecda546f3b577886638140)
Yuan Fu [Tue, 11 Mar 2025 07:44:49 +0000 (00:44 -0700)]
Add overlays for non-local tree-sitter parsers too
* lisp/treesit.el (treesit-local-parsers-at):
(treesit-local-parsers-on): Exclude non-local parsers.
(treesit--cleanup-local-range-overlays): Don't delete non-local
parsers (because those are managed by the major mode).
(treesit--update-ranges-non-local): Apply overlay for each ranges.
(treesit--update-ranges-local): Ignore
overlays with non-local parsers, and set
'treesit-parser-local-p' property to t.
(treesit--update-range-1): Additionally pass modified-tick to
treesit--update-ranges-non-local.
(treesit-major-mode-setup): Don't delete non-local parsers.
(cherry picked from commit
57a213c91cdf4b1739b1068c5dc8ae85f1d5302c)
Yuan Fu [Tue, 11 Mar 2025 03:15:39 +0000 (20:15 -0700)]
Remove parent-node field from tree-sitter parsers
* src/treesit.c (make_treesit_parser): Remove field.
(Ftreesit_parser_parent_node):
(Ftreesit_parser_set_parent_node): Remove
* src/treesit.h (Lisp_TS_Parser): Remove field.
(cherry picked from commit
03a6d4256f861d71e09206ac09d48f16efd52b64)