1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

179826 commits

Author SHA1 Message Date
Stefan Monnier
171c7fd6df (define-minor-mode): Update global-minor-modes if init-value is non-nil
When a global minor mode is enabled by init-value rather than by
calling the major mode function, we failed to register it in
`global-minor-modes` (bug#79518).

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Register
ourselves in `global-minor-modes` at top-level for global modes
with a non-nil init-value.
Also in the `modefun`, simply the code with `not` and `add-to-list`
and consolidate the local/global paths to update `*-minor-modes`.

* lisp/simple.el (global-minor-modes): Move to...
* lisp/subr.el (global-minor-modes): ...here so it's defined early enough
for `auto-compression-mode` to register itself.
2025-10-14 11:47:05 -04:00
Michael Albinus
3aae55acfc Fix Tramp customization
Do not use the ;;;###tramp-autoload cookie for defcustoms.  This
damages the customisation when Tramp is autoloaded.  Reported by
Joel Reicher <joel.reicher@gmail.com>.

* lisp/net/tramp-cache.el (tramp-verbose): Declare.
(tramp-connection-properties):
* lisp/net/tramp-message.el (tramp-verbose):
Remove ;;;###tramp-autoload cookie.
2025-10-14 12:58:27 +02:00
Eli Zaretskii
bcc33e300a Extend Tree-sitter support on MS-Windows to v0.26.x
* lisp/term/w32-nt.el (dynamic-library-alist): Support Tree-sitter
DLLs for versions upto 0.26.x.
2025-10-14 12:47:57 +03:00
Jonas Bernoulli
0dd8138d3f
Update to Transient v0.10.1-8-g188ec9a1 2025-10-13 20:33:30 +02:00
Sean Whitton
aae6a9a740 ; * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use cl-nset-difference. 2025-10-13 16:38:49 +01:00
Sean Whitton
78416e8bed * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use file-in-directory-p.
For better compatibility with MS-Windows.
2025-10-13 16:38:14 +01:00
Sean Whitton
7e38562bcd ; Fix recently introduced uses of "ELisp". 2025-10-13 16:37:40 +01:00
Eshel Yaron
fff1c66830
; Improve 'elisp-unknown-call' face for dark backgrounds
* lisp/progmodes/elisp-mode.el (elisp-unknown-call): Use a
lighter foreground color on dark backgrounds for legibility.
2025-10-13 11:39:12 +02:00
Eli Zaretskii
00b92cd932 ; Improve documentation of semantic highlighting
* lisp/progmodes/elisp-mode.el (elisp)
(elisp-fontify-semantically, elisp-symbol-at-mouse)
(elisp-free-variable, elisp-special-variable-declaration)
(elisp-condition, elisp-major-mode-name, elisp-face)
(elisp-symbol-role, elisp-symbol-role-definition)
(elisp-function, elisp-non-local-exit, elisp-unknown-call)
(elisp-macro, elisp-special-form, elisp-throw-tag)
(elisp-feature, elisp-rx, elisp-theme, elisp-binding-variable)
(elisp-bound-variable, elisp-shadowing-variable)
(elisp-shadowed-variable, elisp-variable-at-point)
(elisp-warning-type, elisp-function-property-declaration)
(elisp-thing, elisp-slot, elisp-widget-type, elisp-type)
(elisp-group, elisp-nnoo-backend, elisp-ampersand)
(elisp-constant, elisp-defun, elisp-defmacro, elisp-defvar)
(elisp-defface, elisp-icon, elisp-deficon, elisp-oclosure)
(elisp-defoclosure, elisp-coding, elisp-defcoding)
(elisp-charset, elisp-defcharset, elisp-completion-category)
(elisp-completion-category-definition, elisp-add-help-echo)
(elisp-fontify-symbol-precedence-function): Add :version tags.

* lisp/emacs-lisp/elisp-scope.el: Fix references to meta-syntactic
variables in the commentary.
(elisp-scope-describe-symbol-role, coding, defcoding, charset)
(defcharset): Doc fixes.
(elisp-scope-safe-macros): Add :version tag.  Doc fix.

* doc/emacs/display.texi (Semantic Font Lock): Fix punctuation and
wording, improve cross-references and indexing.
2025-10-13 11:32:23 +03:00
Martin Rudalics
750499e4b7 Rewrite 'minibuffer-nonselected-mode' to use 'window-state-change-functions'
* lisp/minibuffer.el (minibuffer-nonselected): Rewrite
doc-string.
(minibuffer--nonselected-overlay): Define it global.  Rewrite
doc-string.
(minibuffer--nonselected-check): Rewrite by comparing the active
minibuffer window with the selected window.
(minibuffer--nonselected-setup): Globally add
'minibuffer--nonselected-check' to list of functions called by
'window-state-change-functions'.
(minibuffer--nonselected-exit): Remove
'minibuffer--nonselected-check' from list of functions called by
'window-state-change-functions' when exiting last recursive
minibuffer.
(minibuffer-nonselected-mode): Globally add/remove
'minibuffer--nonselected-setup' to/from list of functions called
by 'minibuffer-setup-hook' and 'minibuffer--nonselected-exit'
to/from list of functions called by 'minibuffer-exit-hook' when
activating/deactivating 'minibuffer-nonselected-mode'.  Rewrite
doc-string.
2025-10-13 10:22:04 +02:00
Joyer Huang
a184ae8eda ; ido.el: Use find-program variable instead of literal "find" (bug#79620)
Copyright-paperwork-exempt: yes
2025-10-13 10:22:23 +03:00
Eshel Yaron
f2f544c1af
; Improve 'elisp-free/bound-variable' faces.
* lisp/progmodes/elisp-mode.el (elisp-free-variable)
(elisp-bound-variable): Reset the foreground face (to avoid
inheriting it from 'font-lock-variable-use-face') instead of
hardcoding it to "black".
2025-10-13 08:51:21 +02:00
Eshel Yaron
0816864231
Merge branch 'feature/elisp-fontify-semantically' 2025-10-12 17:12:48 +02:00
Eshel Yaron
07505fd6c5
; elisp-scope.el: Improve customization group name handling.
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-quoted-group):
Delete it.
(define-minor-mode, define-derived-mode): Simplify analyzers.
2025-10-12 17:09:36 +02:00
Eshel Yaron
8186705752
; elisp-scope.el: Improve widget-type handling.
Use argument specs to analyze complex widget types.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope-widget-type)
(elisp-scope-widget-type-1)
(elisp-scope-widget-type-keyword-arguments)
(elisp-scope-widget-type-arguments)
(elisp-scope-widget-type-arguments-1): Delete, no longer used.
(custom-declare-variable, define-widget): Simplify analyzers.
(elisp-scope--match-spec-to-arg): Add new 'list', 'and', and
'plist-and-then' parametric specs, and add 'widget-type' as a
new recursive spec.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el
Add test.
2025-10-12 17:02:11 +02:00
Eli Zaretskii
21dc6d3778 Fix squashfs archives embedded in another archive
* lisp/arc-mode.el (archive-delete-local): Delete the directory
recursively.
(archive-squashfs-summarize): Make a local copy of a file if
squashfs archive is included in another archive.  (Bug#79582)
2025-10-12 17:30:05 +03:00
Stefan Monnier
b1f924e12f (read-only-keymap-*): Be more careful with the namespace
* lisp/keymap.el (keymap-read-only-bind): Rename from
`read-only-keymap-bind`.  Improve docstring.
(keymap--read-only-filter): Rename from `read-only-keymap-filter`.
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
* lisp/net/browse-url.el (browse-url-button-map):
* lisp/ansi-osc.el (ansi-osc-hyperlink-map): Adjust accordingly.
2025-10-12 09:50:31 -04:00
Michael Albinus
06639a6b9b Fix regression in Tramp file name completion
* lisp/net/tramp.el (tramp-make-tramp-file-name): Do not use the
hop for the "archive" method.
2025-10-12 14:34:53 +02:00
James Thomas
d1e173140d ; * doc/misc/gnus.texi (Optional Back End Functions): Add newer (bug#79484). 2025-10-12 12:44:47 +03:00
James Thomas
1ec7f8f9b2 ; * doc/misc/gnus.texi: Fix formatting (bug#79484). 2025-10-12 12:43:25 +03:00
Eshel Yaron
73feb431b3
; elisp-mode.el: Improve consistency among face names.
Rename a couple of faces to solidify the convention that the
face name 'elisp-foo' implies "references to foo", not "foo
definitions".  For definitions we use 'elisp-deffoo' if foo is
only one word, or 'elisp-bar-baz-definition' otherwise.

* lisp/progmodes/elisp-mode.el (elisp-function-reference):
Rename to 'elisp-function'.
(elisp-macro-call): Rename to 'elisp-macro'.
(elisp-non-local-exit):
(elisp-unknown-call):
(elisp-special-form):
* lisp/emacs-lisp/elisp-scope.el:
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Update references to renamed faces.
2025-10-12 10:33:58 +02:00
Eshel Yaron
026f3bbd8d
; elisp-scope.el: Clean up symbol role definitions.
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Fix typo in doc string.
(elisp--annotate-symbol-with-help-echo): Accept plain string
as value of ':help' symbol role property.
* lisp/emacs-lisp/elisp-scope.el: Remove unused symbol role
properties from all defined symbol roles.  Use plain strings
for ':help' instead of wrapping them with 'cl-constantly'.
Cease 'require'ing 'cl-lib', no longer needed in runtime.
(elisp-scope-define-symbol-role): Update doc string.
2025-10-12 10:17:00 +02:00
Martin Rudalics
90ba21979f Make buffer-local decorations show up on new window-system frames (Bug#79606)
* lisp/frame.el (make-frame): On window-system frames apply
buffer-local values for fringes, scroll bars and margins of root
and minibuffer window after the new frame was made (Bug#79606).
2025-10-12 10:16:52 +02:00
Eli Zaretskii
f91de96d03 Update MS-Windows manifest for Emacs
* nt/emacs-x64.manifest:
* nt/emacs-x86.manifest: supportedOS GUID for Windows 11 is the
same as for Windows 10.  See
https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#trustinfo
2025-10-12 08:38:00 +03:00
Juri Linkov
90b43e3208 * lisp/progmodes/hideshow.el: Small improvements (bug#79585).
(hs-allow-nesting): Turn defvar into defcustom.
(hs-indicator-hide): Use BLACK DOWN-POINTING SMALL TRIANGLE
as a counterpart for the BLACK RIGHT-POINTING SMALL TRIANGLE.
2025-10-11 21:37:52 +03:00
Sean Whitton
2acd9702de ; Simplify last change slightly, improve wording, add xref. 2025-10-11 13:56:21 +01:00
Pedro Andres Aranda Gutierrez
1170c27746 ; use-package manual: Discuss defvar-keymap ':prefix t'
* doc/misc/use-package.texi (Binding to a keymap): Discuss
defvar-keymap ':prefix t' feature.
2025-10-11 13:53:13 +01:00
Michael Albinus
ba7e957926 Make cascaded archives working in tramp-archive.el work, again
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Move bindings of `tramp-methods' and `tramp-gvfs-methods' up.
(tramp-archive-file-name-handler): Do not use
`tramp-archive-run-real-handler' for testing existence of
`archive'.  (Bug#79582)

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive-hexlified): Move down.
(tramp-archive-test-cascaded-file-archive)
(tramp-archive-test-cascaded-archive, tramp-archive-test-cascaded):
New defvars.
(tramp-archive--test-deftest-cascaded): New defmacro.
(tramp-archive-test01-file-name-syntax)
(tramp-archive-test05-expand-file-name): Adapt tests.
(tramp-archive-test01-file-name-syntax-cascaded)
(tramp-archive-test05-expand-file-name-cascaded)
(tramp-archive-test06-directory-file-name-cascaded)
(tramp-archive-test07-file-exists-p-cascaded)
(tramp-archive-test08-file-local-copy-cascaded)
(tramp-archive-test09-insert-file-contents-cascaded)
(tramp-archive-test11-copy-file-cascaded)
(tramp-archive-test15-copy-directory-cascaded)
(tramp-archive-test16-directory-files-cascaded)
(tramp-archive-test17-insert-directory-cascaded)
(tramp-archive-test18-file-attributes-cascaded)
(tramp-archive-test19-directory-files-and-attributes-cascaded)
(tramp-archive-test20-file-modes-cascaded)
(tramp-archive-test21-file-links-cascaded)
(tramp-archive-test26-file-name-completion-cascaded)
(tramp-archive-test40-make-nearby-temp-file-cascaded)
(tramp-archive-test43-file-system-info-cascaded)
(tramp-archive-test44-user-group-ids-cascaded): New tests.

* test/lisp/net/tramp-archive-resources/outer.zip: New test file.
2025-10-11 14:37:04 +02:00
Eshel Yaron
0d7fc4516c
Document 'elisp-fontify-semantically' in the Emacs manual
* doc/emacs/display.texi (Semantic Font Lock): New node.
* doc/emacs/emacs.texi: Update menu.
* etc/NEWS: Update relevant entry.
* lisp/emacs-lisp/elisp-scope.el: Expand commentary.
* doc/misc/elisp-semantic-highlighting.org: Delete it.
2025-10-11 14:25:45 +02:00
Eli Zaretskii
dcea973c04 Fix MS-Windows tray notifications from different Emacs frames
* src/w32fns.c (EMACS_TRAY_NOTIFICATION_ID_INIT): Rename from
EMACS_TRAY_NOTIFICATION_ID; all users adjusted.
(last_tray_notification_id): New static variable.
(add_tray_notification): Advance 'last_tray_notification_id' for
each new notification; wrap around to the fixed initial value when
reached the maximum.  This allows Lisp programs track notifications
and remove them from the same frame from which they were created.
(Fw32_notification_notify, Fw32_notification_close): Doc fixes.

* doc/lispref/os.texi (Desktop Notifications): Update the
documentation of 'w32-notification-notify' and
'w32-notification-close'.

Bug#79400
2025-10-11 14:00:09 +03:00
Eli Zaretskii
c723760f28 Merge from origin/emacs-30
1895ba3ba3 ; Document %i format
85db0ac0d6 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a ...
c119a3600e ; * doc/lispref/tips.texi (Documentation Tips): Document ...

Also fix trailing whitespace in test files.
2025-10-11 06:02:56 -04:00
Elías Gabriel Pérez
4136bcb692 hideshow: Fix cursor when using end-of-line indicators.
bug#79580

* lisp/progmodes/hideshow.el (hs--make-indicators-overlays): Add
'cursor' property to the EOL indicator, so it will not conflict
with flymake EOL indicators.
2025-10-11 12:49:39 +03:00
Eli Zaretskii
c76da79e45 ; * doc/emacs/mini.texi (Minibuffer History): Improve indexing. 2025-10-11 12:47:04 +03:00
Pooya Moradi
f362cef564 Eglot: Add LSP server for TOML.
* lisp/progmodes/eglot.el (eglot-server-programs): Add LSP server
for TOML.  (Bug#79605)

Copyright-paperwork-exempt: yes
2025-10-11 12:37:20 +03:00
Eli Zaretskii
f8b4ce6843 Fix last change
At least on MS-Windows, the last change caused the
process-tests/fd-setsize-no-crash/make-process test to hang.
* src/process.c (wait_reading_process_output) [WINDOWSNT]: Do
not stop monitoring the process descriptor when zero bytes are
read.  The EOF indication from subprocesses on MS-Windows is
detected via an error condition (see w32.c), while zero-size
reads are not to be taken as such.  (Bug#79436)
2025-10-11 12:22:58 +03:00
Spencer Baugh
c172b6dded Stop monitoring fds after receiving EOF
When a subprocess closes its stdout/stderr pipe, that causes
pselect to always indicate that fd is readable, and read to
always return with EOF on that fd.  Therefore when we receive an
EOF we need to stop monitoring the fd.  Otherwise Emacs will
spin at 100% CPU, repeatedly reading that same EOF off the fd.

* src/process.c (wait_reading_process_output): When
'read_process_output' returns EOF indication, stop monitoring
the descriptor.  (Bug#79436)
2025-10-11 12:22:17 +03:00
Spencer Baugh
443af6fe1d Allow creating a pipe process without a buffer
Previously, even passing :buffer nil to make-pipe-process would
create a buffer.  Now, if you explicitly call (make-pipe-process
:buffer nil), it will create a pipe process without a buffer,
just like all the other process creation functions.

* src/process.c (Fmake_pipe_process): Check for explicit :buffer
nil and don't make a buffer. (bug#79596)
* doc/lispref/processes.texi (Asynchronous Processes): Update.
* test/src/process-tests.el
(process-test-make-pipe-process-no-buffer): Add test.
2025-10-11 12:14:10 +03:00
Eli Zaretskii
1895ba3ba3 ; Document %i format
* src/editfns.c (Fformat): Doc fix.

* doc/lispref/strings.texi (Formatting Strings): Document %i.
2025-10-11 12:08:48 +03:00
Sahil Kang
dc2650faa9 * src/pdumper.c (dump_queue_dequeue): Avoid -Wgnu-folding-constant.
Fixes bug#79581
Copyright-paperwork-exempt: yes
2025-10-11 11:58:58 +03:00
Manuel Giraud
3d0027afb5 Do not erase the output buffer upon empty async shell command
* lisp/simple.el (shell-command): Test if an asynchronous
shell command is not empty before creating or erasing the
output buffer.  (Bug#79560)
2025-10-11 11:49:22 +03:00
Eli Zaretskii
85db0ac0d6 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a typo (bug#79613). 2025-10-11 09:47:14 +03:00
Arash Esbati
340149c0a3 ; * doc/misc/reftex.texi (Builtin Label Environments): Fix typo. 2025-10-10 11:27:32 +02:00
Arash Esbati
f344f5c4bf Replace obsolete floatfig package with floatflt
* doc/misc/reftex.texi (Builtin Label Environments): Mention the
floatflt LaTeX package instead of the obsolete floatfig.

* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin):
Replace obsolete floatfig entry with floatflt.  Add entry for
"floatingtable".
Fix type indicator for "tabwindow".
(reftex-default-label-alist-entries): Use floatflt as well.
2025-10-10 11:17:54 +02:00
Eli Zaretskii
7d75ee2bd0 ; * lisp/progmodes/flymake.el (flymake-margin-indicators-string): Doc fix. 2025-10-10 09:36:09 +03:00
Juri Linkov
816a7b5e25 * lisp/progmodes/flymake.el: Improve flymake--resize-margins.
(flymake--resize-margins): Move checking for a non-displayable
character to the loop over all supported symbols.
(flymake-margin-indicators-string): Mention the character name
in the docstring.
2025-10-09 22:15:03 +03:00
Spencer Baugh
e2567eab10 Treat a completion boundary change as completion
In completion--do-completion, check if completion-try-completion
moved point out of the old completion boundaries.  If that
happened, then we did non-trivial completion even if the string
is otherwise unchanged.

For example,
~/src/emacs/trunk/lisp|/progmodes/project.el
hitting TAB moves us to:
~/src/emacs/trunk/lisp/|progmodes/project.el
then hitting TAB again moves us to
~/src/emacs/trunk/lisp/progmodes/|project.el

Both of these completions are successful, but we previously ran
code for completion failure (the t branch of the cond in
completion--do-completion) in the second case.  In particular,
we would always run minibuffer-completion-help, ignoring the
specific value of completion-auto-help which controls whether or
not to run minibuffer-completion-help.  Now we correctly run
code for successful completion for both cases.

We also always have checked that we're in the same boundaries
before doing completion cycling; that check is now more
accurate (bug#79238).

* lisp/minibuffer.el (completion--in-boundaries-p): Add.
(completion--do-completion): Check completion--in-boundaries-p.
2025-10-09 20:50:30 +03:00
Juri Linkov
7c7bfa625e * lisp/xdg.el (xdg-mime-apps): Fix recent regression.
After the change that introduced 'hash-table-contains-p'
it's necessary to keep setting 'files' to the hash value.
2025-10-09 20:27:41 +03:00
Juri Linkov
0925e19064 Use shorter margin indicators in flymake-mode (bug#76254)
* lisp/progmodes/flymake.el (flymake-margin-indicators-string):
Replace two-character error indicator "!!" with one character "‼".
Update the docstring.
(flymake--resize-margins): Use "!!" when "‼" is not displayable.
Calculate the margin width depending on the indicator string width.
2025-10-09 20:14:41 +03:00
Eli Zaretskii
854690a9e3 * src/w32console.c: Fix last change (bug#79298). 2025-10-09 15:21:38 +03:00
Arash Esbati
d8448facd9 Remove setting of reference format
* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin):
Don't set the reference format for ?f and ?t type indicators in
entries of subfig.
2025-10-09 11:55:47 +02:00