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

179851 commits

Author SHA1 Message Date
Stephen Gildea
90ec5ef01b Manual pages: use a showcase time-stamp-pattern
* doc/man/ebrowse.1:
* doc/man/emacs.1.in:
* doc/man/emacsclient.1:
* doc/man/etags.1:  Loosen the time-stamp-pattern used so that
it is not specific to each file.  These files now provide
readable examples that will work with most man pages.
2025-10-16 17:29:01 -07:00
Stephen Gildea
d208502e4c time-stamp: padding composed characters
* lisp/time-stamp.el (time-stamp-string-preprocess): Use
'string-width' instead of 'length' to calculate needed padding.

Thanks to Stefan Monnier for the suggestion.
2025-10-16 15:23:48 -07:00
Eshel Yaron
888a910bc9
; elisp-scope.el: Standardize copyright notice.
Suggested by Arash Esbati <arash@gnu.org>.
2025-10-16 19:21:09 +02:00
Spencer Baugh
17ac50ea9e Return case common to all completions in try-completion
When completion-ignore-case is non-nil, if all completions share
a common prefix ignoring case, try-completion has always
returned that.  Now, if all completions also share a common
prefix including case, try-completion includes that common
prefix in its return value (bug#79377).

* lisp/minibuffer.el (completion-pcm--merge-completions): Always
use return value from try-completion, which may change case.
* src/minibuf.c (Ftry_completion): Return the common prefix
which changes case.
* test/lisp/minibuffer-tests.el (completion-pcm-bug4219)
(completion-substring-test-5): New tests.
2025-10-16 20:18:23 +03:00
Juri Linkov
b0078bfa15 Improve color contrast of refine-related diff faces on dark backgrounds
* lisp/vc/diff-mode.el (diff-refine-removed, diff-refine-added):
* lisp/vc/ediff-init.el (ediff-fine-diff-A, ediff-fine-diff-B):
* lisp/vc/smerge-mode.el (smerge-refined-removed, smerge-refined-added):
Lower the dominant component of RGB colors from "aa" to "88" (bug#79633).
2025-10-16 20:05:41 +03:00
Juri Linkov
bbbad93498 * lisp/treesit.el: Small fixes in navigation functions.
(treesit-up-list): Better handle multi-language buffers.
(treesit-hs-find-next-block): Fix off-by-one error.
2025-10-16 19:40:21 +03:00
Sean Whitton
208241aa83 Update VC-Dir contents upon revert-buffer
* lisp/vc/vc-hooks.el (vc-after-revert): New function.
(after-revert-hook): Add it.
2025-10-16 17:19:43 +01:00
Sean Whitton
d0d6e5ce65 vc-auto-revert-mode: Fix an autoload problem
* lisp/vc/vc-hooks.el (auto-revert-mode): Replace compiler
declaration for this variable with a full defvar-local.
2025-10-16 16:56:47 +01:00
Sean Whitton
f36ed942b1 autorevert: Use defvar-local for the -mode variables
* lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode):
Use defvar-local not defvar.  New comment explaining why these
duplicate definitions of the variables are present.
2025-10-16 16:56:00 +01:00
Martin Rudalics
8aeb4f82d9 ; * lisp/minibuffer.el (minibuffer--nonselected-check): Fix typos. 2025-10-16 10:17:29 +02:00
Martin Rudalics
85a9189dbb In 'minibuffer--nonselected-check' consult 'completion-reference-buffer'
* lisp/minibuffer.el (minibuffer--nonselected-check): Don't
highlight when the selected window's buffer has
'completion-reference-buffer' set.
2025-10-16 09:59:15 +02:00
Juri Linkov
0a4503de3a Check if treesit-major-mode-remap-alist is bound in ts-modes autoload forms
* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-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/python.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/markdown-ts-mode.el:
* lisp/textmodes/mhtml-ts-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el: In autoload forms replace
'(treesit-available-p)' with (boundp 'treesit-major-mode-remap-alist).
Calling 'treesit-available-p' in loaddefs.el is too early
since the tree-sitter library might not be loaded yet.
Checking if 'treesit-major-mode-remap-alist' is bound is
equivalent to checking if Emacs is compiled with tree-sitter support.
(bug#79622)
2025-10-16 09:45:30 +03:00
Stephen Gildea
88c18efb3a time-stamp: padding with mixed uni- and multibyte
* lisp/time-stamp.el (time-stamp-string-preprocess): Use
'length' instead of 'format' to calculate string padding,
so that we consistently count characters, not bytes.
2025-10-15 20:44:47 -07:00
Stefan Monnier
39d711696a (remote-shell-program): Simplify
* lisp/files.el (remote-shell-program): Don't bother looking
for the full file name of the `ssh` executable, since all users
end up looking it up in `load-path` anyway.
2025-10-15 16:30:59 -04:00
Eshel Yaron
cb4d9efbd4
; elisp-scope.el: Rename some private symbols as such
Also add a few missing docstrings.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope-symbol-role-p)
(elisp-scope-read-symbol-role, elisp-scope-special-variables)
(elisp-scope-let, elisp-scope-let*): Add docstring.
(elisp-scope-counter, elisp-scope-callback)
(elisp-scope-current-let-alist-form, elisp-scope-local-new)
(elisp-scope-sym-pos, elisp-scope-sym-bare)
(elisp-scope-report, elisp-scope-special-variable-p)
(elisp-scope-let-1, elisp-scope-variable)
(elisp-scope-binding, elisp-scope-symbol): Rename, replace
'elisp-scope-' prefix with 'elisp-scope--' to indicate that
these are private.  Update all references.
2025-10-15 21:41:22 +02:00
Stefan Monnier
f37a150a5f doc/emacs/display.texi (Semantic Font Lock): Simplify 2025-10-15 15:21:06 -04:00
Stefan Monnier
b25d9d2081 (easy-mmode--less-selective-first): Uncomment the test
* test/lisp/emacs-lisp/easy-mmode-tests.el (easy-mmode--less-selective-first):
Mark it as failing, instead.
2025-10-15 14:36:04 -04:00
Juri Linkov
eb9a93b221 * lisp/minibuffer.el: Fix recent change of scrolling truncated completions
(completion--lazy-insert-strings-on-scroll): Don't move to the last
completion candidate since this is what happens when scrolling without
truncated completions buffer (bug#79506).
2025-10-15 20:14:43 +03:00
Juri Linkov
c4490084fc ; * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Improve docstrings.
Add mentions of `treesit-enabled-modes' to the docstrings (bug#79627).
2025-10-15 19:08:48 +03:00
Sean Whitton
6cb7fa36ad New tests for multiple globalized minor modes
* test/lisp/emacs-lisp/easy-mmode-tests.el
(easy-mmode-test-mode): Mark permanent-local.
(easy-mmode--test-two-globalized-modes): New function.
(easy-mmode--more-selective-first)
(easy-mmode--less-selective-first): New tests.
2025-10-15 16:20:46 +01:00
Stefan Monnier
11b7cd7ebe (xdg-mime-apps): Restore corner case and simplify
* lisp/xdg.el (xdg-mime-apps): Return nil if that's what the table
holds, like we did before commit f60fc1287d.
Consolidate the three (assoc type xdg-mime-table) and shrink the
scope of `files`.
2025-10-15 09:31:05 -04:00
Eshel Yaron
eeaa942147
; Refine a few 'elisp-*' faces for dark backgrounds
* lisp/progmodes/elisp-mode.el (elisp-major-mode-name)
(elisp-symbol-role, elisp-symbol-role-definition, elisp-rx):
Use a lighter foreground color when background color is dark
to improve legibility.
2025-10-15 12:24:59 +02:00
Michael Albinus
53fa2b7218 Add support for su-rs and sudo-rs programs
* doc/misc/tramp.texi (Inline methods): Add "surs" and "sudors" methods.

* etc/NEWS: Add optional "surs" and "sudors" Tramp methods.
Presentational fixes and improvements.

* lisp/net/tramp-cmds.el (tramp-file-name-with-method): Add "surs"
and "sudors" to :type.  Adapt :version.

* lisp/net/tramp-sh.el (tramp-enable-surs-method)
(tramp-enable-sudors-method): New defuns
(tramp-sh-handle-expand-file-name): Add "surs" and "sudors" in check.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.

* lisp/comint.el (comint-password-prompt-regexp):
* test/lisp/comint-tests.el (comint-testsuite-password-strings):
Add su-rs and sudo-rs password prompts.
2025-10-15 10:30:29 +02:00
Stefan Monnier
7845936cbb (font-lock-defaults): Clarify the use of SYNTAX-ALIST (bug#79586)
* doc/lispref/modes.texi (Font Lock Basics):
* lisp/font-core.el (font-lock-defaults): Document when
SYNTAX-ALIST is used and how it interacts with syntactic fontification.
2025-10-14 21:51:04 -04:00
Stefan Monnier
8c19b71660 (rx): Remove the rx--pcase-expand middle man
* lisp/emacs-lisp/rx.el (rx): Remove the `rx--pcase-expand` middle man,
now that `loaddefs-gen.el` expands the `pcase-defmacro` for us.
2025-10-14 11:58:08 -04:00
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