1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 22:41:06 -08:00
Commit graph

97925 commits

Author SHA1 Message Date
Eli Zaretskii
bcf005fa77 Improve documentation of treesit "thing"
* src/treesit.c (syms_of_treesit):
* lisp/treesit.el (treesit-cycle-sexp-type):
(treesit-thing-at, treesit-thing-at-point): Doc fixes.

* doc/lispref/parsing.texi (User-defined Things): Improve
documentation of treesit "thing" and related functions; add
cross-references and indexing.
2025-06-05 10:30:44 +03:00
Stefan Monnier
1903b0062b (cl-deftype): Silence spurious warnings in xcb-types.el
* lisp/emacs-lisp/cl-macs.el (cl-deftype): Don't warn if the predicate
doesn't use its argument, e.g. when the type is equivalent to `t`.
2025-06-04 19:27:08 -04:00
Stefan Monnier
77a4c63fda (outline--hidden-headings-paths): Fix slow saves (bug#78665)
* lisp/outline.el: Prefer #' to quote function names.
(outline--end-of-previous): New function, extracted from
`outline-end-of-subtree`.
(outline-end-of-subtree): Use it.
(outline--hidden-headings-paths): Distinguish headings where just the
entry is hidden from those where a whole subtree is hidden (bug#78673).
(outline--hidden-headings-restore-paths): Adjust accordingly and don't
delegate to functions like `outline-hide-subtree` so as to avoid
an O(N²) behavior.
2025-06-04 16:37:17 -04:00
Juri Linkov
6f24725323 * lisp/tab-line.el: Use 'tab-line-event-start' in remaining functions.
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab):
Use 'tab-line-event-start' instead of 'event-start'
like in all other functions.
2025-06-04 20:23:25 +03:00
Jonas Bernoulli
680fa61b59
Update to Transient v0.9.1-7-gd7d2c1c2 2025-06-04 15:17:51 +02:00
Sean Whitton
69b245cf4f Factor out vc--with-backend-in-rootdir
* lisp/vc/vc.el (vc--with-backend-in-rootdir): New macro.
(vc-root-version-diff, vc-diff-mergebase, vc-root-diff)
(vc-print-root-log, vc-log-mergebase): Use it.
(vc-log-incoming, vc-log-outgoing): Use it here too in order to
prompt for a directory if current buffer is not VCS-controlled.
2025-06-04 13:26:06 +01:00
Sean Whitton
0ca6667c00 ; * lisp/vc/vc.el (vc-print-log-internal): Fix some indentation. 2025-06-04 13:25:52 +01:00
Sean Whitton
e3472e8ec5 ; vc-bzr-incoming-revision: Rewrite to match buffer text directly. 2025-06-04 08:36:23 +00:00
Jostein Kjønigsen
61d7116520
Better command subst fontification in bash-ts-mode (bug#78567)
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings):
fontify command-substition command only.  Don't include
enclosing brackets.
2025-06-04 00:11:01 -07:00
Juri Linkov
47837adf8c * lisp/tab-line.el: Remove unnecessary checks for nil event.
(tab-line-hscroll-right, tab-line-hscroll-left)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab, tab-line-close-other-tabs):
Remove '(consp event)' to use the window returned by
'(posn-window (tab-line-event-start event))' even in case
when 'event' is nil.
2025-06-04 09:49:01 +03:00
Yuan Fu
d1fa511512
; Fix recent changes in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts--standalone-parent-p): Add a limit to the
looking-back call.
2025-06-03 22:44:13 -07:00
Stefan Monnier
a4a66d9628 lisp/progmodes/sh-script.el (sh-popup-occur-buffer): Remove unused var 2025-06-03 17:13:51 -04:00
Thierry Volpiatto
eb788fd8fd (lisp-imenu-generic-expression): Add oclosure-define
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
Add `oclosure-define` alongside the other type definition forms.
2025-06-03 16:03:27 -04:00
Eli Zaretskii
9fcea4a263 ; Fix recent changes in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts--standalone-parent-p): Fix warning and punctuation
in a comment.
2025-06-03 19:32:29 +03:00
Juri Linkov
332f733d88 * lisp/tab-line.el: Use 'consp' on mouse events instead of 'listp'.
(tab-line-hscroll-right, tab-line-hscroll-left, tab-line-new-tab)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab, tab-line-close-other-tabs):
Replace '(listp event)' with '(consp event)' that allows
calling the functions non-interactively with nil event arguments.
2025-06-03 18:49:31 +03:00
Juri Linkov
6b668c2213 Restore c-ts-common-comment-setup in js-ts-mode and typescript-ts-mode.
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Add 'c-ts-common-comment-setup' back removed in 8bccccedb6
since it does more than setting comment variables (bug#78680).
2025-06-03 18:41:01 +03:00
Michael Albinus
f60ad8d1e0 Add ansible password prompts to `comint-password-prompt-regexp'
* lisp/comint.el (comint-password-prompt-regexp):
* test/lisp/comint-tests.el (comint-testsuite-password-strings):
Add ansible password prompts. (Bug#78442)
2025-06-03 16:56:52 +02:00
Michael Albinus
55691c61d4 Tramp: Do not raise an error when not connected (Bug#78572)
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Use read syntax #' for `tramp-timeout-session',

* lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an error
when not connected.  (Bug#78572)
(tramp-file-name-handler): Do not force the backtrace.
(tramp-connectable-p): Check also, whether initial handshake is finished.
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending
`file-missing' error.
(tramp-handle-access-file, tramp-handle-unlock-file):
Use `tramp-connectable-p'.

* test/lisp/net/tramp-tests.el (project-mode-line-format)
(project-mode-line): Declare.
(tramp-test48-session-timeout): New test.
(tramp-test49-auto-load, tramp-test49-delay-load)
(tramp-test49-recursive-load, tramp-test49-remote-load-path)
(tramp-test50-without-remote-files, tramp-test51-unload): Rename.
2025-06-02 11:44:43 +02:00
Yuan Fu
8d132359d1
Fix typescript-ts-mode tenary indentation (bug#77901)
Fixes indentation for nested ternary expressions:

const a = cond1 ? 1 :
  cond2 ? 2 :
  cond3 ? 3 :
  cond 4: 5;

instead of

const a = cond1 ? 1 :
  cond2 ? 2 :
    cond3 ? 3 :
      cond 4: 5;

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts--standalone-parent-p): New function.
(typescript-ts-mode):
(tsx-ts-mode): Use new function.
2025-06-01 16:14:12 -07:00
Jostein Kjønigsen
c3f4e6ca0e
Fontificatiomn improvements for typescrip-ts-mode.el (bug#78594)
- Fontify type-names for static function calls directly on types.
- Special-case "document" and "console" and constants/builtins.
- Fontify variable-use in string-interpolation expressions.
- Fontify variable-use in function-calls.
- Fontify variable-use in member-access expressions.
- Fontify variable-use in JSX-expressions.
- Fontify variable-use when using explicit nullability override.

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
(typescript-ts-mode--font-lock-settings): Improve font-lock settings.
2025-06-01 15:46:36 -07:00
Thierry Volpiatto
dfd57f350a bovine/el.el: Tell CEDET how to parse oclosure-define
* lisp/cedet/semantic/bovine/el.el (oclosure-define): Add parser.
2025-06-01 18:00:37 -04:00
Sean Whitton
34e03d198e * lisp/vc/vc-bzr.el (vc-bzr-incoming-revision): New function. 2025-06-01 15:21:04 +00:00
Sean Whitton
59516a75eb New incoming-revision VC backend action
* lisp/vc/vc.el: New incoming-revision backend action (bug#62940).
* lisp/vc/vc-git.el (vc-git--fetch-incoming): New function,
factored out of vc-git-log-incoming.
(vc-git-log-incoming): Use it.
(vc-git-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision): New functions.
2025-06-01 11:55:27 +01:00
Stefan Monnier
c3d9581f84 (load-path-filter-cache-directory-files): Filter only for must-suffix
Most loads set the `must-suffix` (e.g. `require and
`autoload-do-load`), but some don't (e.g. `load-library`).
This results in two separate entries in
`load-path-filter--cache` with two hash-tables.  The entry for
`must-suffix=nil` is larger and much less often used than the
other, so just skip filtering when `must-suffix=nil`.
Reduces the memory size of the cache from ~1MB to ~400kB in my
test case.

* lisp/startup.el (load-path-filter-cache-directory-files):
Don't use a filtering cache when `must-suffix` is nil.
2025-05-31 13:29:05 -04:00
Eli Zaretskii
3f8faed9d2 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-05-31 17:29:40 +03:00
Matthew Tromp
9d6a4fdd7e Add additional keybindings for flymake diagnostics modes
This adds keybindings for C-o and C-m, and changes the bindings
for n and m, in `flymake-diagnostics-buffer-mode' and
`flymake-project-diagnostics-mode' buffers.

Previously, `flymake-project-diagnostics-mode' did not use the
keybindings for `flymake-diagnostics-buffer-mode'. RET and SPC
were never bound in `flymake-project-diagnostics-mode' buffers.
This seems to have been an oversight: since the filename and
message are buttons which call `flymake-goto-diagnostic',
pressing RET still brought users to the diagnostic at point
most of the time.  This change adds a
`flymake-project-diagnostics-mode-map' which inherits from
`flymake-diagnostics-buffer-mode-map'.

C-o and C-m now show and jump to the diagnostic currently at point,
similar to how `compilation-mode' works.

n and p now show the diagnostic newly under point after moving up or
down a line, which is also intended to make behavior more similar to
`compilation-mode'.

In order that other next-error buffers do not interfere with
navigation in the diagnostics buffers, this change introduces and
uses new functions, `next-error-this-buffer-no-select' and
`previous-error-this-buffer-no-select'. If we instead used
`next-error-no-select' and `previous-error-no-select', then a user
who runs `flymake-show-diagnostics-buffer', then e.g. `compile',
then returns to the diagnostics buffer and presses 'n', would be
navigated to the next error in the compilation buffer.

* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode-map): Add
bindings.
(flymake-project-diagnostics-mode-map): Inherit bindings from
`flymake-diagnostics-buffer-mode'
* lisp/simple.el (next-error-this-buffer-no-select):
(previous-error-this-buffer-no-select): Add new commands.
(Bug#78619)

Copyright-paperwork-exempt: yes
2025-05-31 17:23:08 +03:00
Michael Albinus
5ce0e1372b Fix Tramp bug#78508
* lisp/net/tramp-container.el (tramp-methods) <docker, dockercp, podman>
<podmancp, apptainer, nspawn>:
* lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync>
<ssh, sshx, sudo>:
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Set TERM environment.
(Bug#78508)

* lisp/net/tramp-sh.el (tramp-find-executable): Handle superlong PATH.
(tramp-set-remote-path): Simplify command.
(tramp-timeout-session): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-winexe-program): Adapt docstring.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Simplify argument handling.
(tramp-smb-handle-process-file): Flush " process-exit-status" property.
(tramp-smb-call-winexe): Set $winsize.Width to 102 only.

* lisp/net/tramp.el (tramp-process-sentinel): Adapt docstring.
Set " process-exit-status" property.

* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Make it more robust.
(tramp-test18-file-attributes)
(tramp-test26-interactive-file-name-completion)
(tramp-test26-file-name-completion-boundaries)
(tramp-test35-remote-path): Adapt tests.
2025-05-31 15:08:06 +02:00
Eli Zaretskii
b247b1e0b1 Merge from origin/emacs-30
9dc6c21b41 ; * lisp/subr.el (setq-local): Doc fix (bug#78644).
1bb88a86cb Revert "; * lisp/subr.el (setq-local): Doc fix (bug#78644)."
cb9556d669 ; * lisp/subr.el (setq-local): Doc fix (bug#78644).
8881dca81c ; * doc/lispref/searching.texi (Char Classes): Add speedu...
4507b6a9c7 Fix bug in 'todo-jump-to-category' (bug#78608)
2025-05-31 08:29:51 -04:00
Eli Zaretskii
b3a8633dba Merge from origin/emacs-30
1d2ae31b8b typescript-ts-mode: Improve function body indentation (bu...
421ecbcf6b ; * CONTRIBUTE: Explain the line-width preferences.
2025-05-31 08:29:50 -04:00
Matthias Meulien
6f8cee0331 ansi-osc.el: Use marker (bug#78184)
* lisp/ansi-osc.el (ansi-osc-apply-on-region)
(ansi-osc-filter-region): Use marker to properly handle
unfinished escape sequence.

* test/lisp/ansi-osc-tests.el (ansi-osc-tests--strings)
(ansi-osc-tests-apply-region-no-handlers)
(ansi-osc-tests-apply-region-no-handlers-multiple-calls)
(ansi-osc-tests-filter-region)
(ansi-osc-tests-filter-region-with-multiple-calls): Cover
bug#78184.
2025-05-31 15:21:21 +03:00
Eli Zaretskii
32d911cddf Remove unused user options in sh-script.el
* lisp/progmodes/sh-script.el (sh-indent-comment)
(sh-first-lines-indent, sh-indent-for-else): Remove variables that
are no longer obeyed.
(sh-var-list): Likewise.  (Bug#78592)
2025-05-31 15:09:42 +03:00
Eli Zaretskii
bcc7c4dbbb ; * lisp/startup.el (load-path-filter--cache): Doc fix. 2025-05-31 14:53:50 +03:00
Sean Whitton
98c3f4c371 Restore & obsolete vc-finish-logentry-hook
* lisp/vc/vc-dispatcher.el (vc-finish-logentry-hook): Declare,
document and mark obsolete.
(vc-finish-logentry): Call vc-finish-logentry-hook again.
2025-05-31 09:36:35 +01:00
Eli Zaretskii
9dc6c21b41 ; * lisp/subr.el (setq-local): Doc fix (bug#78644). 2025-05-31 11:12:58 +03:00
Eli Zaretskii
1bb88a86cb Revert "; * lisp/subr.el (setq-local): Doc fix (bug#78644)."
This reverts commit cb9556d669.
Some of its parts were not supposed to be installed.
2025-05-31 11:08:45 +03:00
Eli Zaretskii
cb9556d669 ; * lisp/subr.el (setq-local): Doc fix (bug#78644). 2025-05-31 10:05:06 +03:00
Jim Porter
d25e9f5180 Add more "safe" display specs to 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--safe-display-specs): Add
'space-width' and 'min-width'.
(visual-wrap--display-property-safe-p): Use 'member' instead of 'memq'
to more-closely match the behavior of other code that works with display
properties.
2025-05-30 22:21:40 -07:00
Jeremy Bryant
9e322088b0 ; reftex.el: Checkdoc fixes, comments to docstrings
* lisp/textmodes/reftex.el (reftex-next-multifile-index):
(reftex-TeX-master-file, reftex-is-multi):
(reftex-get-cite-format, reftex-ensure-compiled-variables):
(reftex-erase-all-selection-and-index-buffers):
(reftex-compile-variables, reftex-parse-args):
(reftex-access-scan-info, reftex-check-parse-consistency):
(reftex-select-external-document, reftex-find-file-externally):
(reftex-access-search-path, reftex-find-file-on-path):
(reftex-parse-colon-path, reftex-expand-path):
(reftex-recursive-directory-list, reftex-typekey-check):
(reftex-check-recursive-edit, reftex-no-props):
(reftex-match-string, reftex-kill-buffer):
(reftex-erase-buffer, reftex-this-word, reftex-all-assq):
(reftex-all-assoc-string, reftex-last-assoc-before-elt):
(reftex-sublist-nth, reftex-make-selection-buffer-name):
(reftex-make-index-buffer-name, reftex-truncate):
(reftex-nearest-match, reftex-auto-mode-alist):
(reftex-enlarge-to-fit, reftex-select-with-char):
(reftex-make-regexp-allow-for-ctrl-m, reftex-visited-files):
(reftex-get-file-buffer-force, reftex-kill-temporary-buffers):
(reftex-splice-symbols-into-list, reftex-uniquify):
(reftex-uniquify-by-car, reftex-nicify-text, reftex-refontify):
(reftex-fontify-select-label-buffer):
(reftex-select-font-lock-fontify-region):
(reftex-verified-face, reftex-highlight-shall-die): Convert
comment to docstring in functions.
(reftex-silence-toc-markers): Convert comment to docstring and
capitalize argument.
(reftex-set-cite-format): Capitalize argument.  (AUCTeX bug#77864)
2025-05-30 18:43:29 +02:00
Sean Whitton
c459ba692e vc-finish-logentry: Don't run vc-finish-logentry-hook
* lisp/vc/vc-dispatcher.el (vc-finish-logentry): Don't run
undocumented, undeclared 'vc-finish-logentry-hook'.  There is
already 'vc-log-after-operation-hook'; it is not clear we need
both.
2025-05-30 13:21:46 +01:00
Michael Albinus
30c2ef6d6a Fix bug in `tramp-find-executable'
* lisp/net/tramp-sh.el (tramp-find-executable): Use "command -v",
preserving non-standard PATH search.  Bug#78633)
2025-05-30 12:28:15 +02:00
Dmitry Gutov
f0bec20ac5 project-remember-project: Support calling it interactively
* lisp/progmodes/project.el (project-remember-project):
Support interactive invocation (bug#78099) and react with
appropriate messages when called so, depending on the blacklist.
2025-05-29 22:27:38 +03:00
Juri Linkov
c9cb89edd5 Use 'outline-heading-end-regexp' consistently.
* lisp/outline.el (outline-font-lock-keywords):
For non-nil 'outline-search-function' also search for
'outline-heading-end-regexp' afterwards like there is
'outline-heading-end-regexp' at the end of the regexp counterpart.
(outline-minor-mode-highlight-buffer): Use 'outline-heading-end-regexp'
like in 'outline-font-lock-keywords' instead of "$".
For non-nil 'outline-search-function' also use
'outline-heading-end-regexp' the same way.

* lisp/help.el (describe-bindings): Remove unnecessary
buffer-local 'outline-heading-end-regexp'.
2025-05-29 19:52:20 +03:00
Sean Whitton
f9b311464d New user option vc-dir-hide-up-to-date-on-revert
* lisp/vc/vc-dir.el (vc-dir-hide-up-to-date-on-revert):
New defcustom.
(vc-dir-revert-buffer-function): Use it.
* etc/NEWS: Document it.
2025-05-29 12:53:51 +01:00
Sean Whitton
6519fb5d2b Factor out vc-async-checkin-backends
This allows third party backends to indicate they support async
checkins.

* lisp/vc/vc.el (vc-async-checkin-backends): New variable.
(vc-checkin): Use it.
2025-05-29 12:41:36 +01:00
Juri Linkov
295f73d23d * lisp/isearch.el (search-within-boundaries): Optimize (bug#78520).
For non-subregexp case, search for the first match and continue
from its position.  This avoids unnecessary scan for all text properties
until the first match.  When nothing is found, skip the entire body.
2025-05-28 20:15:21 +03:00
Stephen Berman
4507b6a9c7 Fix bug in 'todo-jump-to-category' (bug#78608)
* lisp/calendar/todo-mode.el (todo-jump-to-category): Eliminate
comparison of the number of Todo categories before and after
specifying the category to jump to and replace it by a check of
whether there are any items in the category, since an existing
category should always have at least one item (perhaps done or
archived).
2025-05-28 17:17:23 +02:00
Juri Linkov
b6d5f50bc2 * lisp/tab-line.el: Make tab closing commands work without mouse.
(tab-line--current-tab): New function.
(tab-line-close-tab, tab-line-close-other-tabs): Use it
when the 'event' arg doesn't originate from mouse.
Suggested by pinmacs <pinmacs@cas.cat>.
2025-05-27 21:11:22 +03:00
Eli Zaretskii
5883ceedc8 Fix exact matching of Ada tags by 'M-.'
* lisp/progmodes/etags.el (tag-exact-match-p): Support Ada tags
that have "/x" qualifiers appended to them.  (Bug#78489)
2025-05-27 13:50:12 +03:00
Martin Rudalics
93934b645b Have 'delete-other-frames' only delete frames on same terminal (Bug#78583)
* lisp/frame.el (delete-other-frames): Only delete frames on
same terminal as FRAME's (Bug#78583).
2025-05-27 10:45:04 +02:00
Jim Porter
8762f6c7c9 Don't add visual-wrap-prefix properties to unsafe multi-line display specs
This makes sure we don't interfere with other display specs, e.g. for
images displayed in 'image-mode' (bug#73600).

* lisp/visual-wrap.el (visual-wrap--safe-display-specs): New variable.
(visual-wrap--display-property-safe-p): New function.
(visual-wrap--apply-to-line): Use 'pos-eol'; we don't want to respect
field boundaries here.
(visual-wrap-prefix-function): Check for unsafe display properties at
the end of the line and skip past them if present.

* test/lisp/visual-wrap-tests.el: New test file.
2025-05-26 12:43:51 -07:00