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

175964 commits

Author SHA1 Message Date
Yuan Fu
833494d4b0
; Add some shortdoc examples for treesit entry
* lisp/treesit.el: Add some shortdoc examples.
2024-12-24 13:52:39 -08:00
Yuan Fu
251b4c8c39
Add treesit-language-display-name
* lisp/treesit.el:
(treesit-language-display-name-alist): New variable.
(treesit-language-display-name): New function.
* doc/lispref/parsing.texi (Language Grammar): Add to manual.
* etc/NEWS: Add to NEWS.
2024-12-24 13:52:39 -08:00
Juri Linkov
563e5868f6 Add treesit thing 'sexp-list' to c++-ts-mode (bug#73404)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings):
Add C++ 'sexp-list' nodes for 'treesit-thing-settings'.
2024-12-24 19:39:30 +02:00
Juri Linkov
b061c01607 Add treesit thing 'sexp-list' to tsx-ts-mode (bug#73404, bug#73978)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode):
Add 'sexp-list' to 'treesit-thing-settings' with "jsx" things.
(typescript-ts-mode--sexp-list-nodes): Remove "jsx" things.
2024-12-24 19:24:11 +02:00
Juri Linkov
f0afebb991 * lisp/progmodes/typescript-ts-mode.el: Fix regexp-opt of treesit-thing.
(typescript-ts-base-mode): Add arg 'symbols' to regexp-opt of 'sexp',
'sexp-list', 'sentence', 'text' (bug#73404, bug#74366, bug#74963).
(tsx-ts-mode): Add arg 'symbols' to regexp-opt of 'sexp', 'sentence'.
This avoids such mismatches as "string_fragment" by "string".
2024-12-24 09:40:21 +02:00
Yuan Fu
7ac7ebef6c
; Update c-ts-mode and c++-ts-mode's verified revision
* lisp/progmodes/c-ts-mode.el: Update revision.
2024-12-23 18:52:41 -08:00
Yuan Fu
32ad734289
Include lightweight tags in treesit-admin--verify-major-mode-queries
* lisp/treesit.el (treesit--language-git-revision): Include
lightweight tags as well.
2024-12-23 18:52:41 -08:00
Yuan Fu
4def541bbf
Fix cmake-ts-mode font-lock queries
This commit in tree-sitter-cmake removed angle brackets:

a414a4c83d

* lisp/progmodes/cmake-ts-mode.el
(cmake-ts-mode--font-lock-settings): Remove angle brackets.
2024-12-23 18:52:41 -08:00
Yuan Fu
93755ea1a6
Create a blobless clone in treesit-admin--verify-major-mode-queries
* admin/treesit-admin.el (treesit-admin--verify-major-mode-queries):
Create a blobless clone.
* lisp/treesit.el (treesit--install-language-grammar-blobless):
New variable.
(treesit--git-clone-repo): Support blobless clone.
2024-12-23 18:52:40 -08:00
Yuan Fu
8d7cba7bbf
; Minor comment improvement in c-ts-common--adaptive-fill-prefix
* lisp/progmodes/c-ts-common.el (c-ts-common--adaptive-fill-prefix):
Improve comment.
2024-12-23 18:52:40 -08:00
Stefan Kangas
6ac3839689 ; * .mailmap: Fix UTF-8 issue. 2024-12-24 00:04:51 +01:00
Paul Eggert
28c420afab Avoid U+FFFD in commit messages
* build-aux/git-hooks/commit-msg:
Also check against U+FFFD REPLACEMENT CHARACTER in commit messages.
2024-12-23 13:40:45 -08:00
Michael Albinus
b1de495eea * configure.ac (dbus): Default to ifavailable. (Bug#75004) 2024-12-23 12:46:23 +01:00
Martin Rudalics
6017c6a986 Make 'fit-frame-to-buffer' work around size hints (Bug#74866)
* lisp/window.el (fit-frame-to-buffer-1): When
'frame-resize-pixelwise' is nil, round up requested sizes to avoid
that lines get wrapped (Bug#74866).
* doc/lispref/windows.texi (Resizing Windows): Mention that with
size hints one may have to set 'frame-resize-pixelwise' to make
'fit-frame-to-buffer' fit the buffer exactly.
2024-12-23 10:59:11 +01:00
Arsen Arsenovi�
39380e1bd3 Java Mode: introduce the keyword `assert'.
* lisp/progmodes/cc-langs.el (c-simple-stmt-kwds): Put `assert'
into the java value.
2024-12-22 19:33:29 +00:00
Juri Linkov
423e1ee7d6 Add treesit thing 'sexp-list' to typescript-ts-mode (bug#73404)
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Add 'sexp-list' to 'treesit-thing-settings'.
(typescript-ts-mode--sexp-list-nodes): New variable.
2024-12-22 21:15:18 +02:00
Augusto Stoffel
ec39f669f9 Handle ':noquery' in 'open-gnutls-stream'
* lisp/net/gnutls.el (open-gnutls-stream): Extract and use
':noquery' keyword.  (Bug#74193).
2024-12-22 12:36:59 +01:00
Michael Albinus
fb7bf20a9c * test/lisp/files-tests.el (sh-shell): Move down declaration. 2024-12-22 10:20:15 +01:00
Antero Mejr
78eb102bc3 Allow viewing .dcm images via image-convert
* lisp/files.el (auto-mode-alist): Support the DICOM .dcm image
format.  (Bug#63531)
2024-12-22 04:07:07 +01:00
Antero Mejr
7d41a23ad3 Allow viewing .six images via image-convert
* lisp/files.el (auto-mode-alist): Support the Sixel .six image
format.  (Bug#63531)
* lisp/image.el (imagemagick-enabled-types): Add SIX.
2024-12-22 04:07:07 +01:00
Stefan Monnier
961cff855a * lisp/vc/smerge-mode.el (smerge-extend): New command (bug#74509) 2024-12-21 21:45:41 -05:00
Stefan Kangas
86a8b24bde Match more gdbinit files in auto-mode-alist
* lisp/files.el (auto-mode-alist): Match more gdbinit files,
including XDG, and MS-Windows.  Avoid false positives.
(set-auto-mode--find-matching-alist-entry): Break out function...
(set-auto-mode--apply-alist): ...from here.  (Bug#74946)
* test/lisp/files-tests.el (files-tests--check-mode): New function.
(files-tests-auto-mode-alist): New test.
2024-12-22 03:00:31 +01:00
Stefan Kangas
d89d8715ee Prefer defvar-keymap in gud.el
* lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map)
(gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map)
(gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map):
Convert to defvar-keymap.
2024-12-22 02:13:07 +01:00
Michael Albinus
e59e727892 * lisp/net/tramp-gvfs.el (tramp-gvfs-local-file-name): New defun. 2024-12-21 18:12:45 +01:00
Stefan Monnier
4764261681 (cl-flet, cl-labels): Fix bug#74870
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Wrap function
bodies in `cl-block`.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--test-flet-block): New test.
2024-12-21 11:13:40 -05:00
Eli Zaretskii
a1d08d2c13 Merge from origin/emacs-30
5e97079cc7 ; Fix call to 'decode_string_utf_8' in  #ifdef'ed-away code
6902673b5b ; Improve commentary in calendar.el
08b62132dd Add 'lua-ts-mode' to 'interpreter-mode-alist'
d8ffcf2fba Document representation of dates in calendar.el
faaa13ec76 Autoload 'shortdoc-help-fns-examples-function'
2024-12-21 07:56:28 -05:00
Eli Zaretskii
b6d9183e7d ; Merge from origin/emacs-30
The following commits were skipped:

68bcabf58a * Update 'ldefs-boot.el' (don't merge)
9d93d717d5 * Bump Emacs version to 30.0.93
2024-12-21 07:56:28 -05:00
Eli Zaretskii
3617940f32 Merge from origin/emacs-30
8f8da2d785 ; * ChangeLog.4: Update.
49adcf30b0 ; * etc/AUTHORS: Update.
1381c6f959 * Update authors.el
5c0f3f5826 ; * etc/NEWS: Mark unmarked entries.
8a0c9c234f Document 'trusted-content
c6ce11b2a4 Mention network-interface-list in network-interface-info ...
a7905145f7 ; * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Fi...
cde22c0201 Move NEWS items from unreleased 28.3 to released 29.1
5686bb5b42 Improve browse-url-android-share docstring
92041e15f4 Minor doc fix for url-handler-regexp
9fd96e2ab9 Improve reb-change-syntax docstring
b9dc337ea7 * lisp/files.el (trusted-content-p): Make `:all` work in ...
4b685bc4fc ; * src/process.c (Fnetwork_interface_list): Fix typo.
c14c489571 ; * lisp/net/nsm.el (nsm-trust-local-network): Fix typo.
10f976300d ; Add some tree-sitter thing content to the manual
55303a6bc0 * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info...
8b6c6cffd1 trusted-content: Adjust the last patch based on prelimina...
69b16e5c63 ; * etc/NEWS: Fix typos.
5c6dbc65f3 ; * doc/lispref/frames.texi (Multiple Terminals): Add ind...
856a58e282 Update documentation of 'etags' regexps some more
4c68846223 Update documentation of 'etags' regexps
b5158bd191 elisp-mode.el: Disable Flymake byte-compile backend in un...

# Conflicts:
#	doc/man/etags.1
#	etc/NEWS
#	lisp/org/ox-texinfo.el
2024-12-21 07:56:08 -05:00
Eli Zaretskii
5e97079cc7 ; Fix call to 'decode_string_utf_8' in #ifdef'ed-away code
* src/coding.c (Finternal_decode_string_utf_8): Fix calling
sequence of 'decode_string_utf_8' to adapt to changes in the
latter's signature.
2024-12-21 14:12:14 +02:00
Eli Zaretskii
6902673b5b ; Improve commentary in calendar.el
* lisp/calendar/calendar.el: Expand the commentary.  Suggested by
Richard Lawrence <rwl@recursewithless.net>.  (Bug#74965)
2024-12-21 13:00:05 +02:00
john muhl
08b62132dd Add 'lua-ts-mode' to 'interpreter-mode-alist'
* lisp/progmodes/lua-ts-mode.el: Enable 'lua-ts-mode' for Lua
scripts based on their interpreter line.  (Bug#74951)
2024-12-21 12:53:21 +02:00
Richard Lawrence
d8ffcf2fba Document representation of dates in calendar.el
* lisp/calendar/calendar.el: Add a comment in file header
explaining how dates are represented.
2024-12-21 12:43:39 +02:00
Cecilio Pardo
fd529bbd07 Add support for the ':data' keyword for play-sound in MS-Windows.
* src/sound.c (parse_sound) [WINDOWSNT]: Check that either :file
or :data is present.
(do_play_sound): Added parameter to select file or data, and code to
play from data.
(Fplay_sound_internal): Fixed volume format, and send file or data
to 'do_play_sound'.  (Bug#74863)
* etc/NEWS: Add entry for this change.
* etc/PROBLEMS: Remove entry about missing support for :data.
2024-12-21 12:35:09 +02:00
Eli Zaretskii
b6852b67b0 ; Fix last change
* doc/lispref/os.texi (Time Calculations): Extend documentation of
'seconds-to-string'; add missing @end defun.  (Bug#71572)
2024-12-21 12:30:44 +02:00
JD Smith
308d5d5473 'seconds-to-string': new optional arguments for readable strings
* lisp/calendar/time-date.el (seconds-to-string): Accept new
optional arguments READABLE, ABBREV, and PRECISION, and format the
output string accordingly.  (Bug#71572)

* doc/lispref/os.texi (Time Calculations):
* etc/NEWS: Document the new arguments of 'seconds-to-string'.
2024-12-21 12:29:54 +02:00
Eli Zaretskii
bf41ff24b9 ; * lisp/net/browse-url.el (browse-url-with-browser-kind): Doc fix. 2024-12-21 11:33:47 +02:00
Daniel Mendler
0f645b92ed browse-url-with-browser-kind: Improve browser function selection
In order to find an appropriate browser function for the given
kind, first the browser handler lists are consulted.  If no
handler is found, the `browse-url-browser-function',
`browse-url-secondary-browser-function`,
`browse-url-default-browser' and `eww' are tried in that order
until a browser function with a matching kind is found.  This
way the user customization of `browse-url-browser-function' and
`browse-url-secondary-browser-function` is respected by
`browse-url-with-browser-kind'.
* lisp/net/browse-url.el (browse-url-with-browser-kind): Try the
browser functions in the aforementioned order.  (Bug#74820)
2024-12-21 11:31:35 +02:00
Eli Zaretskii
40145ba971 ; Improve last change
* lisp/net/eww.el (eww-search-confirm-send-region)
(eww-search-words): Doc fix.
(eww-search-words): Improve wording of confirmation request.
(Bug#74218)
2024-12-21 10:57:47 +02:00
Fabio Natali
31f3a760c5 Ask confirmation before EWW sends region to a search engine
With 'eww-search-words' (by default bound to 'M-s M-w') a user
can type in some search terms and get back the results of a web
search from a predefined search engine.  If a region is selected,
'eww-search-words' will use that for the web search instead of
prompting the user.
In its current form, 'eww-search-words' presents a security and
usability problem.  It is relatively too easy to mistakenly
launch the function and, if a region of text is selected, have
potentially sensitive data sent out to a third-party service.
This commit changes the search function's default behaviour so
that explicit confirmation is required before a region is sent
to a search engine.  The behaviour can be adjusted via the
newly-introduced 'eww-search-confirm-send-region' variable,
which is set to true by default.
* lisp/net/eww.el (eww-search-confirm-send-region): Add.
(eww-search-words): Update default 'eww-search-words' behaviour
so as to ask confirmation before sending the region to a search
engine.  (Bug#74218)
2024-12-21 10:51:45 +02:00
F. Jason Park
1c960bda91 Use smarter default for erc-server-reconnect-function
* doc/misc/erc.texi (Sample Configuration): Remove customization in
`use-package' declaration for `erc-server-reconnect-function' as well as
related language in the customization walk-through.  Do this because the
new default incorporates `erc-server-delayed-check-reconnect' behavior
for compatible connect functions.
* etc/ERC-NEWS: Announce new default for `erc-server-reconnect-function'.
* lisp/erc/erc-backend.el (erc-server-reconnect-function): Change
default to `erc-server-prefer-check-reconnect'.
(erc-server-delayed-check-reconnect): Use `process-send-string' instead
of `send-string'.
(erc--server-delayed-check-connectors): New variable.
(erc-server-prefer-check-reconnect): New function.
* test/lisp/erc/erc-scenarios-base-auto-recon.el
(erc-scenarios-base-auto-recon-unavailable)
(erc-scenarios-base-auto-recon-no-proto): Remove unnecessary
`erc-server-reconnect-function' binding because the new default
incorporates the behavior being tested for.
* test/lisp/erc/erc-scenarios-base-buffer-display.el
(erc-scenarios-base-buffer-display--reconnect-common):
* test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
(erc-scenarios-common--base-compat-no-rename-bouncer):
* test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el
(erc-scenarios-base-netid-bouncer--recon-base):
* test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el
(erc-scenarios-base-netid-bouncer--recon-both):
* test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el
(erc-scenarios-base-netid-bouncer--reconnect-id-foo)
(erc-scenarios-base-netid-bouncer--reconnect-id-bar):
* test/lisp/erc/erc-scenarios-base-reconnect.el
(erc-scenarios-base-reconnect-timer)
(erc-scenarios-base-cancel-reconnect):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--date-mode/reconnect): Explicitly bind
`erc-server-reconnect-function' to `erc-server-delayed-reconnect', the
former default, which does not do any probing.  (Bug#62044)
2024-12-20 18:18:02 -08:00
F. Jason Park
e9591fae5e Add command for teaching Imenu about ERC macros
* lisp/erc/erc-backend.el (define-erc-response-handler): Add
`doc-string' to `declare' specification.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-add-imenu-expressions): New function for defining and
undefining Imenu patterns useful to ERC developers.
2024-12-20 18:18:02 -08:00
F. Jason Park
d1c670f0cb Disable which-func-mode in erc-imenu buffers
* lisp/erc/erc-imenu.el (erc-imenu-setup): Move after module definition
so the variable `erc-imenu-mode' is defined.  Run teardown code when
module is deactivated.  Set `which-func-mode' to nil locally.
(erc-imenu-mode, erc-imenu-enable, erc-imenu-disable): Manage membership
of `erc-imenu--disable-which-func' in `which-function-mode-hook'.
(erc-imenu--disable-which-func): New function.  (Bug#74934)
2024-12-20 18:18:02 -08:00
Po Lu
2d173aa3d3 Fix a number of Android compilation warnings
* src/dispnew.c (frame_rect_abs, frame_pos_abs, rect_intersect)
(copy_child_glyphs, abs_cursor_pos, is_in_matrix)
(is_cursor_obscured) [HAVE_ANDROID]: Delete functions.
2024-12-21 08:53:21 +08:00
João Távora
b71ddaf6d3 Eglot: ensure quick typing doesn't undermine completion exit
Some completion resolution requests in
eglot-completion-at-point, specifically those that might be
triggered from the :exit function, can't be cancellable, else
the completion edit or snippet will never be obtained and the
user is left with the nonsensical completion label in the
buffer.

Github-reference: https://github.com/joaotavora/eglot/issues/1474
2024-12-20 23:11:47 +00:00
Eli Zaretskii
faaa13ec76 Autoload 'shortdoc-help-fns-examples-function'
* lisp/help-fns.el (shortdoc-help-fns-examples-function):
Autoload, to allow adding it to
'help-fns-describe-function-functions' as advertised.  (Bug#74995)
2024-12-20 22:06:06 +02:00
Yuan Fu
8aad208e00
Move admin scripts to admin/treesit-admin.el
* admin/treesit-admin.el: New file.
* lisp/treesit.el (treesit--check-manual-coverage):
(treesit--builtin-language-sources):
(treesit--verify-major-mode-queries):
(treesit-verify-major-mode-queries): Move out.
2024-12-20 08:22:04 -08:00
Martin Rudalics
dbf22fd0d0 On GTK do not inhibit implied resizing until tool bar was drawn (Bug#74750)
* src/frame.c (frame_inhibit_resize): Under GTK do not inhibit
implied resizing as long as the tool bar has not been drawn yet
so the frame gets its intended initial height (Bug#74750).
* src/gtkutil.c (update_frame_tool_bar): Set tool_bar_resized
slot of frame f to true regardless of whether a tool bar was
made or not.  This will make inhibiting implied resizes work
again from now on.
2024-12-20 16:25:44 +01:00
Yuan Fu
07cc8abca7
Add known-to-work version for c/c++-ts-mode
This is done by

    (treesit--verify-major-mode-queries
     '(c-ts-mode c++-ts-mode)
     '(c cpp)
     "/tmp/tree-sitter-grammars")

* lisp/progmodes/c-ts-mode.el: Add comments.
2024-12-20 00:53:00 -08:00
Yuan Fu
fe06a2baac
Add automated process to verify tree-sitter queries
This allows us to inform packagers of the grammar version they
want to use when packaging tree-sitter grammars with Emacs.

* lisp/treesit.el (treesit--builtin-language-sources):
New variable.
(treesit--verify-major-mode-queries):
(treesit-verify-major-mode-queries): New functions.
2024-12-20 00:53:00 -08:00
Yuan Fu
05ab13ebc7
Add keyword :reversed to treesit-font-lock-rules
This keyword will be useful for implementing
string-interpolation feature.

* doc/lispref/modes.texi (Parser-based Font Lock): Document the
new keyword.
* lisp/treesit.el (treesit-font-lock-settings): Document.
(treesit-font-lock-setting-reversed): New function.
(treesit-font-lock-rules): Add new keyword.
(treesit-font-lock-recompute-features): Handle new keyword.
2024-12-20 00:53:00 -08:00