1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00
Commit graph

176055 commits

Author SHA1 Message Date
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
Yuan Fu
a22730f4d7
Support COMMIT in treesit-language-source-alist
* lisp/treesit.el (treesit-language-source-alist): Add COMMIT
field.
(treesit--install-language-grammar-1): Support COMMIT.
2024-12-30 00:20:53 -08:00
Juri Linkov
dc653bf063 * lisp/treesit.el (treesit-show-paren-data--categorize): Improve.
Instead of using only the immediate parent, try to search more levels
using 'treesit-parent-until' (bug#75122).
2024-12-30 09:23:05 +02:00
Eli Zaretskii
ce74534ef8 ; * etc/NEWS: Improve recently added entries for tree-sitter. 2024-12-29 21:54:59 +02:00
Eli Zaretskii
2e8f875067 ; * etc/NEWS: Improve last change. 2024-12-29 21:44:58 +02:00
Juri Linkov
d2c05c219e ; * etc/NEWS: Remove implementation details of 'treesit-show-paren-data' 2024-12-29 21:15:07 +02:00
Juri Linkov
1addae07be Treesit support for show-paren-mode (bug#75122)
* lisp/treesit.el (treesit-show-paren-data--categorize):
New internal function.
(treesit-show-paren-data): New function.
(treesit-major-mode-setup): Set 'show-paren-data-function' to
'treesit-show-paren-data'.
2024-12-29 20:08:11 +02:00
Juri Linkov
ec8dd27f00 Add new variable 'up-list-function' for 'treesit-up-list'
* lisp/emacs-lisp/lisp.el (up-list-function): New variable (bug#73404).
(up-list-default-function): New function.
(up-list): Split part to 'up-list-default-function'.

* lisp/treesit.el (treesit-up-list): New function.
(treesit-major-mode-setup): Set 'up-list-function' to
'treesit-up-list'.
2024-12-29 19:57:28 +02:00
Juri Linkov
3c50edb2b5 Add new variable 'down-list-function' for 'treesit-down-list'
* lisp/emacs-lisp/lisp.el (down-list-default-function): New function.
(down-list-function): New variable (bug#73404).
(down-list): Move meat to 'down-list-default-function',
and call 'down-list-function' when non-nil.  Don't raise an error
in strings or comments when 'down-list-function' is non-nil.

* lisp/treesit.el (treesit--scan-error): New internal function.
(treesit-forward-sexp, treesit-forward-list): Use 'treesit--scan-error'.
(treesit-down-list): New function.
(treesit-major-mode-setup): Set 'down-list-function' to
'treesit-down-list'.
2024-12-29 19:51:18 +02:00
Juri Linkov
3db984c72b Add new variable 'forward-list-function' for 'treesit-forward-list'
* lisp/emacs-lisp/lisp.el (forward-list-default-function): New function.
(forward-list-function): New variable (bug#73404).
(forward-list): Move meat to 'forward-list-default-function',
and call 'forward-list-function' when non-nil.

* lisp/treesit.el (treesit-forward-list): Rewrite to not rely on
'treesit-forward-sexp'.
(treesit-major-mode-setup): Set 'forward-list-function' to
'treesit-forward-list'.
2024-12-29 19:42:40 +02:00
Stefan Monnier
c85d2e3519 (font-lock-set-defaults): Try and fix bug#74281
* lisp/font-lock.el (font-lock-set-defaults): Set
`font-lock--syntax-table-affects-ppss` more carefully, and
include ' among the "safe" syntaxes.
2024-12-29 10:18:37 -05:00
Michael Albinus
680906c136 Some minor Tramp changes
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Do proper quoting.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Adapt test.
(tramp-test42-utf8): Do not run expensive tests on MS Windows.
2024-12-29 12:26:05 +01:00
Daniel Colascione
72eb5f8bed Make browser windows pop up when browsing URLs on Wayland
When a user invokes browse-url, the browser window viewing the URL
should be raised in the user's desktop environment.  On X11, running
xdg-open as a subprocess does the job.  However, on Wayland, this
approach doesn't work: xdg-open makes the web browser browse a URL all
right, but doesn't raise the browser window in the GUI.  Therefore, if
the browser window is behind Emacs, browse-url appears to do nothing.
Repeated invocations of browse-url cause the browser to load multiple
tabs in the background, surprising the user when he gives up in
frustration and manually switches to the browser window.

There's no subprocess we can run to make the right thing happen.
Wayland requires that we pass along event activation information to the
browser using the xdg_activation_v1 protocol.

This change adds x-gtk-launch-uri to invoke GTK-native URL-dispatch
machinery.  This machinery DTRT on both X11 and Wayland.  We fall back
to the default browser machinery if we're not on a GTK frame.

The logic is more complicated than it has to be because the GTK URI
launch mechanism requires that we launch with respect to a specific GTK
window, and in some environments (e.g., running emacs -nw in a PGTK
Emacs) we don't have a GTK window.  We also want to preserve the effect
of customizing browse-url-browser-function, so adding an entry to
browse-url-default-handlers that preempts URI open when we happen to be
on a GTK frame is the wrong thing to do.

* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
(browse-url--inhibit-pgtk): avoid infinite recursion
(browse-url-default-browser): use pgtk launch
(x-gtk-launch-uri): new function
(browse-url-default-gtk-browser): ues it

* src/pgtkfns.c (unwind_gerror_ptr): new function
(Fx_gtk_launch_uri): new function
(syms_of_pgtkfns): register it

* etc/NEWS: mention the new feature
2024-12-28 13:28:40 -05:00
Alan Mackenzie
0334b0743f CC Mode: Minor corrections and tidy ups for cache invalidation
These cache variables are c-lit-pos-cache-limit,
c-semi-near-cache-limit, c-full-near-cache-limit, and
c-state-cache-invalid-pos.

* lisp/progmodes/cc-awk.el
(c-awk-set-string-regexp-syntax-table-properties): Invalidate
the caches after changing the 'syntax-table property.

* lisp/progmodes/cc-defs.el (c-put-string-fence-trim-caches):
New macro.
(c-unmark-<-or->-as-paren): New name for c-unmark-<->-as-paren.
(Also renamed throughout CC Mode)

* lisp/progmodes/cc-engine.el (c-propertize-ml-string-opener):
Add missing cache invalidation.

* lisp/progmodes/cc-mode.el (c-neutralize-CPP-line): Remove
syntax-table properties from < and > as needed.
(c-put-syn-tab): Add missing cache invalidation.
2024-12-28 17:16:04 +00:00
Michael Albinus
e32484547d Add tramp-archive-local-file-name
* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.
2024-12-28 15:53:08 +01:00
Eli Zaretskii
af3bbc8360 Merge from origin/emacs-30
2ba6387d1d ; Fix inaccuracy in ELisp Reference manual
8ac6a17880 ; * etc/PROBLEMS: Mention problems with XPM support in GD...
624322d5f6 Add missing fontification matches for elixir-ts-mode
5bafb11b40 ; Fix copyright year
186ea40732 Don't start docstrings with "This function" or similar
cb8ce2e68b Enable indent-tabs-mode in obj-c-mode
54f3513709 Fix comment indent in 'lua-ts-mode' and old grammar
8b95549e90 * admin/nt/dist-build/build-dep-zips.py: (deps src) handl...
8064b2a679 Document undocumented completion commands
c29b798537 ; etc/w32-feature.el (harfbuzz): improve test
0e43e35f96 * admin/nt/dist-build/emacs.nsi: (Uninstall) delete only ...
b83cd8a8fb ; * etc/tutorials/TUTORIAL.ko: Fix the beginning.
41caccc488 ; * etc/publicsuffix.txt: Update from upstream.
e6fb18406e ; Fix refcards
14e791f9ba ; Update acknowledgments for Emacs 30
861b7864fc ; Fix node name in emacs-lisp-intro.texi
77243ba5be ; Update version tags of defcustoms
fe2ac33bae ;* doc/misc/efaq.texi (New in Emacs 30): Mention 'trusted...
8fb884f0dc ; * etc/NEWS: Fix wording.
e281355a5e Improve D-Bus and Tramp manual

# Conflicts:
#	doc/emacs/emacs.texi
#	etc/NEWS
#	lisp/erc/erc-log.el
#	lisp/eshell/esh-mode.el
#	lisp/which-key.el
2024-12-28 08:30:31 -05:00
Eli Zaretskii
ad5c8f25b3 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-12-28 14:39:49 +02:00
Eli Zaretskii
c9be6f731d ; Fix last change
* lisp/vc/ediff-util.el (ediff--delete-temp-files-on-kill-emacs):
Add commentary explaining the precautions.  (Bug#74881)
2024-12-28 14:38:55 +02:00
Alan Third
691c161a81 Make image cache aware of image-scaling-factor (bug#74725)
* src/dispextern.h (struct image): Add scale so it can be compared in
search_image_cache.
* src/image.c (search_image_cache): Calculate the scale factor and
compare with the cached value.
(image_compute_scale): Compute the image's scale factor and optionally
store it in the image struct.
(compute_image_size): Move scale calculation code into
image_compute_scale and use it.
2024-12-28 12:36:58 +00:00
Lin Sun
2ba49f8a12 * lisp/vc/ediff-util.el: Remove temp Ediff files on kill-emacs
(ediff--delete-temp-files-on-kill-emacs): New function.
(ediff-setup): Install it in 'kill-emacs-hook'.  (Bug#74881)
2024-12-28 14:33:57 +02:00
Eli Zaretskii
2ba6387d1d ; Fix inaccuracy in ELisp Reference manual
* doc/lispref/objects.texi (Basic Char Syntax): Fix inaccurate
wording.  (Bug#75113)
2024-12-28 14:04:26 +02:00
Eli Zaretskii
8ac6a17880 ; * etc/PROBLEMS: Mention problems with XPM support in GDK (bug#75018). 2024-12-28 13:54:45 +02:00
Wilhelm Kirschbaum
624322d5f6 Add missing fontification matches for elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings): Add
matches for missing tokens and fix atom type face.  (Bug#75156)
2024-12-28 09:42:09 +01:00
Stefan Kangas
5bafb11b40 ; Fix copyright year 2024-12-28 02:24:07 +01:00
Alex Bochannek
63cc335a52 Add command to clear erc-track's mode-line indicator
* etc/ERC-NEWS: Mention new command `erc-track-clear'.
* lisp/erc/erc-track.el (erc-track-clear): New command to reset buffer
activity indicator in ERC's mode-line construct.  (Bug#75014)
2024-12-27 15:20:29 -08:00