1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00
Commit graph

178406 commits

Author SHA1 Message Date
Elijah Gabe Pérez
d8bf84f7f4 lisp/progmodes/hideshow.el (hs--get-ellipsis): Simplify
Mostly using `truncate-string-ellipsis`.
2025-05-19 18:33:39 -04:00
Spencer Baugh
cd364a2119 Fix 'completion-ignore-case' with 'completion--file-name-table'
509cbe1c35 "Improve env var handling in read-file-name"
caused 'try-completion' and 'all-completion' operations with
'completion--file-name-table' to no longer update the case of
text which was already present in the input string.  That is,
completions would be returned ignoring case, but the completions
would have letter-casing which matched the input string rather
than matching the actual file names.
This was caused by unnecessarily replacing text in the returned
file name completions with text from the input string ORIG,
which in turn was caused by the desire to preserve text from
ORIG even after 'substitute-in-file-name' changed it.  Fix this
by detecting when ORIG was not substantially changed by
'substitute-in-file-name'; in that case, the returned file name
completions also don't need substantial changes.
* lisp/minibuffer.el (completion--file-name-table): Use text
from the completions, not the input string.  (Bug#78323)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Test with 'completion-ignore-case' as well.
2025-05-19 20:02:45 +03:00
Martin Rudalics
0de59ded25 Fix thinko in 'fit-frame-to-buffer-1' (Bug#78418)
* lisp/window.el (fit-frame-to-buffer-1): Don't add extra line
when character sizes evenly divide decorations sizes
(Bug#78418).
2025-05-19 09:14:15 +02:00
Michael Albinus
baa33c3806 ; Fix last change 2025-05-19 08:45:37 +02:00
Stefan Monnier
860a6c86c5 eww.el: Misc changes
* lisp/net/eww.el (eww--parse-html-region): Don't decode when it's a no-op.
(eww-display-raw): Simplify.
(eww-mode): Prefer #' to quote function names.
(eww-switch-to-buffer): Use `completion-table-with-metadata` instead of
`completion-extra-properties`.  Don't prompt the user when there's only
one choice.
(eww-buffer-list): Use `eww--buffer-p`.
2025-05-18 15:48:54 -04:00
Stefan Monnier
168b67b1ee eww.el: Use track-changes
* lisp/net/eww.el: Require `track-changes`.
(eww-display-document): Don't `inhibit-modification-hooks` any more.
Use `track-changes-register` *at the end* instead.
(eww-mode): Don't use `after-change-functions` any more.
(eww--track-changes): New function.
(eww--process-text-input): Rename from `eww-process-text-input`.
Try and be more careful: don't presume `point` is near
the modification.  Check for a form both at BEG and at END.
Don't rely on `:start/:end` pointing to the right places.
Use `:length` instead and shrink the field back to its original length
when possible.
(eww-size-text-inputs): Set `:length` rather than `:start/:end`.
2025-05-18 15:44:35 -04:00
Stefan Monnier
48c66f26c1 lisp/net/eww.el: Remove redundant :group arguments 2025-05-18 15:31:10 -04:00
Michael Albinus
c8294f3a0f Generate tree-sitter compatibility report on emba
* test/infra/Dockerfile.emba (emacs-tree-sitter): Generate
compatibility report.

* test/infra/gitlab-ci.yml (.job-template): Modify artifacts preparation.
(build-tree-sitter): Add artifact.
2025-05-18 20:39:59 +02:00
Sean Whitton
a4424fb8cd Factor out vc-git--with-apply-temp-to-staging
* lisp/vc/vc-git.el (vc-git--with-apply-temp-to-staging): New macro.
(vc-git-checkin): Use it.
2025-05-18 12:35:13 +01:00
Stephen Berman
913b4e1c97 Amend Electric Pair mode documentation
* doc/emacs/programs.texi (Matching): Restore to the documentation
of Electric Pair mode the description of the use of a prefix
argument, which was overwritten by merging changes from the
emacs-30 branch, and clarify the usage.
2025-05-18 09:39:02 +02:00
Eli Zaretskii
38789e9a28 Improve reporting of language-grammar library ABI version mismatch
* lisp/treesit.el (treesit-ready-p): More accurate wording of
message when grammar library fails to load.

* src/treesit.c (treesit_load_language): Improve message when
reporting library ABI version mismatch.  Suggested by Soham
Gumaste <sohamg2@gmail.com>.
2025-05-18 09:05:07 +03:00
Stefan Monnier
28a8bd6061 editorconfig.el: Fix bug#78097
When there is no `.editorconfig` variable, the
`file-name-directory` call can signal an error, but that can
happen only if `editorconfig-get-local-variables-functions`
added entries "out of thin air".  So just skip running that hook
to avoid this corner case.

* lisp/editorconfig.el (editorconfig--get-dir-local-variables):
Don't run `editorconfig-get-local-variables-functions` when we found no
EditorConfig settings.
2025-05-17 21:54:54 -04:00
Po Lu
b9b52f0092 Prevent double frees in closing fonts provided by the Haiku font driver
* src/haikufont.c (haikufont_close): Clear INFO->metrics,
glyphs, be_font after they are released and do not attempt to
access them if NULL.  (bug#77478)
2025-05-18 08:46:36 +08:00
Stefan Monnier
f77f464637 (eww-switch-to-buffer): Don't let-bind completion-extra-properties
* lisp/net/eww.el (eww--buffer-p): New function.
(eww-switch-to-buffer): Use it.  And set `completion-extra-properties`
buffer-locally rather than let-binding it.
2025-05-17 12:34:33 -04:00
Eli Zaretskii
e05f76667d Support 'dired-hide-details-mode' in find-lisp.el
* lisp/find-lisp.el (find-lisp-find-dired-insert-file): Call
'dired-insert-set-properties' to support 'dired-hide-details-mode'
in the resulting Dired display.  (Bug#78455)
2025-05-17 16:46:07 +03:00
Mattias Engdegård
2606e3dd99 * doc/lispref/searching.texi (Rx Notation): Fix example (bug#76731)
The example purporting to match C comments was wrong.
Reported by Yue Yi, whose proposed remedy is used here.
2025-05-17 14:20:51 +02:00
Mattias Engdegård
e888bd990d * src/lread.c (read0): Don't allow radix 0 or 1.
This was just a silly mistake introduced in Emacs 29.  Found by Pip Cet.
2025-05-17 14:20:51 +02:00
Eli Zaretskii
6571a2d70b ; Fix a recent change in hideshow.el
* lisp/progmodes/hideshow.el (hs--get-ellipsis): Don't assume
'standard-display-table' is defined.
2025-05-17 15:14:47 +03:00
Eli Zaretskii
bd57055a58 Merge from origin/emacs-30
299d3a4401 Fix saving abbrevs by 'abbrev-edit-save-buffer'
399d05332e ; Remove confusing text from ELisp manual
feecb1fbc6 ; * doc/emacs/cmdargs.texi (General Variables): More accu...
18e1aabbea ; Improve documentation of the -L command-line option
c80fbe3f23 typescript-ts-mode: align ternary-chain branches (bug#78187)
16bfbc6fe3 ; Tramp test fixes
f0ac271da3 ; Time Stamps doc: Clearer customize recipe
49c06df224 ; * doc/lispref/variables.texi (Default Value): Update.
cbea5997c0 ; * lisp/mh-e/mh-e.el: Commentary: link to The MH-E Manual
0bf956235e Improve Tramp test
eaf01d034c * lisp/autorevert.el (auto-revert-remote-files): Adapt do...
e32bb816ad ; Improve documentation of ls-lisp.el
2d5f243470 ; * lisp/emacs-lisp/comp.el (native-compile-prune-cache):...
bb73533165 Improve Electric Pair mode documentation (bug#78021)
2025-05-17 06:52:01 -04:00
Eli Zaretskii
299d3a4401 Fix saving abbrevs by 'abbrev-edit-save-buffer'
* lisp/abbrev.el (abbrev-edit-save-buffer): Reset
'abbrevs-changed'.  Suggested by Rick <rbielaws@gmail.com>.
(Bug#78435)
2025-05-17 13:00:13 +03:00
Eli Zaretskii
399d05332e ; Remove confusing text from ELisp manual
* doc/lispref/variables.texi (Defining Variables): Remove outdated
confusing warning.  For the details, see
https://lists.gnu.org/archive/html/emacs-devel/2025-05/msg00332.html.
2025-05-17 12:35:29 +03:00
Eli Zaretskii
214c0ba3c7 ; * lisp/progmodes/hideshow.el (hs--get-ellipsis): Doc fix (bug#78234). 2025-05-17 12:11:37 +03:00
Elías Gabriel Pérez
8b6e1d8435 Prettify and improve hideshow (bug#78234)
Buttonize the ellipsis and optionally display in the ellipsis
the total number of hidden lines.
* lisp/progmodes/hideshow.el (hs-display-lines-hidden): New
user option.
(hs-ellipsis): New face.
(hs-make-overlay): Tweak.
(hs--get-ellipsis): New function.
* doc/emacs/programs.texi (Hideshow): Update documentation.
* etc/NEWS: Announce changes.
2025-05-17 12:10:03 +03:00
Manuel Giraud
719b2fd580 Fix eww-switch-to-buffer' when resorting to eww'
* lisp/net/eww.el (eww-switch-to-buffer): Do not bind
`completion-extra-properties' before calling `eww'.
(bug#78372)
2025-05-17 12:05:30 +03:00
Richard Lawrence
c1153963b5 Fix DTSTART date when exporting `diary-float'
Instead of using current date as DTSTART and then excluding it
when it doesn't match the `diary-float' rule, just use the first
date which matches the rule in `icalendar-recurring-start-year'.
* lisp/calendar/icalendar.el (icalendar--convert-float-to-ical):
Compute the correct date.
* test/lisp/calendar/icalendar-tests.el: Add a test for the
reported test case.  (Bug#78085)
2025-05-17 12:00:59 +03:00
Eli Zaretskii
3b2b0424cf ; Fix last change
* lisp/pulse.el (pulse-faces, pulse-face-duration):
* etc/NEWS: Fix documentation of last change.  (Bug#77715)
2025-05-17 11:57:43 +03:00
Elías Gabriel Pérez
b25139a532 New pulse functions for pulse faces and new file for ring bell fns
These new pulse functions allow pulse any defined face briefly.
The new file contains functions intended to be used in
`ring-bell-function' as alternatives to `visible-bell'.
* lisp/pulse.el (pulse-face-duration): New user option.
(pulse-flash-face): New function.
* lisp/ring-bell-fns.el (flash-face-attributes)
(flash-face-faces): New user options.
(flash-face-bell-function, flash-echo-area-bell-function):
New functions.  (bug#77715)

* etc/NEWS: Announce changes
2025-05-17 11:49:19 +03:00
Eli Zaretskii
44c8087734 Allow nil as valid value for 'url-cookie-save-interval'
* lisp/url/url-cookie.el (url-cookie-save-interval): Fix doc
string and :type.  (Bug#78303)
2025-05-17 11:26:23 +03:00
Juri Linkov
7d7d821c49 * lisp/treesit.el (treesit-simple-imenu): Restore the previous behavior.
Use 'treesit-parser-list' again to not depend on the cursor's position
(bug#78456).
2025-05-16 19:03:41 +03:00
Eli Zaretskii
feecb1fbc6 ; * doc/emacs/cmdargs.texi (General Variables): More accurate wording. 2025-05-16 15:39:53 +03:00
Eli Zaretskii
18e1aabbea ; Improve documentation of the -L command-line option
* doc/emacs/cmdargs.texi (Action Arguments): Mention that '-L' is
in effect only after the init files are loaded.
2025-05-16 15:02:58 +03:00
Konstantin Kharlamov
c80fbe3f23
typescript-ts-mode: align ternary-chain branches (bug#78187)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--indent-rules): Make sure each new ternary
branch is aligned with the previous one.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts:
(Chained ternary expressions): New test.
2025-05-15 20:09:26 -07:00
Sean Whitton
9659f8aa34 ; * lisp/vc/vc.el: Restore alphebetization. 2025-05-15 21:16:07 +01:00
Eli Zaretskii
db198e0e59 ; Fix wording of recently-added documentation
* src/eval.c (Fset_buffer_local_toplevel_value)
(Fbuffer_local_toplevel_value):
* doc/lispref/variables.texi (Default Value): Fix wording of
documentation.
2025-05-15 16:29:27 +03:00
Michael Albinus
16bfbc6fe3 ; Tramp test fixes
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Simplify.
(tramp--test-putty-p): Fix docstring.
(tramp--test-scp-p): New defun.
(tramp-test42-utf8): Use it.
2025-05-15 15:15:22 +02:00
Dmitry Gutov
511e3d4e79 vc-git-checkin: Fix calling 'git apply --cached' remotely
* lisp/vc/vc-git.el (vc-git-checkin)
(vc-git--stash-staged-changes): Fix calling 'git apply --cached'
remotely (bug#78405).
2025-05-15 13:46:20 +01:00
Sean Whitton
f70bb4d767 default_toplevel_binding, local_toplevel_binding: Loop upwards
* src/eval.c (default_toplevel_binding, local_toplevel_binding):
Loop upwards, not downwards, given that we want the earliest
relevant binding present in the stack.
2025-05-15 13:40:04 +01:00
Sean Whitton
45627ca7cc New top-level buffer-local value functions
* src/eval.c (local_toplevel_binding)
(Fbuffer_local_toplevel_value, Fset_buffer_local_toplevel_value)
(syms_of_eval): New functions.
* doc/lispref/variables.texi (Default Value):
* lisp/subr.el (setq-local):
* etc/NEWS: Document them.
* test/lisp/emacs-lisp/lisp-tests.el
(core-elisp-tests-4-toplevel-values): New test.
* lisp/progmodes/xref.el (xref--show-xref-buffer)
(xref-show-definitions-buffer-at-bottom):
* lisp/vc/vc-dispatcher.el (vc-setup-buffer):
Use set-buffer-local-toplevel-value.
2025-05-15 13:40:04 +01:00
Manuel Giraud
825d64aa57 Scroll with mouse wheel in calendar (bug#78298)
* lisp/calendar/calendar.el (calendar-mode-map): Add scrolling
with mouse wheel.
* etc/NEWS: Announce the change.
2025-05-14 21:07:14 +03:00
Stefan Monnier
b644823443 cl-extra-tests.el: Follow convention
* test/lisp/emacs-lisp/cl-extra-tests.el (multiples-of)
(unsigned-byte): Stick to the tradition of accepting nil.
2025-05-14 12:28:25 -04:00
Juri Linkov
8bccccedb6 Use JSX comments on jsx treesit nodes in js-ts-mode and tsx-ts-mode
* lisp/progmodes/js.el (js--treesit-comment-jsx): New internal variable.
(js--treesit-comment-setup): New function.
(js-ts-mode): Set buffer-local 'comment-setup-function' to
'js--treesit-comment-setup'.

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Set buffer-local 'comment-setup-function' to 'js--treesit-comment-setup'.
2025-05-14 09:57:40 +03:00
Stefan Monnier
81cbff70f2 lisp/emacs-lisp/cl-preloaded.el (cl--define-derived-type): Fix corner case 2025-05-13 22:38:15 -04:00
David Ponce
b8f23179da lisp/emacs-lisp/cl-macs.el (cl--define-derived-type): Fix thinko 2025-05-13 22:32:55 -04:00
Stephen Gildea
f0ac271da3 ; Time Stamps doc: Clearer customize recipe
* doc/emacs/files.texi (Time Stamps): Reorder the customize sentence so
that the key words come in the order you would use them.
2025-05-13 16:01:48 -07:00
Eli Zaretskii
ebeeced9e3 Fix description of a remapped command's bindings
* lisp/help-fns.el (help-fns--key-bindings): Qualify the
description of any menu-bar bindings by remapping.  (Bug#78391)
2025-05-13 18:50:31 +03:00
Eli Zaretskii
b3e280faba Eglot: Fix parsing file:// URIs on MS-Windows
* lisp/progmodes/eglot.el (eglot-uri-to-path): Remove the leading
slash in MS-Windows file names only if they begin with a slash.
This adjusts the function to the recent fix for bug#76982 in
'url-generic-parse-url', which previously would produce file names
that begin with an extra slash.  (Bug#78392)
2025-05-13 14:45:04 +03:00
Sean Whitton
49c06df224 ; * doc/lispref/variables.texi (Default Value): Update.
Frame-local variables have been removed.
2025-05-13 12:07:42 +01:00
Alan Mackenzie
4b4276d64f CC Mode: Fix cc-fonts.el errors for XEmacs.
* lisp/progmodes/cc-fonts.el (c-font-lock-cpp-messages): Use
c-put-font-lock-face rather than c-put-font-lock-string-face
since we don't have the double quote marks here that the latter
function corrects for.
(c-complex-decl-matchers): Replace cl-delete-duplicates with
the macro c--delete-duplicates.
2025-05-13 10:13:34 +00:00
Sean Whitton
e17001b2e1 ; * src/buffer.c (Fgenerate_new_buffer_name): Fix typo. 2025-05-13 10:13:26 +01:00
Sean Whitton
a8309895ae ; * lisp/vc/diff-mode.el (diff-mode-shared-map): Document. 2025-05-13 10:09:26 +01:00