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

178342 commits

Author SHA1 Message Date
Jens Schmidt
d11570d80e Require key and cert when searching for client cert
* lisp/net/network-stream.el (network-stream-certificate):
Require :key and :cert when searching auth sources for a client
certificate.  (Bug#78189)
2025-05-12 16:52:06 +02:00
Michael Albinus
b91efd401d Improve handling of tests in *-tests subdirs
* test/Makefile.in (subdir_template): Add rules for *-tests subdirs.

* test/infra/Makefile.in: Remove special handling of eieio, faceup
and so-long.  Add recipes for *-tests subdirs.  Filter out rules
for *-tests subdirs.

* test/infra/test-jobs.yml: Regenerate.
2025-05-12 16:39:15 +02:00
Eli Zaretskii
8b67e566b9 Fix filelock-tests on MS-Windows
* test/src/filelock-tests.el (filelock-tests-file-locked-p-spoiled)
(filelock-tests-unlock-spoiled)
(filelock-tests-kill-buffer-spoiled): Don't special-case
MS-Windows, as it was evidently fixed to signal the same error as
Posix systems.
2025-05-12 15:08:20 +03:00
Sean Whitton
4ddafede8d diff-mode-shared-map: Don't inherit from special-mode-map
* lisp/vc/diff-mode.el (diff-mode-shared-map): No longer inherit
from special-mode-map.
(diff-mode-map): Tidy up list of unbindings now that we no
longer need to override any bindings from special-mode-map.
(minor-mode-map-alist): <diff-mode-read-only>: Ensure that the
minor mode keymap continues to inherit from special-mode-map by
calling make-composed-keymap here.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
2025-05-12 10:11:18 +01:00
Eli Zaretskii
882c849034 Avoid unnecessary calls to GetFileAttributes on MS-Windows
* src/w32.c (access_attrs): New function, refactored from
'faccessat'.
(faccessat): Call 'access_attrs' early to determine whether the
file doesn't exist, and if so, avoid calling 'chase_symlinks'.
Also avoid calling 'chase_symlinks' if it is known that the file
cannot be a symlink, given its attributes.  (Bug#78341)
2025-05-11 19:27:13 +03:00
Eli Zaretskii
7d84ffc2de Add test for file time-stamp granularity on MS-Windows
* test/src/fileio-tests.el
(fileio-tests-w32-time-stamp-granularity): New test.
2025-05-11 15:47:17 +03:00
Eli Zaretskii
3975094f1d Support sub-second file time-stamps on MS-Windows
* nt/inc/sys/stat.h (struct stat): New members for nsec part of
file times.

* lib-src/ntlib.c (convert_time):
* src/w32.c (convert_time): Accept an additional argument
TIME_NSEC and set it to the sub-second part of time.  All callers
changed.
2025-05-11 13:33:24 +03:00
João Távora
9df2074a06 Tweak .clangd to work with gcc-compiled Emacs (bug#78367)
A Gcc configuration of Emacs emits -fstrict-flex-arrays but
clangd doesn't understand that.  This causes spurious errors of
"unknown flag" that prevent analysis.  So tweak .clangd to the
nearest clang equivalent (which is very similar).

* .clangd (CompileFlags): Remove -fstrict-flex-arrays, add
-fstrict-flex-arrays=3.
2025-05-11 11:14:32 +01:00
João Távora
c69c18b732 Eglot: fix call hierarchy navigation again (bug#78367, bug#78250)
* lisp/progmodes/eglot.el (eglot--hierarchy-label): Fix again.
2025-05-11 11:14:18 +01:00
Sean Whitton
5b73625714 diff-mode-map: Unhide some additional M-<foo>
* lisp/vc/diff-mode.el (diff-mode-map): Don't inherit M-?,
M-SPC, M-DEL and M-S-SPC bindings through from special-mode-map.
2025-05-11 11:12:53 +01:00
Stefan Monnier
dfafe1830f lisp/emacs-lisp/cl-macs.el (cl--define-derived-type): Fix partial bootstrap 2025-05-11 01:30:01 -04:00
Stefan Monnier
66990628b8 lisp/net/browse-url.el (browse-url-interactive-arg): Fix bug#78026
Don't burp when run from a timer where (this-command-keys) will
usually return an empty vector.
2025-05-10 12:05:17 -04:00
Eli Zaretskii
1410bfb7ca Merge from origin/emacs-30
0d493864ce Fix indentation of XML comments
1a2c29b531 Improve Tramp's make-process handling for Solaris
a7dffc2ea3 Document 'time-stamp-time-zone' in Emacs Manual
0b4eb525b6 Make treesit--simple-indent-eval more permissive (bug#78065)
ed7b55f6bf Adapt Tramp tests
b172a1478c ; * doc/lispref/tips.texi (Library Headers): Fix wording ...
81629b2b2b ; * lisp/gnus/mail-source.el (mail-sources): Fix a typo (...
2025-05-10 07:40:30 -04:00
Jostein Kjønigsen
7265be09ce sh-script.el: Improve consistency in variable-use fontification.
sh-mode--treesit-settings: Ensure all variable use is treated the
same way.
Before this patch the following commands would all be treated differently:

    echo "${var}"
    echo "$var"
    echo ${var}
    echo $var

Now they are treated the same.
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings): Tweak
rules.  (Bug#78167)
2025-05-10 13:21:32 +03:00
Eli Zaretskii
0d493864ce Fix indentation of XML comments
* lisp/nxml/nxml-mode.el (nxml-compute-indent-in-delimited-token):
Fix indentation in XML comments with empty lines.  Patch by John
Ciolfi <ciolfi@mathworks.com>.  (Bug#73206)
2025-05-10 13:11:22 +03:00
Manuel Giraud
013ed9799e Fall back eww-switch-to-buffer' to eww'
* lisp/net/eww.el (eww-switch-to-buffer): When no EWW buffers
exist, call `eww' instead.
(eww-list-buffers): Do not pop to *eww buffers* when there is no
EWW buffers.  (Bug#77967)
2025-05-10 12:46:28 +03:00
Michael Albinus
1a2c29b531 Improve Tramp's make-process handling for Solaris
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Disable buffering also for remote Solaris hosts.
Reported by Stacey Marshall <stacey.marshall@gmail.com>.
2025-05-10 10:05:51 +02:00
Sean Whitton
63f73de839 ; * doc/emacs/vc1-xtra.texi (General VC Options): Fix markup. 2025-05-09 16:38:16 +01:00
Vincent Belaïche
2102554a48 ix bugs when a SES buffer has named cells, and another don't.
* lisp/ses.el (ses-list-named-cells): Give a message when the list is empty.
(ses--unbind-cell-name): Do not throw error in a SES buffer w/o
any named cell for gethash from 'ses--named-cell-hashmap' being
'nil'.
2025-05-09 14:30:50 +02:00
Eli Zaretskii
b87608c9c7 ; Fix VC tests
* test/lisp/vc/vc-tests/vc-tests.el (vc-test-hg06-version-diff):
Skip on MS-Windows in batch mode.

* test/lisp/vc/vc-git-tests.el (vc-git-test--start-branch): More
portable command for showing the current branch ("--show-current"
is only available since Git 2.22).
2025-05-09 14:43:03 +03:00
Sean Whitton
295c38b03d Create new test/lisp/vc/vc-tests/ for vc.el tests
* test/lisp/vc/vc-tests.el: Move ...
* test/lisp/vc/vc-tests/vc-tests.el: ... to here.
* test/lisp/vc/vc-misc-tests.el: Move ...
* test/lisp/vc/vc-tests/vc-test-misc.el: ... to here.
2025-05-09 11:00:47 +01:00
Sean Whitton
8e02537d0b New vc-async-checkin user option
* lisp/vc/vc.el (vc-async-checkin): New option.
(vc-checkin): Don't use with-vc-properties on or display
messages around asynchronous checkins.
* lisp/vc/vc-git.el (vc-git-checkin):
* lisp/vc/vc-hg.el (vc-hg-checkin, vc-hg-checkin-patch): Perform
an async checkin operation when vc-async-checkin is non-nil.
* doc/emacs/vc1-xtra.texi (General VC Options):
* etc/NEWS: Document the new option.

* lisp/vc/vc-dispatcher.el (vc-wait-for-process-before-save):
New function.
(vc-set-async-update): If the current buffer visits a file, call
vc-refresh-state.
* lisp/vc/vc-hg.el (vc-wait-for-process-before-save): Autoload.
(vc-hg--async-command, vc-hg--async-buffer, vc-hg--command-1):
New utilities, partially factored out of vc-hg-command.
(vc-hg-merge-branch): Use vc-hg--async-command, thereby newly
respecting vc-hg-global-switches.
2025-05-09 10:52:06 +01:00
Sean Whitton
3739b86f5a vc-exec-after: New PROC argument
* lisp/vc/vc-dispatcher.el (vc-exec-after): New PROC argument.
* lisp/vc/vc-hg.el (vc-exec-after): Update declaration.
2025-05-09 10:52:06 +01:00
Martin Rudalics
0041873502 Fix infinite looping in 'next-frame' and associates (Bug#77985)
* src/frame.c (next_frame): Rewrite to avoid infinite looping if
FRAME itself does not qualify as candidate frame (Bug#77985).
(Fnext_frame, Fprevious_frame): Adjust do-strings.
* lisp/frame.el (other-frame): Adjust doc-string.
(frame-list-1): New function.
(make-frame-names-alist): Rewrite using 'frame-list-1' instead
of 'next-frame' (Bug#77985).
(delete-other-frames): Rewrite using 'frame-list' instead of
'next-frame'.
* doc/lispref/frames.texi (Finding All Frames): Minor
clarifications for 'frame-list' and 'next-frame'.
2025-05-09 09:36:00 +02:00
Paul Eggert
e929d6df77 Update from Gnulib by running admin/merge-gnulib 2025-05-08 18:54:40 -07:00
João Távora
7617c7a6e4 Eglot: fix navigation in eglot-hierarchy-mode (bug#78250)
* lisp/progmodes/eglot.el (eglot--hierarchy-label):  Take PARENT-URI. Rework.
(eglot--hierarchy-2): Rework.
2025-05-08 23:13:28 +01:00
João Távora
64eb60bd91 Flymake: tweak 'fancy' eol diagnostic display
When calculating the face for boxdraw chars, protect against
diagnostics with an empty first line.  Also don't inherit from
:default, which seems to mess up the background color when using
hl-line-mode.

* lisp/progmodes/flymake.el (flymake--eol-draw-fancy): Tweak
2025-05-08 23:13:28 +01:00
Stephen Gildea
a7dffc2ea3 Document 'time-stamp-time-zone' in Emacs Manual
* doc/emacs/files.texi (Time Stamp Customization): Document
time-stamp-time-zone.
2025-05-08 14:48:22 -07:00
Stefan Monnier
ceba490da9 cl-types: Improve error messages
* lisp/emacs-lisp/cl-extra.el (cl--derived-type-generalizers):
Check that the type is valid and fully defined.

* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers) <derived-type>:
Don't delegate to another method just because the type is invalid.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type):
Minor simplification, and improvement to an error message.
2025-05-08 17:11:05 -04:00
Stefan Monnier
c522428b33 lisp/bs.el (bs--goto-current-buffer): Fix thinko in last commit 2025-05-08 10:51:16 -04:00
Manuel Giraud
0469f41ac2 Recenter for the calendar (bug#78205)
* lisp/calendar/cal-move.el (calendar-recenter-last-op): New
variable to track last recenter operation.
(calendar-recenter): New command to recenter the calendar.
* lisp/calendar/calendar.el (calendar-mode-map): Keybinding for
this command.
* doc/emacs/calendar.texi (Scroll Calendar): Document this
command.
* etc/NEWS: Announce this command.
2025-05-08 12:45:09 +03:00
Paul Eggert
c9c6abfa81 Update from Gnulib by running admin/merge-gnulib
The following changes were made by hand,
so that admin/merge-gnulib could succeed
instead of failing because the diff didn’t match.
* admin/gnulib-patches/lib/getloadavg.c.diff:
Remove, as it is no longer needed now that recent
Gnulib has been merged.
* admin/merge-gnulib (GNULIB_TOOL_FLAGS):
Remove the --local-dir="$src"admin/gnulib-patches option,
as it is no longer needed either.
2025-05-08 00:16:46 -07:00
Stefan Monnier
322ed637b4 cl-lib.el (cl-generic-generalizers): Fix partial bootstrap
* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers): Tweak the
bootstrap hack to avoid a problem when dumping `bootstrap-emacs` when
`cl-lib.el` has already been compiled.

* lisp/emacs-lisp/cl-macs.el (list): Move out of `static-if` test.
2025-05-07 23:34:48 -04:00
Stefan Monnier
777da8c3f9 (cl-deftype): Precompute the predicate function
Always define a `cl-deftype-satisfies` predicate (if possible), so
we only need `cl-typep` to "interpret" a type specifier when we use
a compound type but never for the atomic types (e.g. never
in `cl-types-of`).

* lisp/emacs-lisp/cl-macs.el (cl-typep): Test `cl-deftype-satisfies` first.
Don't handle `real` here any more.
(base-char, character, command, keyword, natnum, real): Define with
`c-deftype`.
(cl-deftype): Precompute the predicate for the atomic derived type,
if applicable.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type):
Add argument for the precomputed predicate function.

* lisp/emacs-lisp/cl-extra.el (cl-types-of): Use `cl-deftype-satisfies`
instead of `cl-type-p`.
2025-05-07 23:18:09 -04:00
Yuan Fu
a918f9e640
; * src/pdumper.c (dump_buffer): Update hash. 2025-05-07 20:14:21 -07:00
Jeremy Bryant
0d96565d5d ; RefTeX: Update author email
Update Carsten's email across related reftex* files:
lisp/textmodes/reftex.el
lisp/textmodes/reftex-auc.el
lisp/textmodes/reftex-cite.el
lisp/textmodes/reftex-dcr.el
lisp/textmodes/reftex-global.el
lisp/textmodes/reftex-index.el
lisp/textmodes/reftex-parse.el
lisp/textmodes/reftex-ref.el
lisp/textmodes/reftex-sel.el
lisp/textmodes/reftex-toc.el
lisp/textmodes/reftex-vars.el
lisp/textmodes/reftex.el
(AUCTeX bug#77850)
2025-05-07 22:08:46 +02:00
James Cherti
4e1fe56e31 Mark !%:.^~, as punctuation rather than symbol constituents
In Bash, the characters !%:.^~, are not valid in variable names. In sh,
they are not permitted in either function or variable names. Treating
them as punctuation is convenient, as they are rarely used in function
names and never in variable names. Even among commands, their usage is
uncommon. The only character among these that is commonly seen in
command names is '.', although it is rarely used in function names.

Marking these characters as punctuation, rather than symbol
constituents, enhances the accuracy of symbol detection.

* lisp/progmodes/sh-script.el: Mark !%:.^~, as punctuation in the
  sh-mode-syntax-table syntax table.

Copyright-paperwork-exempt: yes
2025-05-07 15:04:07 -04:00
Stefan Monnier
1590a2b3d5 Merge branch 'cl-types' 2025-05-07 14:56:49 -04:00
Eli Zaretskii
74e7e0f08a Improve support of UTF-8 encoded file names in ZIP archives
* lisp/arc-mode.el (archive-zip-summarize): Support the 0x7075
UPath Unicode Path Extra Field extension of ZIP format.
(Bug#78290)
2025-05-07 21:43:59 +03:00
Stephen Gildea
3089d822ff ; MH-E: Remove unused defvar
* lisp/mh-e/mh-e.el (mh-delay-invisible-header-generation-flag):
Variable is no longer used; remove its declaration.
2025-05-07 11:18:21 -07:00
Stefan Monnier
839d29b81f lisp/register.el (register-read-with-preview-traditional): Use PRED 2025-05-07 13:56:20 -04:00
Stefan Monnier
9f50fdf1e7 (cl-deftype): Don't set cl-deftype-handler directly
In order to make it easier to change that in the future, let
`cl--define-derived-type` take care of storing the derived
type's function into `cl-deftype-handler`.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type):
Change calling convention.  Set `cl-deftype-handler`.
* lisp/emacs-lisp/cl-macs.el (cl-deftype): Don't set `cl-deftype-handler`,
instead pass the function to `cl--define-derived-type`.
2025-05-07 13:54:47 -04:00
Stefan Monnier
d7459da58d lisp/emacs-lisp/cl-types.el: Delete file 2025-05-07 13:24:58 -04:00
Stefan Monnier
b13044dae3 cl-types: The big renaming to "derived types"
`cl-defstruct` also defines a type and is also in CL, so
"cl-type" is not precise enough to talk about those types
defined with `cl-deftype`.  Use the term "derived type" to be
more clear, as is done in the HyperSpec.

* doc/misc/cl.texi (Derived types): Move `cl-deftype` to this
new subsection.  Document the use of derived types as method specializers.

* lisp/emacs-lisp/cl-extra.el (cl--types-of-memo): Rename from
`cl--type-unique`.
(cl--derived-type-dispatch-list): Rename from `cl--type-dispatch-list`.
(cl--derived-type-generalizer): Rename from `cl--type-generalizer`.
(cl--derived-type-generalizers): Rename from `cl--type-generalizers`.

* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers) <derived-types>:
Rename from <cl-types-of>.  Catch but don't hide errors when a derived
type cannot be used as an atomic type specifier.

* lisp/emacs-lisp/cl-preloaded.el (cl--derived-type-list): Rename from
`cl--type-list`.
(cl-derived-type-class): Rename from `cl-type-class`.
(cl--derived-type-class-make): Rename from `cl--type-class-make`.
(cl--define-derived-type): Rename from `cl--type-deftype`.
2025-05-07 13:24:07 -04:00
David Ponce
f6f35644b7 (cl-types-of): Fix two plain bugs
* lisp/emacs-lisp/cl-extra.el (cl-types-of): Fix error handling.
Don't mutate `found` since it's stored as key in the hash-table.
2025-05-07 12:24:00 -04:00
Juri Linkov
5fee8a0433 ; * etc/NEWS: Add 'comment-setup-function'. 2025-05-07 09:45:36 +03:00
Juri Linkov
47b075e24b Update the default value of 'diff-outline-regexp'.
* lisp/vc/diff-mode.el (diff-outline-regexp): Change the default value
to match the diff command name in recursive diff.  Move after
'diff-hunk-header-re' variable definition used in the new value.
(diff-setup-buffer-type): Change setq of 'diff-outline-regexp'
to buffer-local (bug#78269).
2025-05-07 09:31:01 +03:00
Juri Linkov
ddc7bd547a Don't ignore errors in diff-syntax-fontify-hunk.
* lisp/nxml/nxml-mode.el (nxml-extend-region):
Protect against error "Invalid search bound (wrong side of point)".

* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk):
Use 'with-demoted-errors' instead of 'ignore-errors'.
2025-05-07 09:20:18 +03:00
Yuan Fu
0b4eb525b6
Make treesit--simple-indent-eval more permissive (bug#78065)
* lisp/treesit.el (treesit--simple-indent-eval): Allow EXP to be
anything, so higher-order indent presets can take anything as an
argument: t, nil, symbols, keywords, etc.
2025-05-06 21:30:25 -07:00
Stefan Monnier
2eb90d43e6 (cl-generic-generalizers): Fix typo in last change 2025-05-06 23:04:46 -04:00