Commit graph

100073 commits

Author SHA1 Message Date
Stéphane Marks
86efaec00e
Support setopt-local in treesit--font-lock-level-setter (bug#80731)
* lisp/treesit.el (treesit--font-lock-level-setter): Add
buffer-local behavior as invoked by 'setopt-local'.
2026-04-02 23:51:58 -07:00
Yuan Fu
5fdeb3c881
Filter out some range settings in markdown-ts-mode
* lisp/textmodes/markdown-ts-mode.el:
(markdown-ts--add-config-for-mode): Filter out functional queries.
2026-04-02 23:36:01 -07:00
Dmitry Gutov
9d5a24cfac grep-edit--prepare-buffer: Fix allowed insertion positions
* lisp/progmodes/grep.el (grep-edit--prepare-buffer): Fix allowed
insertion positions, like previously in xref-edit--prepare-buffer.
2026-04-03 04:38:59 +03:00
Dmitry Gutov
02c95dd92c xref-edit--prepare-buffer: Prohibit insertion before group headers too
* lisp/progmodes/xref.el (xref-edit--prepare-buffer): Do the
previous change for group headers as well (no insertion in front).
2026-04-03 04:33:14 +03:00
Stefan Monnier
99f2e353e7 lisp/help.el (help-function-arglist): Fix last change 2026-04-02 15:53:40 -04:00
Stefan Monnier
e6d97dfbe1 lisp/help.el (help-function-arglist): Handle advised aliases (bug#80725) 2026-04-02 15:50:59 -04:00
Stéphane Marks
faf1932875 New macro setopt-local and function set-local (bug#80709)
'setopt-local' is the buffer local equivalent of 'setopt'.

Unify 'setopt', 'setopt-local', 'setq-local',
'buffer-local-set-state' with 'setq' to signal
'wrong-number-of-arguments'.

* lisp/cus-edit.el (setopt): Change error signal to
'wrong-number-of-arguments'.
(setopt-local): New macro.
(setopt--set-local): New function.
* lisp/subr.el (set-local): New function.
(setq-local, buffer-local-set-state): Signal
'wrong-number-of-arguments' rather than 'error'.
* doc/emacs/custom.texi (Examining): Document 'setopt-local'.
* etc/NEWS: Announce the new macro and function.
2026-04-02 13:47:36 -04:00
Roi Martin
5032b2167d Assume wide chars may span any number of columns during semlf filling
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Use
`most-positive-fixnum' as the fill-column value during the unfill phase.
2026-04-02 13:43:30 -04:00
João Távora
dc7c36ea12 Eglot: release version 1.23
* lisp/progmodes/eglot.el (Version): Bump to 1.23.

* etc/EGLOT-NEWS: Announce new version.
2026-04-02 18:32:42 +01:00
João Távora
f0fcc87a34 Jsonrpc: release version 1.0.28
(Version): Bump to 1.0.28.
2026-04-02 18:31:09 +01:00
João Távora
cdf3f81141 Eglot: unbreak eglot-report-progress when set to 'messages' (bug#80653)
* lisp/progmodes/eglot.el (eglot-mode-line-progress): Fix cl-loop thinko.
2026-04-02 11:55:22 +01:00
João Távora
b93591551e Eglot: release version 1.22
* lisp/progmodes/eglot.el (Version): Bump to 1.22.
(Package-Requires): Bump eldoc to 1.16.0, flymake to 1.4.5,
jsonrpc to 1.0.27, xref to 1.7.0.

* etc/EGLOT-NEWS: Announce new version.
2026-04-01 22:37:01 +01:00
João Távora
985a674cee Eglot: revert part of last change
* lisp/progmodes/eglot.el (eglot--sig-info): Go back to adding
1, so it's clear that parlabel's are off-by-one.
2026-04-01 20:45:21 +01:00
Michael Albinus
56df32fefa Fix last change 2026-04-01 16:48:09 +02:00
Michael Albinus
b90153d18c Make epa-file-insert-file-contents more secure
* lisp/epa-file.el (epa-file-insert-file-contents):
Use `make-temp-file' instead of `make-temp-name'.
2026-04-01 16:23:27 +02:00
Tassilo Horn
ded80d0d49 Fix text visibility issue with show-paren--show-context-in-overlay
* lisp/paren.el (show-paren--show-context-in-overlay): Fix issue where
the overlay's text was hardly visible in certain cases (bug#59527).
2026-04-01 06:28:51 +02:00
Dmitry Gutov
1e807c5376 xref-edit--prepare-buffer: Fix text insertion behavior around prefix
* lisp/progmodes/xref.el (xref-edit--prepare-buffer): Fix text
insertion behavior before and after the line-number prefix.
2026-04-01 04:33:37 +03:00
Dmitry Gutov
f55df442d3 xref-edit-mode: Compute 'occur-target' markers lazily
* lisp/progmodes/xref.el (xref-edit--before-change-function):
New function (bug#80616).
(xref-change-to-xref-edit-mode, xref-edit-save-changes):
Use it in before-change-functions hook.
(xref-edit--prepare-buffer): Don't add 'occur-target' here.
2026-04-01 04:04:54 +03:00
Dmitry Gutov
aacf510fe5 Change "XREF" to "Xref" in mode lighter
* lisp/progmodes/xref.el (xref--xref-buffer-mode)
(xref--transient-buffer-mode, xref-edit-save-changes):
Change "XREF" to "Xref" for internal consistency.

* doc/emacs/maintaining.texi (Xref Commands):
Same.
2026-04-01 04:04:54 +03:00
Dmitry Gutov
cda65ffa58 Add xref-edit-mode (bug#80616)
Based on the existing grep-edit-mode code.

* lisp/progmodes/xref.el (xref-edit--prepare-buffer): New function.
(xref-edit-mode-map, xref-edit-mode-hook): New variables.
(xref-edit-mode, xref-change-to-xref-edit-mode)
(xref-edit-save-changes): New functions.
(xref--xref-buffer-mode-map): New binding ("e").

* doc/emacs/maintaining.texi (Identifier Search):
Mention xref-change-to-xref-edit-mode.

* etc/NEWS: Describe the addition.
2026-04-01 04:04:39 +03:00
Michael Albinus
f898d94c7b * lisp/epa-file.el (epa-file-insert-file-contents): Fix last change. 2026-03-31 20:10:56 +02:00
Michael Albinus
38a6b22a6c Improve file name handler usage in epa-file.el
* lisp/epa-file.el (epa-file-insert-file-contents): Handle other
file name handlers.  (Bug#80641)
2026-03-31 10:01:15 +02:00
Stefan Monnier
c1c08f3c9f (treesit--font-lock-level-setter): Work a bit more lazily
* lisp/treesit.el (treesit--font-lock-level-setter):
Use `font-lock-flush` (as discused in bug#80626).
(treesit-font-lock-fontify-region): Simplify a bit.
2026-03-30 13:06:35 -04:00
Stephen Gildea
d88bcc5e2e ; time-stamp: doc strings updates
* lisp/time-stamp.el (time-stamp-format): Spelling fix.
  (time-stamp-formatz-from-parsed-options): Document as internal.
2026-03-30 08:44:38 -07:00
Michael Albinus
9c75d761a5 Allow format specifiers in `tramp-login-program'
* doc/misc/tramp.texi (Extension packages): Explain how to use own
format specifiers.

* lisp/net/tramp.el (tramp-expand-args): Make DEFAULT argument
optional.  Handle also ARGS being an atom.
(tramp-handle-make-process):
* lisp/net/tramp-container.el (tramp-skeleton-completion-function):
* lisp/net/tramp-sh.el (tramp-ssh-or-plink-options)
(tramp-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Call `tramp-expand-args' for `tramp-login-program'.
2026-03-30 08:18:00 +02:00
Stefan Monnier
e6c1e87c1e Merge remote-tracking branch 'bug#80297-extend-shortdoc-infrastructure' 2026-03-28 12:12:34 -04:00
Ulrich Müller
8581188500 Fix typos in char-acronym-table
* lisp/international/characters.el (c0-acronyms): Fix #x1c "FS".
(c1-acronyms): Fix #x8d "RI", #x8f "SS3", and #x9a "SCI".
Leave #x99 alone because standards use both "SGCI" and "SGC".
2026-03-28 14:06:26 +01:00
Richard Lawrence
5346417d16 Update gnus-icalendar to use new iCalendar library
This change updates gnus-icalendar.el to use the new iCalendar
library instead of obsolete functions from icalendar.el.
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event)
(gnus-icalendar-event:recurring-p)
(gnus-icalendar-event:recurring-interval)
(gnus-icalendar-event:recurring-days)
(gnus-icalendar-event--find-attendee)
(gnus-icalendar-event-from-ical)
(gnus-icalendar-event-from-buffer)
(gnus-icalendar-event--build-reply)
(gnus-icalendar-event-reply-from-buffer)
(gnus-icalendar-event:org-repeat): Reimplement using new iCalendar functions.
(gnus-icalendar-event--attendees-by-type): Rename from
`gnus-icalendar-event--get-attendee-names'.
(gnus-icalendar-event--build-reply): Rename from
`gnus-icalendar-event--build-reply-event-body'.
(gnus-icalendar--format-participant-list): Expect list of
`icalendar-attendee's.  Add docstring.
(Bug#80426)

* test/lisp/gnus/gnus-icalendar-tests.el: Update tests.
2026-03-28 15:43:16 +03:00
Eli Zaretskii
f6c1421d1b Better support for anonymous faces in Enriched Text mode
* lisp/textmodes/enriched.el (enriched-face-ans): Support
:underline, :weight, and :slant in anonymous faces.  Suggested by
Madhu <enometh@meer.net>.
2026-03-28 13:13:19 +03:00
Eli Zaretskii
d285b07579 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-03-28 12:17:04 +03:00
Eli Zaretskii
74e771d816 ; * lisp/gnus/gnus-delay.el (gnus-delay-article): Fix last change. 2026-03-28 12:16:11 +03:00
Adam Sjøgren
f932a683e8 Gnus: Accept date and time when specifying delay of a new article
* lisp/gnus/gnus-delay.el (gnus-delay-article): Accept YYYY-MM-DD
hh:mm(:ss) as a valid format.  (Bug#80637)

Copyright-paperwork-exempt: yes
2026-03-28 12:10:21 +03:00
Michael Albinus
a481b5807e Fix tramp-smb-handle-copy-file
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
Suppress `jka-compr-handler'.  Reported by Seppo Ronkainen
<sodr80@protonmail.com>.  (Bug#80667)
2026-03-28 10:04:07 +01:00
Michael Albinus
0de3844f80 Fix file-name-all-completions for symlinked directories in Tramp
* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Simplify.
* tramp-tests.el (tramp-test32-shell-command): Adapt test.

* lisp/net/tramp-ftp.el (tramp-disable-ange-ftp): Use `seq-difference'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter):
Use `thread-last'.

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `seq-difference'.
(tramp-sh-gio-monitor-process-filter): Use `thread-last'.

* lisp/net/tramp-smb.el (tramp-smb-get-file-entries): Do not add
virtual entry ""; it isn't needed anymore.

* lisp/net/tramp.el (tramp-make-tramp-hop-name): Use `thread-last'.
(tramp-completion-handle-file-directory-p): Use `tramp-prefix-format'.
(tramp-fnac-add-trailing-slash): New defvar.
(tramp-skeleton-file-name-all-completions): Handle also symlinked
directories.
(tramp-skeleton-directory-files): Use `tramp-fnac-add-trailing-slash'.
(tramp-handle-file-name-completion): Use `seq-difference'.
(tramp-handle-make-process): Handle "%w" format specifier.

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test32-shell-command, tramp-test36-vc-registered): Adapt tests.
2026-03-28 10:03:22 +01:00
Martin Rudalics
c8b956dc32 ; Fix last fix to 'window--make-major-side-window'
* lisp/window.el (window--make-major-side-window): Fix last fix
which was broken by the committer.
2026-03-27 23:35:24 +01:00
Emil Ingelman Sahlén
57b119b296 Fix recombination of side windows (Bug#80665)
* lisp/window.el (window--make-major-side-window): Protect the
sibling (the main-window group) from recombination.  Without
this, deleting a side window can flatten the group into the
root, causing subsequent side windows on other sides to be
placed incorrectly (Bug#80665).

Copyright-paperwork-exempt: yes
2026-03-27 19:48:02 +01:00
Stephen Berman
3b7d9e37ce Implement new Dired handling of errors from 'ls'
The error messages are now displayed in a popped up buffer instead
of being output in the Dired buffer and signalling an error.  The
file name bounds in Dired entries are now determined solely by the
offsets calculated by 'ls' with the --dired option and
consequently Dired now reliably recognizes file names that contain
a newline (bug#80499).

* etc/NEWS: Announce new Dired handling of errors from 'ls'.

* lisp/dired.el (dired-internal-noselect): Check Dired buffer for
file entries and if there are none kill the buffer to prevent
displaying a Dired buffer with no file entries.
(dired--ls-error-buffer): New variable.
(dired--display-ls-error): New function.
(dired, dired-other-window, dired-other-frame, dired-other-tab):
Use it to pop up buffer with error message emitted by 'ls'.

* lisp/files.el (insert-directory-clean): Remove the code that
treats lines beginning at column 0 in a Dired buffer as error
lines and consequently also remove the code using these lines to
adjust the offsets specifying the bounds of the file name in the
Dired entries.  If the buffer contains a //DIRED-OPTIONS// line
output by --dired, delete this line even when it is at BOB.
(insert-directory): Remove the code that checks the return value
of 'ls' and signals an error based on that value.  Write any error
message emitted by 'ls' to a temporary file and insert its content
into a buffer, which will be popped when invoking a Dired command
results in the 'ls' error.  Adjust the comment above this function
to accommodate file names containing a newline in Dired entries.
(insert-directory-adj-pos): Remove this now unused function.

* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2)
(dired-test-ls-error-message): New tests.

* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Adjust test
to use of 'ls' error buffer instead of signaling an error.
2026-03-27 16:36:16 +01:00
Stefan Monnier
de381366ea (c++-ts-mode): Fix bug#80682
* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Set
`editorconfig-indent-size-vars` since it can't be guessed.
2026-03-27 09:56:55 -04:00
Stefan Monnier
db412283d6 (kmacro-end-call-mouse): Make obsolete
* lisp/kmacro.el (kmacro-end-and-call-macro): Add EVENT argument.
(kmacro-end-call-mouse): Define as obsolete alias
of `kmacro-end-and-call-macro`.
2026-03-27 08:54:14 -04:00
Eli Zaretskii
9b5a9c90d2 ; * lisp/textmodes/css-mode.el: Update maintainer's email address. 2026-03-27 10:24:45 +03:00
YugaEgo
0b0cee07d2 * lisp/textmodes/css-mode.el (css-pseudo-class-ids): Add 'has' (bug#80664). 2026-03-27 10:22:22 +03:00
Basil L. Contovounesios
d780007283 Add predicate for initial_terminal
This introduces the predicate frame-initial-p, which uses
struct frame.output_method or struct terminal.type to detect
initial_terminal without relying on its name (bug#80629).
For some prior discussion, see:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00480.html
https://lists.gnu.org/r/emacs-devel/2020-01/msg00120.html

* doc/lispref/frames.texi (Frames): Document frame-initial-p.
(Finding All Frames): Fix grammar.
* etc/NEWS (Lisp Changes in Emacs 31.1): Announce frame-initial-p.
* lisp/desktop.el (desktop--check-dont-save):
* lisp/emacs-lisp/debug.el (debug):
* lisp/frameset.el (frameset-restore):
* lisp/menu-bar.el (menu-bar-update-buffers):
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal):
Use frame-initial-p instead of checking the "initial_terminal" name.
* lisp/emacs-lisp/byte-opt.el: Mark frame-initial-p as error-free.

* src/pgtkterm.c (pgtk_focus_changed): Use IS_DAEMON in place of
Fdaemonp, thus also accepting a named daemon session.
* src/terminal.c (decode_tty_terminal): Clarify commentary.
(Fframe_initial_p): New function.
(syms_of_terminal): Expose it.
(init_initial_terminal): Update commentary now that
menu-bar-update-buffers uses frame-initial-p (bug#53740).

* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Simulate the
lack of an initial terminal by overriding frame-initial-p now
that turn-on-xterm-mouse-tracking-on-terminal uses it.
* test/src/terminal-tests.el: New file.
2026-03-26 15:19:56 +01:00
Basil L. Contovounesios
b5f6bc0072 Improve last change to auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass-search): Remove
redundant expand-file-name.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass--with-store): Bind auth-source-pass-filename to an
existing directory to satisfy the new guard in
auth-source-pass-search (bug#76323).
2026-03-26 15:05:22 +01:00
Naofumi Yasufuku
3c06b7d523 Don't error on nonexistent ~/.password-store
* lisp/auth-source-pass.el (auth-source-pass-search):
If auth-source-pass-filename is not a directory, just do nothing to
avoid repeated errors raised by directory-files-recursively in
auth-source-pass-entries which is called for each search pattern.
(Bug#76323)

Copyright-paperwork-exempt: yes
2026-03-26 14:25:11 +01:00
Eli Zaretskii
4f46593668 ; * lisp/tool-bar.el (tool-bar-setup): Adapt to change for bug#80545. 2026-03-26 11:20:53 +02:00
Jens Schmidt
bc27623057 ; Fix some shortdoc issues unearthed by `shortdoc--check'
* lisp/emacs-lisp/shortdoc-doc.el (map, number): Fix issues.
* lisp/treesit.el (treesit): Fix issues.
2026-03-25 22:38:38 +01:00
Jens Schmidt
82882db8ed Split up shortdoc functions and groups, fix their format
Move shortdoc group definitions from shortdoc.el to a separate file
shortdoc-doc.el.  Document shortdoc group format in a future-proof way
and guide package authors on how to use shortdoc groups across past
Emacs versions.

* lisp/emacs-lisp/shortdoc-doc.el: New file.
* lisp/emacs-lisp/shortdoc.el: Document shortdoc group format in a
future-proof way.  Require 'shortdoc-doc'.
(shortdoc--keyword-plist-p): New function.
(shortdoc--check): Update to check the documented shortdoc group format.
(shortdoc--groups, define-short-documentation-group): Pull out of
autoloaded 'progn'.
(define-short-documentation-group): Report errors in terms of byte
compiler warnings.
(alist, map, string, file-name, file, hash-table, list, symbol)
(comparison, vector, regexp, sequence, buffer, overlay, process, number)
(text-properties, keymaps): Move group to shortdoc-doc.el.
(shortdoc): Move alias to after function.
(shortdoc-add-function): Add argument checks.
* doc/lispref/tips.texi (Documentation Group Tips): New section.
* doc/lispref/elisp.texi (Top):
* doc/lispref/tips.texi (Tips): Add references to it.
* doc/lispref/help.texi (Documentation Groups): Ditto, and add some
concept index entries.  (bug#80297)
2026-03-25 22:31:57 +01:00
Stephen Berman
f2b9b827c9 Fix Dired check for newlines in file names
Ensure that Dired does not treat the sequence "\\n" within a file
name as a newline (bug#80608).

* lisp/dired.el (dired--filename-with-newline-p): Rewrite using
'directory-files' with match for regexp "\n".

* test/lisp/dired-tests.el
(dired-test--filename-with-backslash-n): New function.
(dired-test-filename-with-backslash-n): New test.
2026-03-25 20:45:44 +01:00
Jens Schmidt
630af2f2e4 ; Restore shortdoc.el 2026-03-25 16:33:41 +01:00
Jens Schmidt
bb67a210f1 ; Rename shortdoc.el to shortdoc-doc.el 2026-03-25 16:32:32 +01:00