Commit Graph

176079 Commits

Author SHA1 Message Date
Eli Zaretskii
b63ba892f9 Update eln-cache when --init-directory is used
* lisp/startup.el (normal-top-level): Update eln-cache after
'user-emacs-directory' is set by --init-directory.  Patch by
Jordan Isaacs <jordan@snowytrees.dev>.  (Bug#75022)
2025-01-04 14:44:10 +02:00
Lin Sun
5fe7f86367 * lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers
This avoids aborting the loop if an error happens in some buffer.
(Bug#74881)
2025-01-04 14:37:42 +02:00
Eli Zaretskii
742b792175 Fix mouse clicks on characters with parenthesis syntax
* lisp/mouse.el (context-menu-region, mouse-skip-word)
(mouse-start-end): Use 'syntax-after' instead of 'char-syntax', to
pay attention to 'syntax-table' text properties.  (Bug#74415)
2025-01-04 12:51:40 +02:00
Filippo Argiolas
752ba27425 Improve doxygen font-lock rules in c-ts-mode (bug#75012)
And also c++-ts-mode.

* lisp/progmodes/c-ts-common.el:
(c-ts-mode-doxygen-comment-font-lock-settings): Add rules for type,
storageclass and note/warning/error tags.

Copyright-paperwork-exempt: yes
2025-01-03 23:38:32 -08:00
Yuan Fu
a9c1620809 ; Minor change in treesit-admin--generate-compatibility-report
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--generate-compatibility-report): Use th for
languages.
2025-01-03 23:38:32 -08:00
Yuan Fu
d32f3eed99 ; Minor rephrasing in treesit-admin--verify-major-mode-queries
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Minor rephrase.
2025-01-03 23:38:32 -08:00
Daniel Colascione
b828d36ded Automatically redraw frames for filtered faces
Automatically redraw frames when we detect that a window
parameter used in a face filter is changed.  (Bug#75291)

* src/window.c (Fset_window_parameter): redraw window, actually
whole frame in this implementation, on face-relevant parameter
change
(syms_of_window): add window_auto_redraw_on_parameter_change
* src/xfaces.c (evaluate_face_filter): record properties
2025-01-03 23:48:41 -05:00
Stefan Kangas
8e9317a1de Extract new function man--maybe-fontify-manpage
* lisp/man.el (man--maybe-fontify-manpage): Extract function from...
(Man-getpage-in-background, Man-update-manpage)
(Man-bgproc-filter): ...here.
2025-01-03 22:10:51 +01:00
Stefan Kangas
e825502ded ; Fix indentation 2025-01-03 21:32:16 +01:00
Jonas Bernoulli
58df9e272b Update to Transient v0.8.3-2-gf0478b29 2025-01-03 19:51:08 +01:00
Stefan Monnier
3740d9c838 (mpc-cmd-find): Try and fix bug#41493
* lisp/mpc.el (mpc--proc-alist-to-alists): Don't presume that we
have either `directory` or `file` entries, instead allow both at
the same time.
(mpc-cmd-find) <Directory>: Don't presume that `directory`
entries have no associated data, so throw them away only after
having parsed them with `mpc--proc-alist-to-alists`.
2025-01-03 13:24:26 -05:00
Stefan Kangas
e0b4e9ece9 Add more text-based browser alternatives
* lisp/net/browse-url.el (browse-url-text-browser): Add more
alternatives.
2025-01-03 17:32:58 +01:00
Stefan Kangas
279a7d950f Improve temporary file handling in browse-url
* lisp/net/browse-url.el (browse-url-delete-temp-file): Don't add
to kill-buffer-hook on top level.
(browse-url--temp-file-setup): New macro to set 'kill-buffer-hook'
buffer-locally to above function when creating a temporary file.  Use
stricter permissions to protect user privacy on multi-user systems.
(browse-url-of-file, browse-url-of-buffer): Use above new macro.

(browse-url-delete-temp-file): Simplify calling convention by removing
unused argument.
2025-01-03 07:51:21 +01:00
Po Lu
b683280f87 ; * exec/configure.ac (config-mips.m4): Fix typo. 2025-01-03 13:04:34 +08:00
Stefan Kangas
597161fe1e Remove gnudoit support from browse-url.el
* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args, browse-url-w3-gnudoit): Remove support
for gnudoit, obsolete since Emacs 25.1.
2025-01-03 04:08:44 +01:00
Stefan Kangas
004a48b3d4 Re-enable caching for 'M-x man' completion on macOS
On macOS, getting the completion results when you type 'M-x man RET' can
take up to several seconds, even on a reasonably modern MacBook Pro,
probably due to the lack of man-db and the need to process the output.

Caching of "man -k ^" completion results was added in 2009 due to
perceived slowness on some systems, but was unfortunately effectively
disabled again in 2013.  Let's re-enable it on macOS.

* lisp/man.el (Man-cache-completion-results-flag): New variable
set to t by default on macOS, and nil elsewhere.
(man): Cache completion results when above new variable is t.
2025-01-03 03:12:37 +01:00
Stefan Kangas
58c95e9bab New defgroup man-faces
* lisp/man.el: Delete redundant option :group specifiers.
(man-imenu-title): New defgroup.
(Man-overstrike, Man-underline, Man-reverse): Add faces to above
new defgroup.
2025-01-02 22:00:16 +01:00
Stefan Kangas
ca79916179 Respect 'manual-program' variable
* lisp/man.el (Man-man-k-flags): Respect 'manual-program'
variable.
2025-01-02 21:24:48 +01:00
Stefan Monnier
8f81c2b02f (describe-variable): Fix bug#73872
* lisp/help-fns.el (describe-variable): Put a `syntax-table` property
on the printed value for better navigation.  Remove `set-syntax-table`
since `lisp-data-mode` already did it.
(describe-variable): Remove `set-syntax-table`, not needed any more.

* lisp/help-mode.el (help-mode-syntax-table): `;` shouldn't start a comment.
(help-make-xrefs): Use `with-syntax-table`.
2025-01-02 14:58:10 -05:00
Paul Eggert
f65520cad4 admin/merge-gnulib now warns if module lists change
From suggestions by Eli Zaretski and Stefan Kangas in:
https://lists.gnu.org/r/emacs-devel/2025-01/msg00036.html
https://lists.gnu.org/r/emacs-devel/2025-01/msg00037.html
* admin/merge-gnulib: For style consistency,
prefer ‘[ EXPR ]’ to ‘test EXPR’ and prefer -e to -f.
Fix bug that forgot to clean lib directory if it’s ./lib.
Check for lib/gnulib.mk.in, which we used directly, not ‘configure’.
(LC_ALL): Set to C.
(autogen): New function, to make it clearer to user when
commands are operating in some other directory.
(get_module_list): New function.
(old_modules, new_modules): New vars.
If they differ, issue a warning.
2025-01-02 11:30:33 -08:00
Stefan Monnier
fba3c7ff3f Prefer %S format over %s for non strings
* lisp/reveal.el (reveal-open-new-overlays, reveal-close-old-overlays):
* lisp/gnus/nnimap.el (nnimap-header-parameters)
(nnimap-make-process-buffer):
* lisp/gnus/nntp.el (nntp-make-process-buffer):
* lisp/progmodes/flymake.el (flymake--disable-backend):
* lisp/simple.el (next-error-internal):
Prefer `%S` format over `%s` for non strings.
2025-01-02 14:29:49 -05:00
Roland Winkler
2a5725b99a Fix NEWS entries for BibTeX mode. 2025-01-02 09:11:04 -06:00
Po Lu
1bc8412ecb ; Fix the MS-DOS build
* msdos/sedlibmk.inp: Adapt to new GNulib module names.
2025-01-02 20:29:12 +08:00
Po Lu
be9577d4a1 Fix volatile Android build
* exec/Makefile.in (config-mips.m4): Call config.status in
builddir.
2025-01-02 20:26:56 +08:00
Eli Zaretskii
d0b9d35fbf Adjust nt/gnulib-cfg.mk to recent Gnulib import
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_dirent-h)
(OMIT_GNULIB_MODULE_inttypes-h-incomplete)
(OMIT_GNULIB_MODULE_stdio-h, OMIT_GNULIB_MODULE_stdlib-h)
(OMIT_GNULIB_MODULE_sys_select-h, OMIT_GNULIB_MODULE_sys_stat-h)
(OMIT_GNULIB_MODULE_sys_time-h, OMIT_GNULIB_MODULE_sys_types-h)
(OMIT_GNULIB_MODULE_unistd-h): Rename to follow Gnulib renaming
the modules from "FOO" to "FOO-h".
2025-01-02 09:44:44 +02:00
Eli Zaretskii
b082a8d951 ; Fix recent changes in bibtex.el documentation
* lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist)
(bibtex-BibTeX-field-alist): Doc fixes.

* etc/NEWS: Fix format of a new bibtex entry.
2025-01-02 09:44:09 +02:00
Roland Winkler
b26418694e Provide more flexibility for definition of BibTeX entries.
* lisp/textmodes/bibtex.el (bibtex-aux-opt-alist): Rename from
bibtex-user-optional-fields.
(bibtex-BibTeX-entry-alist, bibtex-biblatex-entry-alist): Permit
aliases that inherit their definition from another entry.
(bibtex-BibTeX-aux-entry-alist, bibtex-biblatex-aux-entry-alist)
(bibtex-BibTeX-aux-opt-alist, bibtex-biblatex-aux-opt-alist): New
user variables.
(bibtex-entry-alist): Honor these new variables.
(bibtex-field-alist): New function.
(bibtex-include-OPTkey): Default changed to nil, declared
obsolete.  Use bibtex-aux-opt-alist instead.
(bibtex-set-dialect): Use cl-flet and bibtex-field-alist.
(bibtex-dialect-select-map): New variable.
(bibtex-init-dialect): New function.
(bibtex-field-list): Simplify.
(bibtex-print-help-message): Bug fix.
2025-01-01 23:09:58 -06:00
Stefan Kangas
fec6078f62 * lisp/progmodes/grep.el (grep-mode-map): Improve docstring. 2025-01-02 02:49:51 +01:00
Stefan Kangas
885f6993b7 Prefer defvar-keymap in grep.el
* lisp/progmodes/grep.el (grep-mode-map, grep-edit-mode-map):
Prefer defvar-keymap.
2025-01-02 02:49:51 +01:00
Stefan Kangas
21c7c594e8 ; Update missed copyright year 2025-01-02 02:41:55 +01:00
Paul Eggert
3adf3f546e Update from Gnulib by running admin/merge-gnulib 2025-01-01 15:19:02 -08:00
Paul Eggert
bdb13a0e5c Adjust to Gnulib’s recent module renaming
* admin/merge-gnulib (GNULIB_MODULES, AVOIDED_MODULES):
Change to match Gnulib’s current module names.
2025-01-01 15:19:02 -08:00
Wilson Snyder
78bc5949db verilog-mode.el update from upstream https://github.com/veripool/verilog-mode
* lisp/progmodes/verilog-mode.el (verilog-repair-open-comma): Fix AUTOINPUT, etc.
adding comma after attribute (#1884).
(verilog-do-indent) Imporve ident of delay control assignments (#1883)
2025-01-01 08:22:50 -05:00
Paul Eggert
b36b1be491 Fix copyright years by hand
These are dates that admin/update-copyright did not update.
2025-01-01 07:41:51 +00:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Paul Eggert
5d70928f2a Sync build-aux/update-copyright from Gnulib
* build-aux/update-copyright: Copy from Gnulib.
This should simplify this year's updating.
2024-12-31 23:37:57 -08:00
Alan Mackenzie
643e32340d CC Mode: Fix various minor indentation bugs
As part of this, introduce a second anchor point to the
syntactic symbols brace-list-intro and enum-intro, the position
of the opening brace.

* lisp/progmodes/cc-align.el
(c-lineup-item-after-paren-at-boi): New function.

* /lisp/progmodes/cc-engine.el
(c-foreign-truncate-lit-pos-cache)
(c-foreign-init-lit-pos-cache): Use
c-truncate-lit-pos/state-cache in place of an older function.
(c-no-bracelist-cache): Update its definition to exclude
conses.
(c-strip-conses): New function.
(c-inside-bracelist-p): Use c-strip-conses.
(c-add-stmt-syntax): In the "go out a block" loop, go out of a
brace at BOI when there's non-whitespace text after it.
Refactor an `if' form containing a cond form into a cond form.
Add the new second second anchor point into syntactic contexts
with brace-list-intro and enum-intro.  Anchor brace-list-close
and enum-close elements on the individual declarations in
struct, etc., variable declarations.
(c-guess-basic-syntax, CASE 20): Use the new constraint-cont
syntactic symbol.
(c-guess-basic-syntax, CASE 9B): Anchor brace-list-close and
enum-close elements on the individual declarations in struct,
etc., variable declarations.
(c-guess-basic-syntax, CASEs 9C, 9D): Add the new second anchor
point into brace-list-intro and enum-intro syntactic contexts.

* lisp/progmodes/cc-mode.el (c-locate-first-punctuation-prop):
New function.
(c-depropertize-CPP): Use c-locate-first-punctuation-prop.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the
entries for constraint-cont, brace-list-intro, and enum-intro,
using c-lineup-item-after-paren-at-boi.

* doc/misc/cc-mode.texi (List Line-Up): Add a description of
c-lineup-item-after-paren-at-boi.
2024-12-31 18:39:57 +00:00
Pip Cet
2f1052d9b0 ; * src/doc.c (store_function_docstring): Fix typo. 2024-12-30 21:55:38 +00:00
Juri Linkov
687ff86e80 Improve treesit-forward-sexp-list, treesit-down-list, treesit-up-list
* lisp/treesit.el (treesit-forward-sexp-list): Rewrite to support
the value of ARG more than 1.  In this case every step moves forward
either over the next treesit-based list or over the syntax-based symbol.
(treesit-down-list, treesit-up-list): Rewrite to support the fallback
to the syntax-based navigation while inside the treesit-based list.
Also use a loop for ARG more than 1 (bug#73404).
2024-12-30 20:07:40 +02:00
Juri Linkov
4068948a74 * lisp/treesit.el (treesit-show-paren-data--categorize): Fix it.
Copy the implementation of treesit-parent-until here, and call
its treesit-node-match-p with the argument IGNORE-MISSING set to t
that causes it to fail silently instead of raising an error when
the predicate 'sexp-list' is not defined in an embedded language.
(treesit-major-mode-setup): Set show-paren-data-function to
treesit-show-paren-data only when 'sexp-list' thing is defined
that is used by treesit-show-paren-data--categorize (bug#75198).
2024-12-30 19:54:39 +02:00
Michael Albinus
7671d50b14 ; Minor Tramp changes
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process):
Don't use connection property "remote-command", it's superfluous.

* lisp/net/tramp-archive.el (tramp-archive-local-file-name):
Add `tramp-archive-method' to `tramp-methods' temporarily.
2024-12-30 12:42:00 +01:00
Yuan Fu
ec3f9434c7 Make typescript-ts-mode work with latest grammar
* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode--font-lock-compatibility-bb1f97b): Return dummy
query when neither query works.  In latest grammar, neither will
work, because typescript grammar doesn't include jsx grammar
anymore.
2024-12-30 00:21:55 -08:00
Yuan Fu
732a1108b0 Add verified grammar version comment for tree-sitter modes
* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/html-ts-mode.el: Add comments.
2024-12-30 00:21:46 -08:00
Yuan Fu
0b1986ba52 Generate compatibility report for multiple Emacs versions
* admin/tree-sitter/compat-template.html: Update template.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--builtin-language-sources): Add sources.
(treesit-admin--builtin-modes): New variable.
(treesit-admin--verify-major-mode-queries): Don't need to pass
LANGS argument anymore.
(treesit-admin-verify-major-mode-queries): Move, and use
treesit-admin--builtin-modes.
(treesit-admin--mode-languages): Set some variables so it gets
all the languages.
(treesit-admin--find-latest-compatible-revision): Also return
commit timestamp.
(treesit-admin--generate-compatibility-report): New parameter
EMACS-EXECUTABLES.  Support generating report for multiple Emacs
versions.
* lisp/treesit.el (treesit--language-git-timestamp): New function.
2024-12-30 00:20:55 -08:00
Yuan Fu
d9cfe1fe92 Add treesit-admin-generate-compatibility-report
This function can generate a HTML report on latest compatible
grammar versions for each major mode.

* admin/tree-sitter/compat-template.html: Update.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--validate-mode-lang): Change so that emacs 30 can
also run it.
(treesit-admin--find-latest-compatible-revision): Support
running checks with a different Emacs executable.
(treesit-admin--generate-compatibility-report): New function.
2024-12-30 00:20:55 -08:00
Yuan Fu
5ec170985f ; Move treesit-admin into tree-sitter directory
* admin/tree-sitter/compat-template.html: New file.
* admin/tree-sitter/treesit-admin.el: Move.
2024-12-30 00:20:55 -08:00
Yuan Fu
c9624c2111 Add treesit-admin--last-compatible-grammar-for-modes
This function computes the latest compatible grammar version for
each major mode.

* admin/treesit-admin.el (treesit-admin-file-name): Move.
(treesit-admin--compat-template-file-name): New variable.
(treesit-admin--mode-languages): New function.
(treesit-admin--find-latest-compatible-revision): Return a plist
instead.
(treesit-admin--last-compatible-grammar-for-modes): New function.
2024-12-30 00:20:54 -08:00
Yuan Fu
d5ad51f25f Add treesit-admin--find-latest-compatible-revision
This function can find the last grammar revision that is
compatible with a major mode.

* admin/treesit-admin.el (treesit-admin-file-name): New
variable.
(treesit-admin--validate-mode-lang):
(treesit-admin--find-latest-compatible-revision): New functions.
2024-12-30 00:20:54 -08:00
Yuan Fu
9e1e9fdff4 Refactor treesit-admin--verify-major-mode-queries
Make treesit-admin--verify-major-mode-queries use
treesit--install-language-grammar-1, rathre than the interactive
command treesit-install-language-grammar.

* admin/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Add parameter
SOURCE-ALIST.  Use treesit--install-language-grammar-1.
(treesit-admin-verify-major-mode-queries): Pass
treesit-admin--builtin-language-sources to
treesit-admin--verify-major-mode-queries.

* lisp/treesit.el (treesit-install-language-grammar): Don't
return revision of the git repo.
2024-12-30 00:20:54 -08:00
Yuan Fu
e2f7917152 Refactor treesit--install-language-grammar-1
Separate treesit--install-language-grammar-1 into two functions,
one clones the repository, the other builds and installs the
grammar.

* lisp/treesit.el (treesit--install-language-grammar-1):
Refactor out treesit--build-grammar.
(treesit--build-grammar): New function.
(treesit--language-git-revision): Now takes REPO-DIR as an
argument.
2024-12-30 00:20:54 -08:00