1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00
Commit graph

178740 commits

Author SHA1 Message Date
Stefan Monnier
549232e2e4 Revert "admin/gitmerge.el (gitmerge-resolve): Use replace-region-contents"
This reverts commit 17d976e22e
because the change is not worth the risk.
2025-07-01 09:24:19 -04:00
Thomas Fitzsimmons
ab568bce0c EUDC: Fix checkdoc errors
* lisp/net/eudc.el (eudc--plist-member)
(eudc-format-inline-expansion-result): Fix checkdoc errors.
2025-06-30 23:17:04 -04:00
Stefan Monnier
9a7917f886 expand.el: Simplify by always using a list in expand-list
The old code set `expand-list` to a vector of "marks" but also
supported it being set by third party code to a list.
The code to build and use the vector was a internally using
a list, so we cut the middle man and just always use a list so
it doesn't matter whether we set it or a third party code did.

* lisp/expand.el (expand-add-abbrevs): Use `mapc` instead of recursion.
(expand-add-abbrev): Add dummy `rest` arg so we can `apply` it blindly
in `expand-add-abbrevs`.
(expand-abbrev-hook): `expand-list` is never set to a vector any more.
(expand-do-expansion): Set `expand-list` to a list rather than a vector.
(expand-abbrev-from-expand): Use `abbrev-symbol`.
(expand-build-list, expand-build-marks): Delete functions, not used
any more.
2025-06-30 19:57:04 -04:00
Roi Martin
0ac21120cf Update `fill-region-as-paragraph-semlf' to follow fill.el protocols
Update the `fill-region-as-paragraph-semlf' function to follow the
`fill-region-as-paragraph-function' protocol.  This allows us to
reimplement the `fill-paragraph-semlf' function using `fill-paragraph'
and `fill-region-as-paragraph-function'.
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Make this
function compatible with `fill-region-as-paragraph-function'.  Avoid
narrowing.
(fill-paragraph-semlf): Reimplement using `fill-paragraph' and
`fill-region-as-paragraph-function'.
* test/lisp/textmodes/fill-tests.el (fill-test-semlf-fill-region): Add
test.
(fill-test-fill-paragraph-semlf-fill-paragraph-function): Remove test.
(fill-test-fill-paragraph-semlf, fill-test-semlf)
(fill-test-fill-paragraph-semlf-justify, fill-test-semlf-justify)
(fill-test-fill-paragraph-semlf-sentence-end-double-space)
(fill-test-semlf-sentence-end-double-space)
(fill-test-fill-paragraph-semlf-fill-column, fill-test-semlf-fill-column)
(fill-test-fill-paragraph-semlf-punctuation-marks)
(fill-test-semlf-punctuation-marks, fill-test-fill-paragraph-semlf-twice)
(fill-test-semlf-twice, fill-test-fill-paragraph-semlf-fill-prefix)
(fill-test-semlf-fill-prefix)
(fill-test-fill-paragraph-semlf-indented-block)
(fill-test-semlf-indented-block, fill-test-fill-paragraph-semlf-revert)
(fill-test-semlf-revert, fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-semlf-emacs-lisp-mode, fill-test-fill-paragraph-semlf-c-mode)
(fill-test-semlf-c-mode, fill-test-fill-paragraph-semlf-org-mode)
(fill-test-semlf-org-mode, fill-test-fill-paragraph-semlf-markdown-mode)
(fill-test-semlf-markdown-mode): User shorter function names consistent
with erts file names.
* test/lisp/textmodes/fill-resources/semlf-fill-region.erts: Add test
data.
* test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts:
Delete file.
* test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts: Remove
newlines around indented block.
* doc/lispref/text.texi (Filling): Highlight that
`fill-region-as-paragraph-function' changes the behavior of
`fill-paragraph'.
2025-06-30 17:33:43 -04:00
Stefan Monnier
3efdb553e4 lisp/autoinsert.el (auto-insert-alist): Don't quote lambda 2025-06-30 11:28:34 -04:00
Stefan Monnier
17d976e22e admin/gitmerge.el (gitmerge-resolve): Use replace-region-contents 2025-06-30 00:37:15 -04:00
Juri Linkov
b13c583bc7 Better fix for ignoring 'tab-bar-lines' in daemon's initial frame
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines):
Revert '(not (daemonp))' to update 'default-frame-alist'
even in daemon mode (bug#78896).

* lisp/frame.el (frame-notice-user-settings): For daemon's
initial frame don't modify the frame parameter 'tab-bar-lines'.
2025-06-29 20:06:06 +03:00
Juri Linkov
7fd846f61e Display SVG images inline in Gnus
* lisp/gnus/mm-decode.el (mm-inline-media-tests): Add "image/svg+xml".
2025-06-29 19:39:29 +03:00
Sean Whitton
7bf2a61623 ; * lisp/vc/vc-git.el (vc-git-print-log): Improve wording. 2025-06-29 16:30:13 +01:00
Sean Whitton
d23b605f75 VC: Fix several START-REVISION versus LIMIT issues
* lisp/vc/vc-git.el (vc-git-print-log): When LIMIT and
START-REVISION are both supplied, use START-REVISION as the
newest commit, and LIMIT as a base (problem was introduced in
the commit adding 'vc-diff-mergebase' and 'vc-log-mergebase').
* lisp/vc/vc.el (vc-default-log-incoming)
(vc-default-log-outgoing): Fix order of START-REVISION and LIMIT
arguments passed to 'print-log' backend function.
(vc-log-mergebase): Fix order of START-REVISION and LIMIT
arguments passed to 'vc-print-log-internal'.
2025-06-29 14:53:37 +01:00
Paul Eggert
30bfb03adf Update from Gnulib by running admin/merge-gnulib 2025-06-29 06:07:52 -07:00
Michael Albinus
bd04818e53 Adapt Tramp versions
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2025-06-29 11:03:05 +02:00
Eli Zaretskii
036c95bbf6 ; * test/lisp/textmodes/fill-tests.el (markdown-mode): Declare. 2025-06-29 07:38:55 +03:00
Roi Martin
99ec286d78 Add variable `fill-region-as-paragraph-function'
Add the variable `fill-region-as-paragraph-function' to provide
a way to override how functions like `fill-region' fill text.
* doc/lispref/text.texi (Filling): Document
`fill-region-as-paragraph-function' variable.
* doc/emacs/text.texi (Fill Commands): Reference
`fill-region-as-paragraph-function' variable.
* lisp/textmodes/fill.el (fill-region-as-paragraph-function):
Add variable.
(fill-region-as-paragraph): Convert into
`fill-region-as-paragraph-function' wrapper.
(fill-region-as-paragraph-default): Rename old
`fill-region-as-paragraph' function.
(fill-region-as-paragraph-semlf): Update calls to
`fill-region-as-paragraph-default'.
(fill-region): Add reference to `fill-region-as-paragraph-function'
in doc string.
* test/lisp/textmodes/fill-tests.el (fill-test-fill-region): Add
test case for the `fill-region' function.
* test/lisp/textmodes/fill-resources/fill-region.erts: Add test
data.  (Bug#78816)
2025-06-29 07:33:24 +03:00
Zach Shaftel
bca0ce9d07 Add new gv place definitions
* lisp/emacs-lisp/gv.el (char-table-extra-slot, char-table-parent)
(default-toplevel-value, marker-insertion-type, process-plist)
(process-query-on-exit-flag, process-thread, lookup-key)
(window-prev-buffers, window-next-buffers, window-new-normal, font-get)
(charset-plist, get-charset-property): Add gv-setters.
(terminal-parameter): Fix the return value.  (Bug#78291)
2025-06-29 07:29:25 +03:00
Po Lu
987cd7012d Properly invalidate XRender surfaces when only EmacsFrame is resized
* src/xterm.c (handle_one_xevent): Drop XRender surfaces when
the frame widget is resized, rather than when the toplevel is.
(bug#77988)
2025-06-28 22:14:35 +08:00
Po Lu
acefe3bb12 Fix the DJGPP port
* msdos/sedlibmk.inp (NEXT_AS_FIRST_DIRECTIVE_STDCKDINT_H)
(NEXT_STDCKDINT_H): Define to presumably unused values.
2025-06-28 21:51:31 +08:00
Eli Zaretskii
131cde2f86 Merge from origin/emacs-30
6299eb0fe5 bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp
982938363a Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
e68ad70af6 Fix 'insert-directory' in Turkish language-environment
f805f51373 Fix job control in remote shell
039ad15373 ; * doc/emacs/package.texi (Package Statuses): Clarify "n...
2025-06-28 06:57:19 -04:00
Pip Cet
6b19eb53c5 Avoid extra output in Vprin1_to_string_buffer (bug#78842)
print_error_message can throw after producing some output, so use
unwind-protect to ensure prin1-to-string-buffer is cleared.

* src/print.c (erase_prin1_to_string_buffer): New.
(Ferror_message_string): Use it to catch errors thrown in
'print_error_message'.
* test/src/print-tests.el (error-message-string-circular): Expand
test.
2025-06-28 10:46:08 +00:00
Liam Hupfer
6299eb0fe5 bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp
Align the js-ts-mode entry with the javascript-mode entries in the
default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is
not associated with .js files.

* lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp.

Fixes: 2023-01-20 6b2f85caa6 "Make tree-sitter based modes optional"
2025-06-28 13:11:01 +03:00
Manuel Giraud
c64b2bf113 Avoid flicker when marking diary entries (bug#78861)
* lisp/calendar/calendar.el (calendar-generate-window): Remove
historical and not really understood `sit-for' calls.
2025-06-28 12:52:11 +03:00
Protesilaos Stavrou
202a7039a2 Define dedicated faces for the package.el mode line
* lisp/emacs-lisp/package.el
(package-menu--set-mode-line-format): Apply the faces.
(package-mode-line-total, package-mode-line-installed)
(package-mode-line-to-upgrade, package-mode-line-new): Define
the faces.  (Bug#78867)
2025-06-28 12:50:22 +03:00
Rahguzar
2e18b0bbe9 * lisp/pcmpl-rpm.el: Generate completions for dnf5
(pcmpl-rpm-dnf-cache-file): Remove now unused variable.
(pcmpl-rpm--dnf-packages): Use dnf repoquery.
(pcomplete/dnf): Adjust regexps to allow for help format of
dnf5.  New regexps works for both dnf4 and dnf5.  Add
aliases for better subcommand completion.  Better support
for dnf repoquery command.  (Bug#78661)
2025-06-28 12:45:12 +03:00
Eli Zaretskii
f5316b2d92 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-06-28 12:41:53 +03:00
Maxim Cournoyer
08b0dd890f bug#78845: [PATCH 2/2] doc: Document desktop notifications for Gnus
* doc/misc/gnus.texi (Notifications): Add section.
2025-06-28 12:35:13 +03:00
Sean Whitton
6cd9574e20 vc-dir-update: Update 'backend' VC properties
* lisp/vc/vc-dir.el (vc-dir-update): Update 'backend' VC file
properties from ENTRIES.  This resolves some issues relating to
cache invalidation.
* lisp/vc/vc-hooks.el (vc-backend): Improve docstring.
2025-06-28 10:30:29 +01:00
Maxim Cournoyer
d04b5d2445 bug#78845: [PATCH 1/2] doc: Update Texinfo menus.
Generated from Emacs via M-x texinfo-all-menus-update, and dropping
changes made due to limitations of the tool.
2025-06-28 12:30:01 +03:00
Eli Zaretskii
b4d3ac1e04 Revert "function-put: signal error with non-symbol"
This reverts commit a4ec9ca129.
It caused unnecessary errors, see bug#78593.
2025-06-28 12:01:13 +03:00
Eli Zaretskii
70d0528fc8 Fix setting viper-d-com in viper
* lisp/emulation/viper-cmd.el (viper-put-back, viper-Put-back):
Move setting the marker to after the call to
'viper-set-destructive-command'.  Suggested by Michael Scott
<scott@cs.rochester.edu>.  (Bug#78220)
2025-06-28 11:44:40 +03:00
Elías Gabriel Pérez
eda47cd2a8 Add tool bar icons to package menu. (Bug#78601)
* etc/images/package-menu/README:
* etc/images/package-menu/delete.xpm:
* etc/images/package-menu/execute.xpm:
* etc/images/package-menu/info.xpm:
* etc/images/package-menu/install.xpm:
* etc/images/package-menu/unmark.xpm:
* etc/images/package-menu/upgrade.xpm:
* etc/images/package-menu/url.xpm:
* etc/images/package-menu/delete.pbm:
* etc/images/package-menu/execute.pbm:
* etc/images/package-menu/info.pbm:
* etc/images/package-menu/install.pbm:
* etc/images/package-menu/unmark.pbm:
* etc/images/package-menu/upgrade.pbm:
* etc/images/package-menu/url.pbm: New files.
* lisp/emacs-lisp/package.el (package-menu--tool-bar-map): New
variable.
(package-menu-mode): Set tool bar.
* lisp/term/pgtk-win.el (x-gtk-stock-map):
* lisp/term/x-win.el (x-gtk-stock-map): Add new icons to alist.
2025-06-28 11:34:41 +03:00
Eli Zaretskii
1e9167d22a ; * lisp/cus-start.el (standard): Improve commentary (bug#78637). 2025-06-28 09:56:08 +03:00
Paul Eggert
dd1efa5309 Port varargs macros better to C99
C99 prohibits passing zero args to macro’s ‘...’.
* lib-src/seccomp-filter.c (RULE0): New macro, which is like RULE
except with zero args.  All zero-arg uses of RULE changed to RULE0.
* src/comp.c (compile_function, Fcomp__init_ctxt, syms_of_comp):
Change ‘CALLN (Fmake_hash_table)’ to ‘Fmake_hash_table (0, NULL)’,
since CALLN requires at least two args in C99.
2025-06-27 23:54:45 -07:00
Paul Eggert
dbdf761187 Update from Gnulib by running admin/merge-gnulib 2025-06-27 23:06:40 -07:00
Stefan Monnier
68100ca656 (peg-parse): Fix bug#78884
* lisp/progmodes/peg.el (peg-parse): Be more careful when
testing if a symbol is the name of an existing rule.  Improve docstring.

test/lisp/progmodes/peg-tests.el (peg-tests--peg-parse): New test.
2025-06-27 23:12:40 -04:00
Stefan Monnier
6c0bbf0f92 (Finsert_file_contents): Refine commit d07af40d88
* src/fileio.c (Finsert_file_contents): Inhibit ask-supersession
only if we're VISITing in a non-narrowed buffer (bug#78866).

* test/src/fileio-tests.el (ert--tests-dir): New var.
(fileio-tests--insert-file-contents-supersession): New test.
2025-06-27 23:11:39 -04:00
Stefan Monnier
cb484ead91 cus-start.el: Reliably distinguish preload from nonpreload
`dump-mode` can be nil even if we're about to dump (this is
done in the Android build), so don't rely on it to distinguish
if `cus-start` is loaded from `loadup.el` vs loaded during
a "normal run".

* lisp/loadup.el (cus-start): Bind `cus-start--preload`.
* lisp/cus-start.el: <top-level>: Test it rather than `dump-mode`.
2025-06-27 22:55:17 -04:00
Sean Whitton
a132ca9a54 vc-annotate: Fix ever-lengthening buffer names
* lisp/vc/vc-annotate.el (vc-annotate): Rewrite code to generate
the buffer name so that when switching from annotating one
revision to annotating another, we don't embed the old name of
the vc-annotate buffer directly into its new one (bug#78890).
2025-06-27 21:20:06 +01:00
Juri Linkov
cd8319677d * lisp/tab-bar.el: Ignore daemon's initial frame (bug#78896).
(tab-bar--update-tab-bar-lines): Don't set the frame parameter
'tab-bar-lines' in daemon's initial frame because it messes up the
frames when 'format-mode-line' called from 'tab-bar-format-global'
on daemon's initial frame forces focus switch to daemon's initial
frame.  Also don't set 'default-frame-alist' in daemon mode because
'frame-notice-user-settings' copies the frame parameter 'tab-bar-lines'
from 'default-frame-alist' to daemon's initial frame.  Here updating
'default-frame-alist' is not much needed anyway since the frame
parameter 'tab-bar-lines' for new frames is set in 'make_terminal_frame'
and 'x-create-frame'.  'default-frame-alist' might be need only
to handle non-default 'tab-bar-show', but this can be handled by
'toggle-frame-tab-bar' called from 'server-after-make-frame-hook'.
(toggle-frame-tab-bar): Document a useful case of calling it
from 'server-after-make-frame-hook'.
2025-06-27 20:41:05 +03:00
Sean Whitton
e25ee1082f ; * lisp/vc/vc-dispatcher.el (vc-finish-logentry): Fix thinko. 2025-06-27 14:18:14 +01:00
Sean Whitton
0c0ac8d48a 'C-u C-x .' clears the fill prefix
* lisp/textmodes/fill.el (set-fill-prefix): When called
interactively with a prefix argument, clear the fill prefix,
just like how 'C-u C-x C-n' clears the goal column.
* doc/emacs/text.texi (Fill Prefix):
* etc/NEWS: Document the change.
2025-06-27 14:14:36 +01:00
Sean Whitton
772099bc9b New user option vc-dir-save-some-buffers-on-revert
* lisp/vc/vc-dir.el (vc-dir-save-some-buffers-on-revert):
New user option.
(vc-dir-refresh): Use it.
* etc/NEWS: Document it.
2025-06-27 12:39:29 +01:00
Phil Sainty
d70f1e0cfe ; * lisp/proced.el (proced-update): Support non-symbol proced-filter values
Avoid errors like "Wrong type argument: symbolp, ((args . "REGEXP"))"
when `proced-filter' is a list of elementary filters.
2025-06-27 18:46:30 +12:00
Stefan Monnier
a002ca79ee lisp/vc/smerge-mode.el (smerge--refine-highlight-change): Fix misalignment 2025-06-26 12:55:27 -04:00
Eli Zaretskii
80cb688b04 Fix *Help* text when a command is bound to a single key
* lisp/help-fns.el (help-fns--key-bindings): Don't insert
redundant period.  (Bug#78905)
2025-06-26 17:39:19 +03:00
Jim Porter
2bdcf0250a When making a readable page in EWW, include the <title> and similar tags
* lisp/net/eww.el (eww--walk-readability, eww-readable-dom): New
functions.
(eww-display-html): Call 'eww-readable-dom'.
(eww-readable): Call 'eww-readable-dom'.  Don't copy over 'eww-data'
properties that our new readable page can handle on its own.
(eww-score-readability): Rewrite in terms of 'eww--walk-readability'.
Make obsolete.
(eww-highest-readability): Make obsolete.

* test/lisp/net/eww-tests.el (eww-test--lots-of-words)
(eww-test--wordy-page): New variables...
(eww-test/readable/toggle-display): ... use them.
(eww-test/readable/default-readable): Make sure that the readable page
includes the <title> and <link> tags (bug#77299).
2025-06-25 21:26:04 -07:00
James Cherti
faae9f572a Fix yaml-ts-mode comment-start-skip to improve commenting/uncommenting
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Fix 'comment-start-skip'
value to resolve an issue when commenting/uncommenting using the
'comment-or-uncomment-region' function.  The previous 'comment-start-skip'
value left some "-" uncommented after commenting and uncommenting
multiple YAML indented blocks (bug#78892).

Copyright-paperwork-exempt: yes
2025-06-25 21:50:06 +03:00
Juri Linkov
80f2f07c48 Add alternative "ruby-lsp" to eglot-server-programs.
* lisp/progmodes/eglot.el (eglot-server-programs):
Add "ruby-lsp" to eglot-alternatives for ruby-mode and ruby-ts-mode.
https://shopify.github.io/ruby-lsp/editors.html#emacs-eglot
2025-06-25 20:07:17 +03:00
Juri Linkov
f3c755129f Improve treesit settings for python-ts-mode (bug#73404).
* lisp/progmodes/python.el (python--thing-settings):
For the 'sexp' thing use all nodes except top-level
grouping nodes, comments and parens.  Add the 'list' thing.
(python-ts-mode): Use setq-local for treesit-thing-settings.
Modify 'forward-sexp-function' and 'treesit-sexp-thing'
after calling 'treesit-major-mode-setup'.
2025-06-25 19:57:05 +03:00
Juri Linkov
789a6b9693 Fix usage of 'treesit-defun-type-regexp' in treesit-tests.
* test/src/treesit-tests.el (treesit--ert-test-defun-navigation):
Replace 'treesit-defun-type-regexp' with
'(or treesit-defun-type-regexp 'defun)' that fixes the tests
for ts-modes that set up the 'defun' thing instead of
'treesit-defun-type-regexp'.
2025-06-25 19:45:54 +03:00
Eli Zaretskii
982938363a Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs into emacs-30 2025-06-25 12:19:36 -04:00