1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

178707 commits

Author SHA1 Message Date
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
Po Lu
9ebcbf93ba Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs 2025-06-26 00:02:59 +08:00
Po Lu
704832f41b Attempt to fix initialization of startup variables on Android
* lisp/cus-start.el (standard): Revert last change if (featurep
'android), as Android systems perform dumping during the
initialization of the first user session.
2025-06-26 00:02:11 +08:00
Sean Whitton
d05b59c8be Improve discoverability of using dumb-emacs-ansi terminal type
* doc/emacs/misc.texi (Interactive Shell, Shell Options):
* lisp/comint.el (comint-terminfo-terminal): Mention setting
comint-terminfo-terminal to "dumb-emacs-ansi" when the system's
terminfo database contains a definition for that terminal type.
2025-06-25 16:21:54 +01:00
Elías Gabriel Pérez
6b078013f1 Allow automatically delete non-existent projects. (Bug#77566)
* etc/NEWS: Announce changes.
* lisp/progmodes/project.el (project-prune-zombie-projects): New
user option.
(project-prune-zombies-default): New function.
(project-forget-zombie-projects): Rework.
(project--ensure-read-project-list, project-prompt-project-dir)
(project-prompt-project-name): Call
'project-forget-zombie-projects' but inhibit its message.
2025-06-25 09:54:45 +03:00
Stefan Monnier
189ae7b1ed cus-start.el: Fix bug#78637
* lisp/cus-start.el <toplevel>: Test `dump-mode` rather than
`after-init-time` for `custom-delayed-init-variables`.
2025-06-24 18:24:28 -04:00
Jeremy Bryant
b687f02a73 ; * lisp/textmodes/reftex.el: Update author email (bug#77850). 2025-06-24 23:20:39 +02:00
Sean Whitton
192066d3b9 Load site-start.el before early-init.el
* lisp/startup.el (command-line): Load site-start.el before
early-init.el.
(site-run-file):
* doc/lispref/os.texi (Startup Summary, Init File):
* etc/NEWS: Document the change.
2025-06-24 17:33:39 +01:00
Andrea Corallo
baf0c82202 * Make native comp use lexbinding for sync compilations (bug#78818)
* lisp/emacs-lisp/comp.el (comp--final): Use lexical-binding in the temp file.
2025-06-23 22:04:05 +02:00
Michael Albinus
991d3ad80a Fix Tramp scripts
* lisp/net/tramp-sh.el (tramp-shell-file-name-all-completions)
(tramp-bundle-read-file-names): Fix scripts.
2025-06-23 18:00:08 +02:00
Alan Mackenzie
1a8e8203a1 CC Mode: Remove workarounds for missing "\_<", "\_>" in XEmacs
Also start using `symbols' as the PAREN argument to regexp-opt.

lisp/progmodes/cc-defs.el (c-make-keywords-re): Simplify,
remove the redundant `appendable' value of the ADORN parameter,
use the `symbols' value of the PAREN argument to regexp.
(c-emacs-features): Test that "\_<" and "\_>" work in regexps
before allowing CC Mode to start.

lisp/progmodes/cc-engine.el (c-looking-at-decl-block): When
GOTO-START is set, leave point at the _last_ Java annotation,
if any.  Clarify this in the doc string.
(c-guess-basic-syntax CASE 5G): Replace a not needed t
GOTO-START argument to c-looking-at-decl-block with nil.

lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Make the
syntax of ?@ in Java Mode symbol for processing annotations.
(c-opt-identifier-concat-key, c-opt-identifier-prefix-key)
(c-opt-after-id-concat-key, c-identifier-key)
(c-cpp-message-directives-re, c-cpp-include-key, c-pack-key)
(c-brace-stack-thing-key, c-brace-stack-no-semi-key): Replace
the `appendable' value of the ADORN argument to
c-make-keywords-re with t.
(c-annotation-re): New lang const and lang var.
(c-keywords-obarray): Replace an explicit (apply 'nconc (mapcar
... )) with c--mapcan, now that the obscure bug with mapcan in
Emacs has been resolved.

lisp/progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont)
(c-lineup-java-throws, c-snug-do-while)
lisp/progmodes/cc-awk.el (c-awk-pre-exp-alphanum-kwd-re)
(c-awk-after-if-for-while-condition-p)
(c-awk-after-function-decl-param-list)
(c-awk-after-continue-token)
(c-awk-after-rbrace-or-statement-semicolon)
(awk-font-lock-keywords)
lisp/progmodes/cc-cmds.el (c-defun-name-1)
lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist, c-forward-label, c-skip-conditional)
(c-looking-at-c++-lambda-expression, c-add-stmt-syntax)
(c-guess-basic-syntax CASE 11, CASE 12, CASE 13, CASE 15)
(CASE 5C.3, CASE 5D.4, CASE 7D)
lisp/progmodes/cc-fonts.el (c-cpp-matchers)
(c-basic-matchers-before, c-font-lock-declarations)
(c-font-lock-c++-modules, c-simple-decl-matchers)
(c-complex-decl-matchers, c-basic-matchers-after)
lisp/progmodes/cc-langs.el (c-paragraph-start)
(c-stmt-block-only-keywords-regexp)
(c-type-decl-prefix-keywords-key, c-type-decl-prefix-key)
(c-type-decl-suffix-key, c-known-type-key)
(c-enum-clause-introduction-re)
lisp/progmodes/cc-menus.el (cc-imenu-c++-generic-expression)
lisp/progmodes/cc-vars.el (c-make-noise-macro-regexps)
(c-make-macro-with-semi-re): Replace explicit "\<" and "\>"
with "\_<" and "\_>".  Replace explicit specification of
non-'_' character after word end with "\_>".  Replace
concatenation of "\<" and "\>" with regexps with (regexp-opt
... 'symbols).  Use (regexp-opt ... 'symbols) in general.
2025-06-23 11:50:07 +00:00
Stephen Berman
2b34f38b38 Optionally suppress recentf open file messages (bug#78666)
* etc/NEWS: Announce new user option.

* lisp/recentf.el (recentf-suppress-open-file-help): New defcustom.
(recentf-dialog-goto-first): Use it; otherwise, make calling
'widget-move' suppress message only for interactive recentf use.
(recentf-forward, recentf-backward): New commands, wrappers around
'widget-{forward, backward}' using 'recentf-suppress-open-file-help'.
(recentf-dialog): Use them in locally remapped key bindings.

* lisp/wid-edit.el (widget-forward, widget-backward): Add optional
argument to suppress :help-echo message and pass it to 'widget-move'.
2025-06-23 11:51:31 +02:00
Juri Linkov
edd18978aa ; Fix compilation warning in docstring of new function in treesit.el. 2025-06-23 09:54:48 +03:00
Peter Oliver
438a4cf673 Link to Tree-sitter parser sources from compatibility report
* admin/tree-sitter/treesit-admin.el
(treesit-admin--generate-compatibility-report): Add a link to the source
URL (bug#78848).
2025-06-23 09:47:36 +03:00
Peter Oliver
96858b9ced Show also tagged versions on Tree-sitter compatibility report
* admin/tree-sitter/compat-template.html: Accommodate two tables.
* admin/tree-sitter/treesit-admin.el
(treesit-admin--find-latest-compatible-revision): Pass through new arg
REVISION-TYPE.
(treesit-admin--last-compatible-grammar-for-modes): Optionally iterate
over tagged rather than all commits.
(treesit-admin--generate-compatibility-report): Generate a second table,
showing only tagged commits (bug#78848).
2025-06-23 09:47:34 +03:00
Peter Oliver
22db624c0e New function treesit--language-git-version-tags
* lisp/treesit.el (treesit--language-git-version-tags): New function to
  list version tags for a Tree-sitter parser Git repository (bug#78848).
2025-06-23 09:47:30 +03:00
Stefan Monnier
08fba517f6 (smerge-refine-shadow-cursor): New variable and face (bug#78806)
* lisp/vc/smerge-mode.el (smerge-refine-shadow-cursor): New variable
and face.
(smerge-refine-regions): Add `cursor-sensor-functions` property
to the covering overlays.
(smerge--refine-at-right-margin-p, smerge--refine-shadow-cursor):
New functions.
(smerge--refine-other-pos): New function, extracted from
`smerge-refine-exchange-point`.
(smerge-refine-exchange-point): Use it.
(smerge--refine-highlight-change): Add thin
highlighted space for insertion/deletion positions.

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect):
Run functions for `moved` events.  Demote errors.
(cursor-sensor-mode): Adjust docstring accordingly.

* doc/lispref/text.texi (Special Properties) <cursor-sensor-functions>:
Mention the new `moved` direction.
2025-06-23 00:00:38 -04:00
Jim Porter
e5ad9ae100 When navigating to anchor targets in EWW, retain 'eww-data' properties
Previously, navigating to an in-page anchor target would clear
'eww-data', removing many important properties like the original source
and the DOM.  Among other things, this prevented enabling/disabling
readable mode.

* lisp/net/eww.el (eww-follow-link): Copy previous 'eww-data'.
2025-06-22 09:29:39 -07:00
Michael Albinus
87fc539a0b Tramp: Cache also file-executable-p' in file-name-all-completions'
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Fix comment.

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Cache also `file-executable-p'.  Suggested by <mail@knazarov.com>.
(tramp-shell-file-name-all-completions): New script.
(tramp-bundle-read-file-names): Fix for special characters.  Cache
also `file-executable-p'.
(tramp-sh-handle-file-name-all-completions): Unify different cases.

* lisp/net/tramp.el (with-tramp-suspended-timers, without-remote-files):
Fix debug spec.
2025-06-22 17:29:52 +02:00
Eli Zaretskii
081c1aae99 Fix 'c-ts-mode' indentation when the style is defined as a function
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Handle the
case where 'c-ts-mode-indent-style' is a function.  (Bug#78814)
2025-06-22 11:16:53 +03:00
Eli Zaretskii
e66428a0d2 ; Fix last change
* lisp/emacs-lisp/package.el (package-mark-install-line)
(package-mark-delete-line): Doc fixes.  (Bug#78794)
2025-06-22 11:08:04 +03:00
Elías Gabriel Pérez
be0b44e4ed Pretiffy package-menu (Bug#78794)
Add package-menu mode-line which displays information about:
total number of packages installed, total number of packages
from all the packages archive, total number of packages to
upgrade and total number of new packages available.
Highlight packages marked for installation or deletion.
* lisp/emacs-lisp/package.el (package-menu-mode): Add package-menu
mode-line format to 'mode-line-misc-info'.
(package-mark-install-line, package-mark-delete-line): New faces.
(package-menu--overlay-line, package-menu--remove-overlay)
(package-menu--set-mode-line-format): New functions.
(package-menu-mark-delete, package-menu-mark-install)
(package-menu-mark-unmark, package-menu-backup-unmark)
(package-menu-mark-obsolete-for-deletion): Tweak for set/unset the
overlays.
(package-menu-mode-line-format, package-menu-mode-line-info): New
buffer-local variables.
(list-packages): Add 'package-menu--set-mode-line-format' to
'package--post-download-archives-hook'.

* etc/NEWS: Announce changes.
2025-06-22 11:04:51 +03:00
Sean Whitton
c916f816e0 ; * lisp/vc/vc.el (vc-checkin): Fix thinko. 2025-06-21 19:03:54 +01:00
Michael Albinus
c98a74cd87 * test/infra/gitlab-ci.yml (test-eglot): Fix EMACS_EXTRAOPT. 2025-06-21 16:27:46 +02:00
Eli Zaretskii
d0af57196a ; Merge from origin/emacs-30
The following commit was skipped:

1406e583fe Workaround for "M-x man" on macOS 15 and later
2025-06-21 06:26:10 -04:00
Eli Zaretskii
31febb1a28 Merge from origin/emacs-30
a2bfce5d2a ; Fix customization and doc strings in pp.el
2025-06-21 06:26:10 -04:00
Eli Zaretskii
f1696c3c27 ; * lisp/progmodes/python.el (treesit-thing-settings): Defvar. 2025-06-21 06:23:51 -04:00
Manuel Giraud
d7e5555875 Avoid rebuilding a static alist inside a loop
* lisp/calendar/diary-lib.el (diary-mark-entries-1): Build
months-alist outside of the loop.  (Bug#78779)
2025-06-21 12:39:56 +03:00
Eli Zaretskii
1406e583fe Workaround for "M-x man" on macOS 15 and later
* lisp/man.el (Man-init-defvars): Workaround for macOS Sed.  Do
not merge to master.  (Bug#77944)
2025-06-21 12:33:12 +03:00
Elías Gabriel Pérez
60fbeda771 Support strings for electric pairs (bug#78053)
This add support for insert string pairs in 'electric-pairs-mode'.
* lisp/elec-pair.el (electric-pair-pairs)
(electric-pair-text-pairs): Add new defcustom types.
(electric-pair-syntax-info)
(electric-pair-post-self-insert-function): Add support for
strings.

* etc/NEWS: Announce changes.

* test/lisp/electric-tests.el: Add new tests.
2025-06-21 12:24:55 +03:00
Eli Zaretskii
e379f14193 Fix setting custom 'c++-ts-mode' indent style
* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-style): Fix a typo.
(Bug#78814)
2025-06-21 12:10:54 +03:00