1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-17 08:31:09 -08:00
Commit graph

177509 commits

Author SHA1 Message Date
Ulrich Müller
5dc0981875 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)
2025-03-14 08:01:47 +01:00
Yuan Fu
f2f1fb7fe0
Merge from origin/emacs-30
defc55bb6f Fix treesit-parser-create behavior regarding indirect buf...
20ac26e675 ; Fix with-delayed-message docstring metavars.
04034cd9ce Fix 'dired-movement-style' in Dired when subdirs are shown
f8443dffc1 ; * lisp/register.el (register-use-preview): Doc fix (bug...
f729828bcf ; Add texinfo reference to GNU Coding Standards.
a6abb88fdc ; * lisp/files.el (executable-find): Doc fix.

# Conflicts:
#	src/treesit.c
2025-03-13 20:18:03 -07:00
Yuan Fu
defc55bb6f
Fix treesit-parser-create behavior regarding indirect buffers
The previous fix fixed the problem that treesit-parser-create
always use the current buffer, but that introduce another subtle
problem: if an indirect buffer creates a parser, the parser
saves the base buffer rather than the indirect buffer.  In Emacs
29, if you create a parser in an indirect buffer, the parser
saves the indirect buffer.  This change of behavior breaks some
existing use-cases for people using indirect buffer with
tree-sitter.

In Emacs 31, indirect buffers and base buffer get their own
parser list, so this problem doesn't exist anymore.  The fix is
only for Emacs 30.

* src/treesit.c (Ftreesit_parser_create): Use the buffer that's
given to treesit-parser-create, even if it's an indirect buffer.
2025-03-13 20:09:03 -07:00
Eli Zaretskii
89441e12e2 Fix aborts and text corruption in 'replace-buffer-contents'
* src/insdel.c (replace_range): Fix a thinko.  Fix commentary.
(Bug#76997)
2025-03-13 22:19:14 +02:00
Juri Linkov
59a67dcde4 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.
2025-03-13 20:44:54 +02:00
Juri Linkov
d1ce9fbf49 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.
2025-03-13 20:29:50 +02:00
Juri Linkov
abeeb6eb74 * 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".
2025-03-13 20:25:29 +02:00
Mauro Aranda
8298bbada4 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)
2025-03-13 15:19:05 -03:00
Basil L. Contovounesios
f9d805cef3 ; Fix recent defvar-local docstring metavars. 2025-03-13 13:51:01 +01:00
Basil L. Contovounesios
20ac26e675 ; Fix with-delayed-message docstring metavars. 2025-03-13 13:39:39 +01:00
Eli Zaretskii
cecaec20e7 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.
2025-03-13 13:35:54 +02:00
Eli Zaretskii
04034cd9ce 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)
2025-03-13 12:34:23 +02:00
Eli Zaretskii
d29e0add71 ; 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.
2025-03-13 12:21:28 +02:00
Matthias Meulien
e937167253 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)
2025-03-13 12:04:46 +02:00
Mauro Aranda
32ff6c9db1 Recognize graphic as a type when customizing a face
* lisp/cus-edit.el (custom-display): Add checkbox for graphic.
(Bug#76975)
2025-03-13 06:48:39 -03:00
Eli Zaretskii
f8443dffc1 ; * lisp/register.el (register-use-preview): Doc fix (bug#76739). 2025-03-13 10:14:07 +02:00
john muhl
1528d31564 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)
2025-03-13 10:09:38 +02:00
Stefan Kangas
b51fb2e107 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.
2025-03-13 08:14:36 +01:00
Jeremy Bryant
f729828bcf ; Add texinfo reference to GNU Coding Standards.
* doc/emacs/trouble.texi (Coding Standards): Add texinfo reference to
GNU Coding Standards manual.  (Bug#76901)
2025-03-13 07:12:26 +01:00
Daniel Mendler
ae33aad7f5 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)
2025-03-13 06:08:58 +01:00
Stefan Kangas
99d034cfd3 ; 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>.
2025-03-13 06:07:25 +01:00
Michael Albinus
13a043fec9 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.
2025-03-12 20:56:24 +01:00
Arash Esbati
85c00405b9 ; Improve `reftex-toc-help'
* lisp/textmodes/reftex-toc.el (reftex-toc-help): Remove
unnecessary spaces.  Use \` for key sequence.
2025-03-12 18:48:22 +01:00
Stephen Gildea
6ab65281c5 time-stamp: optimize resource use
* lisp/time-stamp.el (time-stamp-string-preprocess): Replace
n-squared string 'concat' with linear list 'push'.
2025-03-12 07:02:44 -07:00
Stephen Gildea
1bfbaacc05 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.
2025-03-12 06:51:52 -07:00
Eli Zaretskii
a6abb88fdc ; * lisp/files.el (executable-find): Doc fix. 2025-03-12 14:53:03 +02:00
Po Lu
26f5e6339b 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.
2025-03-12 17:28:37 +08:00
Sean Whitton
a5f2d6279e ; exchange-point-and-mark-highlight-region: Add more detail here too 2025-03-12 11:59:46 +08:00
Sean Whitton
cd1defc441 ; 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.
2025-03-12 11:57:04 +08:00
Sean Whitton
ad57fbc58f find-function-mode-lower-precedence: Also remove the global bindings
* lisp/emacs-lisp/find-func.el (find-function-mode): When
find-function-mode-lower-precedence is non-nil, apply the
bindings in such a way that we can also remove them when the
mode is deactivated.  Approach due to Stefan Monnier.
2025-03-12 11:00:16 +08:00
Sean Whitton
9838b88c2e ; 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.
2025-03-12 10:33:55 +08:00
Sean Whitton
2aef2951c0 ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/lispref/elisp.texi (Top):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/TODO:
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* src/frame.c (do_switch_frame):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Say "Lisp"
not "Elisp".
* lisp/progmodes/peg.el (peg-translate-exp): Say "Emacs Lisp"
not "Elisp".
2025-03-12 10:24:22 +08:00
Sean Whitton
d01a391195 ; Touch up docs for exchange-point-and-mark-highlight-region 2025-03-12 10:13:07 +08:00
Sean Whitton
22db8a2c2a Merge from origin/emacs-30
2029104605 Correct some outdated docs for hack-local-variables
2025-03-12 10:09:45 +08:00
Sean Whitton
aa545fea2d ; Merge from origin/emacs-30
The following commit was skipped:

c877acc261 ; Backport ELisp->Elisp fix to etc/NEWS to ease merging
2025-03-12 10:09:45 +08:00
Sean Whitton
99852fb867 Merge from origin/emacs-30
894b0e3a2f ; Adapt comment in tramp.el
cc87717fa0 Add keyword placeholder to tramp.el
7d0d61d854 Rewrite ERT manual introduction
b2f124f2a8 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
59d1aac49d Document return values of the various read-* functions
2025-03-12 10:09:09 +08:00
Sean Whitton
2029104605 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.
2025-03-12 10:05:32 +08:00
Sean Whitton
c877acc261 ; Backport ELisp->Elisp fix to etc/NEWS to ease merging
Do not merge to master.
2025-03-12 09:45:47 +08:00
Stefan Kangas
85b147d321 ; Fix :version tag
Reported by Campbell Barton <ideasman42@gmail.com>.
2025-03-12 02:44:10 +01:00
Sean Whitton
60c0524ad2 Fix capitalization ELisp -> Elisp
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/emacs/buffers.texi (List Buffers):
* doc/lispref/elisp.texi (Tree-sitter C API):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/DEBUG:
* etc/NEWS:
* etc/NEWS.25:
* etc/NEWS.26:
* etc/NEWS.28:
* etc/NEWS.30:
* etc/TODO:
* lib-src/emacsclient.c (print_help_and_exit):
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/cedet/semantic/wisent/comp.el
(wisent-automaton-lisp-form):
* lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/bindat.el (bindat-type):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert):
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs)
(lisp-fill-paragraphs-as-doc-string):
* lisp/emacs-lisp/macroexp.el (macroexp--fgrep):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/emacs-lisp/re-builder.el:
* lisp/erc/erc-button.el (erc-emacswiki-lisp-url):
* lisp/help-fns.el
(help-fns--describe-function-or-command-prompt):
* lisp/menu-bar.el (menu-bar-search-documentation-menu):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* lisp/org/org-capture.el (org-capture):
* lisp/org/org.el (org-category, org-todo):
* lisp/org/ox.el (org-export-async-start):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/peg.el (peg-translate-exp):
* lisp/progmodes/ruby-ts-mode.el:
* lisp/woman.el (woman-mode, woman-parse-numeric-arg):
* src/chartab.c (map_char_table_for_charset):
* src/fns.c (extract_data_from_object):
* src/frame.c (do_switch_frame):
* src/keyboard.c (make_lispy_event):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test):
* test/manual/etags/c-src/emacs/src/keyboard.c
(make_lispy_event): Fix capitalization ELisp -> Elisp.
2025-03-12 09:38:33 +08:00
F. Jason Park
dd1b11d34c 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.
2025-03-11 18:28:38 -07:00
F. Jason Park
3db65ff5cb 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)
2025-03-11 18:28:38 -07:00
Sean Whitton
261205dbb5 ; Replace non-standard "CLisp" abbreviation for "Common Lisp" 2025-03-12 09:20:05 +08:00
Stefan Kangas
ffb7d656a2 lisp/emacs-lisp/track-changes.el: Make GNU ELPA release 2025-03-12 01:17:34 +01:00
Stefan Kangas
523f792457 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.
2025-03-12 01:17:23 +01:00
Stefan Kangas
77b7e2d37b 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.
2025-03-12 00:40:17 +01:00
Stefan Kangas
f4b20c3f76 ; Delete commented out code in help-fns.el 2025-03-11 23:46:15 +01:00
Stefan Kangas
57f7d5f44a Delete XEmacs compatibility kludge from follow.el
* lisp/follow.el (follow-select-if-end-visible): Remove XEmacs
compatibility kludge.
2025-03-11 23:36:19 +01:00
Stefan Kangas
27b31ebeaf 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.
2025-03-11 23:36:16 +01:00
Stefan Monnier
40d8650d51 (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.
2025-03-11 17:16:21 -04:00