1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

177460 commits

Author SHA1 Message Date
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
Stefan Kangas
e1ceee716d ; Fix typo 2025-03-11 22:11:09 +01:00
Stefan Kangas
ceee1a0ae7 ; 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>.
2025-03-11 21:26:51 +01:00
Stefan Kangas
b3d8e7ebb5 Use defvar-keymap for outline-mode-prefix-map
* lisp/outline.el (outline-mode-prefix-map): Use defvar-keymap.
2025-03-11 21:21:19 +01:00
Stefan Kangas
af851dd82e 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.
2025-03-11 21:20:38 +01:00
Stefan Kangas
96a704346a 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)
2025-03-11 21:19:13 +01:00
Michael Heerdegen
0c8d30045b 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.
2025-03-11 19:40:02 +01:00
Juri Linkov
b741023070 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'.
2025-03-11 20:18:24 +02:00
Thierry Volpiatto
ef79c8cf3d
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.
2025-03-11 17:06:19 +01:00
Eli Zaretskii
5e9675367a ; * lisp/treesit.el (local-parser-overlay): Fix wording of commentary. 2025-03-11 13:50:56 +02:00
Eli Zaretskii
982aeaf8a1 ; * lisp/treesit.el (treesit-local-parsers-on): Doc fix. 2025-03-11 13:45:52 +02:00
Sean Whitton
942bb22c9f 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.
2025-03-11 19:17:04 +08:00
Yuan Fu
3b3170244d
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.
2025-03-11 02:36:11 -07:00
Yuan Fu
abaff36c3c
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.
2025-03-11 01:35:48 -07:00
Yuan Fu
0bcc67c830
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.
2025-03-11 01:35:44 -07:00
Yuan Fu
57a213c91c
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.
2025-03-11 01:06:39 -07:00
Yuan Fu
03a6d4256f
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.
2025-03-11 01:06:39 -07:00
Gerd Möllmann
f79354460d ; Remove TODO item for writing to the bottom-right corner on TTYs 2025-03-11 07:25:22 +01:00
Po Lu
f6a56ddb5d ; * src/android.c (android_rewrite_spawn_argv): Fix typo. 2025-03-11 10:14:30 +08:00
Stefan Kangas
672df0288b Bump python.el package version to 0.30
* lisp/progmodes/python.el: Bump package version to 0.30.
2025-03-11 01:15:41 +01:00
Stefan Kangas
46f9ebaec3 Make python.el compatible with Emacs 29.1
* lisp/progmodes/python.el (python--treesit-fontify-string): Don't
call treesit--compute-font-lock-level unless it is
fboundp.  (Bug#76873)
2025-03-11 01:14:35 +01:00
Stefan Kangas
8ea65ac642 ; Temporarily disable proced tests on macOS (Bug#76898)
* test/lisp/proced-tests.el (proced-format-test, proced-update-test)
(proced-revert-test, proced-color-test): Disable tests on macOS.
2025-03-11 01:03:50 +01:00
Stefan Kangas
1393b71c2c Prefer defvar-keymap in some additional Gnus libraries
* lisp/gnus/gnus-sum.el (gnus-dead-summary-mode-map):
* lisp/gnus/gnus.el (gnus-article-mode-map)
(gnus-summary-mode-map, gnus-group-mode-map):
* lisp/gnus/mm-decode.el (mm-viewer-completion-map): Prefer
defvar-keymap.
* lisp/gnus/gnus.el (gnus-suppress-keymap): Declare obsolete.
2025-03-11 01:03:14 +01:00
Stefan Monnier
4980089960 lisp/emacs-lisp/track-changes.el: Make GNU ELPA release 2025-03-10 15:48:33 -04:00
Stefan Kangas
bab17c7fb5 ; Add comment to explain recent change
* lisp/vc/log-edit.el (log-edit-font-lock-keywords): Add comment to
explain recent change.  Proposed by Eli Zaretskii <eliz@gnu.org>.
Ref: https://lists.gnu.org/r/emacs-devel/2025-03/msg00587.html
2025-03-10 20:35:28 +01:00
Martin Rudalics
fd4de89460 Fix setting dedicatedness of WINDOW in 'window--display-buffer' (Bug#76911)
* lisp/window.el (window--display-buffer): Consult WINDOW's
'window-side' parameter in order to find out whether it is a
side window (Bug#76911).
2025-03-10 18:42:00 +01:00
Po Lu
7a72589847 ; Fix compiler warning in html-ts-mode.el
* lisp/textmodes/html-ts-mode.el (treesit-node-end)
(treesit-node-start): Declare.
2025-03-10 20:43:02 +08:00
Mauro Aranda
6d99b74ef7 Fix Package name for cond-star
* lisp/emacs-lisp/cond-star.el: Fix name.  (Bug#76861)
2025-03-10 07:45:21 -03:00
Harald Jörg
442d16266e ; cperl-mode.el: Improve docstring cperl-fontify-trailer
* lisp/progmodes/cperl-mode.el (cperl-fontify-trailer): Document
that this setting also affects indentation (Bug#76868).
2025-03-10 11:40:10 +01:00
Sean Whitton
6d62a293af vc-setup-buffer: Don't set current buffer as parent (bug#59457)
* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Don't set the
current buffer as parent (bug#59457).
2025-03-10 17:14:33 +08:00
Sean Whitton
e09a80143d vc-setup-buffer: Kill local file-local-variables-alist too
* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Kill
file-local-variables-alist variable, too (bug#44698).
* lisp/vc/vc.el (vc-log-internal-common): Don't call
kill-all-local-variables here, that's vc-setup-buffer's job.
2025-03-10 17:14:33 +08:00
Martin Rudalics
cbad6215cf Fix handling of frame position values
* src/frame.c (tty_child_pos_param): Handle additional position
values.  New SIZE argument.
(tty_child_frame_rect): Process size before position.
(Fmake_terminal_frame): Do not store calculated size/position
values in parameters to avoid that a negative absolute position
is later interpreted as position relative to bottom/right edge
of parent.
(Fmodify_frame_parameters): For tty child frames process size
before position values so the latter can take a new size into
account.
* src/frame.h: Adjust declaration of tty_child_pos_param.
* src/gtkutil.c (xg_set_geometry): Handle negative frame
position specifications.
* src/msdos.c (IT_set_frame_parameters): For tty child frames
process size before position parameters.
* src/xfns.c (x_window): In the non-GTK toolkit variant leave
negative position values unchanged - the toolkit should know how
to handle them.  Process child frame position parameters
separately.  In the non-toolkit variant process child frame
parameters separately.
2025-03-10 09:33:17 +01:00
Po Lu
94ba1b097e Reenable mmap-based dump allocation on wide int configurations
* src/pdumper.c (VM_SUPPORTED): Don't define to 0 when
!USE_LSB_TAG if WIDE_EMACS_INT.
2025-03-10 12:44:26 +08:00
Po Lu
ab5bfcebdd Fix bug#76805
* src/xterm.c (x_fast_mouse_position): Clear the mouse_moved
flag whether or not mouse motion is reported, to avoid repeated
polling for mouse movement.  (bug#76806)
2025-03-10 12:41:12 +08:00
Po Lu
d343a80e6e ; Fix function declarations in frame.el
* lisp/frame.el (widget-field-text-end, widget-field-start)
(widget-get): Correct function declarations.
2025-03-10 11:31:50 +08:00
Po Lu
02681b0fbf Don't claim that xftfont is being considered for deletion
* configure.ac: Don't claim that Xft is being considered for
deletion or that recent releases are buggy, or imply that
HarfBuzz support is exclusive to Cairo.
2025-03-10 11:28:38 +08:00
Stefan Monnier
c4a2823166 (makefile-dependency-regex): Fix bug#76759
* lisp/progmodes/make-mode.el (makefile-dependency-regex):
Decompose the regexp to be more understandable, and then change
it so the target part can't accidentally match a TAB.

* test/lisp/progmodes/make-mode-tests.el (make-mode-tests--bug17400):
New test.
2025-03-09 22:07:39 -04:00
Po Lu
5176eeb300 ; Correct typos in commentary and error messages
* src/lisp.h (USE_LSB_TAG):

* src/pdumper.c (pdumper_load): Correct typos in commentary and
error messages.
2025-03-10 09:43:13 +08:00
Mauro Aranda
0861da138b Provide better completion for customizing frame parameters
* lisp/frame.el (frame--special-parameters): New const.
(frame--complete-parameter-value): New function.
(initial-frame-alist, minibuffer-frame-alist): Use them in
:type.  (Bug#39143)
* lisp/cus-start.el (default-frame-alist): Use them here as well.
* src/frame.c (frame_parms): Add comment to try to keep
frame--special-parameters updated.
2025-03-09 19:07:40 -03:00
Stefan Kangas
731af8747c ; Fix byte-compiler warning 2025-03-09 18:29:01 +01:00
Stefan Kangas
ce03bf252a Make second arg to defvar-local optional
This change allows declaring a variable both special
and buffer-local like so:

    (defvar-local foo)

* lisp/subr.el (defvar-local): Make second argument optional.
* test/lisp/subr-tests.el (subr-test-defvar-local): New test.
* doc/lispref/variables.texi (Creating Buffer-Local): Document above change.
* etc/NEWS:

* lisp/mb-depth.el (minibuffer-depth-overlay):
* lisp/minibuf-eldef.el (minibuf-eldef-initial-input)
(minibuf-eldef-initial-buffer-length)
(minibuf-eldef-showing-default-in-prompt, minibuf-eldef-overlay):
* lisp/misc.el (list-dynamic-libraries--loaded-only-p):
* lisp/simple.el (minibuffer-history-isearch-message-overlay): Use
above new one-argument form of 'defvar-local'.
2025-03-09 18:24:22 +01:00
Stefan Kangas
a6523599f9 Use lisp-data-mode in recentf-save-file
* lisp/recentf.el (recentf-save-file-header): Add cookie to use
lisp-data-mode in recentf-save-file.
2025-03-09 18:24:21 +01:00
Stefan Kangas
3396f0e567 Use .eld for some relevant cache and data files
* lisp/bookmark.el (bookmark-default-file):
* lisp/net/nsm.el (nsm-settings-file):
* lisp/progmodes/project.el (project-list-file):
* lisp/saveplace.el (save-place-file): Rename files to have the file
suffix ".eld".  This change is backwards-compatible.
2025-03-09 18:24:21 +01:00
Stefan Kangas
87db670d04 Make locate-user-emacs-file accept a list too
This can be used to migrate to a new name, while also keeping
backwards-compatible support for an old name.

* lisp/files.el (locate-user-emacs-file): Accept a list as the
NEW-NAME argument.
* test/lisp/files-tests.el (files-test-locate-user-emacs-file): New
test for the above.
2025-03-09 18:24:21 +01:00
Stefan Kangas
9c6e8589ee Add test for 'locate-user-emacs-file'
* test/lisp/files-tests.el
(files-test-locate-user-emacs-file): New test.
2025-03-09 18:24:21 +01:00