1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00
Commit graph

176663 commits

Author SHA1 Message Date
Gerd Möllmann
92aecdfd9f ; Fix files-tests
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Override symbol function of read-key instead of read-event.
2025-02-07 11:27:06 +01:00
Juri Linkov
f6e6585f57 * lisp/progmodes/sh-script.el (bash-ts-mode): Improve treesit settings.
Add 'list' and 'sentence' things to treesit-thing-settings,
and move mistakenly added 'sentence' to 'text' (bug#73404).
Set 'treesit-defun-name-function' and 'treesit-simple-imenu-settings'.
Reset 'outline-regexp'.
2025-02-07 09:47:41 +02:00
Po Lu
1751739152 Prevent crash when requesting storage permissions on Android
* java/org/gnu/emacs/EmacsService.java (requestStorageAccess30):
Handle ActivityNotFoundException.
2025-02-07 11:11:51 +08:00
Tassilo Horn
be316dc1c7 ; Use an uninterned symbol in the inhibit-auto-revert expansion. 2025-02-06 20:07:09 +01:00
Michael Albinus
811d575336 ; Rename internal variable in inhibit-auto-revert
* lisp/autorevert.el (inhibit-auto-revert): Call internal variable
`iar-buf' in order not to mismatch with variables outside the macro.
2025-02-06 16:56:07 +01:00
Gerd Möllmann
ea04dd8ca9 Use read-key in amp-y-or-n-p (bug#75886)
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use read-key
so that C-g in recognized when defined in input-decode-map.
2025-02-06 05:36:18 +01:00
Stefan Monnier
1f4a26df86 Merge remote-tracking branch 'origin/emacs-30' 2025-02-05 20:21:03 -05:00
Antero Mejr
d10acd16c9 Add scheme-mode indentation for SRFI 64, R7RS guard
* lisp/progmodes/scheme.el: Add properties for SRFI 64 and R7RS guard
identifiers.  (Bug#75999)
2025-02-06 02:02:45 +01:00
Stefan Monnier
4be087f1e1 (font-ccl-encoder-alist): Delete variable, unused
* src/ccl.c (syms_of_ccl): Remove `font-ccl-encoder-alist`.
* lisp/language/ethiopic.el (ccl-encode-ethio-font): Delete CCL program.
(font-ccl-encoder-alist): Don't modify it.
2025-02-05 19:43:45 -05:00
Eli Zaretskii
bfc8540da4 * lisp/dired-x.el (dired-omit-expunge): Escape '%' (bug#75877). 2025-02-05 15:48:49 +02:00
Mauro Aranda
85113fcda9 Prepare markers for insertions inside of a widget
Recreating child widgets without recreating the parent widget
may lead to situations where the parent widget doesn't cover its
children or buttons entirely anymore.  This bug manifests as a
faulty fontification of children or buttons, for example.
(Bug#69941)

* lisp/wid-edit.el (widget--prepare-markers-for-inside-insertion)
(widget--prepare-markers-for-outside-insertion): New functions.
(widget-default-create): Use them.

* test/lisp/wid-edit-tests.el (widget-test-insertion-at-parent-markers)
(widget-test-insertion-at-parent-markers-2): New tests.
2025-02-05 15:08:28 +02:00
Eli Zaretskii
a1f2f5995d Revert "Improve bidi_get_time runtime checking"
This reverts commit 782ec71053.
It makes the code less readable and less future-proof, so a
net loss.  (Bug#75964)
2025-02-05 14:44:01 +02:00
Michael Albinus
a476295620 * lisp/autorevert.el (defvar): Fix debug declaration. 2025-02-05 09:41:49 +01:00
Vincenzo Pupillo
4396f6414c
Correctly handled the local parser for jsdoc (bug#75456)
As a result of recent patches to treesitter, local parsers must
now be recognized by 'treesit-language-at-point' and have their
own indentation rules.

* lisp/progmodes/js.el
(js--treesit-indent-rules): New rule for jsdoc.
(js--treesit-language-at-point): New function.
(js-ts-mode): Use the new function.
2025-02-04 23:54:47 -08:00
Yuan Fu
12a3145b3b
Make treesit-node-at more readable
* lisp/treesit.el (treesit-node-at): Make the logic for finding
the parser (and the root node) more explicit and
straightforward.  Don't use treesit-buffer-root-node; instead,
find the parser and use treesit-parser-root-node directly.
2025-02-04 23:53:58 -08:00
Paul Eggert
4aab2f45b3 Remove no-longer-needed delete_frame UNINIT
* src/frame.c (delete_frame): Remove a local with UNINIT that is
no longer needed now that GCC bug#85563 is fixed, as we don’t
need to worry about porting --enable-gcc-warnings to older GCC.
This change reverts this part of my commit
“Port --enable-gcc-warnings to GCC 8”
8c3215e7a4
dated Sat Apr 28 16:49:24 2018 -0700.
2025-02-04 16:57:42 -08:00
kobarity
999d054dc1 Make it configurable to highlight Python 2 builtins
By default, Python 2-only builtins are not highlighted.

* lisp/progmodes/python.el (python-2-support): New defcustom.
(python-font-lock-builtin-types)
(python-font-lock-builtins-python3)
(python-font-lock-builtins-python2)
(python-font-lock-builtins)
(python-font-lock-special-attributes)
(python-font-lock-builtin-exceptions-python3)
(python-font-lock-builtin-exceptions-python2)
(python-font-lock-builtin-exceptions): New variables.
(python-font-lock-keywords-level-2)
(python-font-lock-keywords-maximum-decoration)
(python--treesit-builtin-types)
(python--treesit-builtins)
(python--treesit-special-attributes)
(python--treesit-exceptions): Use new variables.

Co-authored-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Co-authored-by: Stefan Kangas <stefankangas@gmail.com>
2025-02-04 23:28:00 +01:00
Stefan Kangas
7d85f678f3 Avoid overly short timeout in ispell-help
* lisp/textmodes/ispell.el (ispell-help): Avoid too short timeout by
using at least 0.5 seconds.
2025-02-04 23:28:00 +01:00
Paul Eggert
782ec71053 Improve bidi_get_time runtime checking
* src/bidi.c (bidi_get_type): Improve runtime checking, by also
aborting if the bidi_type_table entry is not a bidi_type_t value.
2025-02-04 13:04:35 -08:00
Jim Porter
6842415577 Improve calculation of indent prefixes when using text scaling
Previously, the display spec for the "average space" was wrong.  It used
a plain number for the width of the specified space, which means "N
times the normal character width for the buffer", but we want "N times
the normal character width for the *current face*" (bug#76008).

* lisp/visual-wrap.el (visual-wrap--content-prefix): Specify the width
of the "average space" in terms of the average width of the current
face.

* lisp/net/shr.el (shr-indent): As above, and call 'string-pixel-width'
without specifying the buffer, to match 'shr-string-pixel-width'.
2025-02-04 09:25:17 -08:00
João Távora
b685b21a33 Eglot: protect against nil jit-lock-context-unfontify-pos
* lisp/progmodes/eglot.el (eglot-shutdown, eglot--update-hints): Rework.

Github-reference: https://github.com/joaotavora/eglot/pull/1370
2025-02-04 14:59:51 +00:00
Gerd Möllmann
f9a1f449d9 Fix min-width display spec handling (bug#76014)
* src/xdisp.c (display_min_width): Take into account that the output may
already be longer than the specified min-width.
2025-02-04 15:43:42 +01:00
Gerd Möllmann
1e01ae335d Use read-key in read-multiple-choice (bug#75886)
* lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers): Use
read-key instead of read-event because read-event doesn't use
input-decode-map.
* test/lisp/emacs-lisp/rmc-tests.el: Use read-key instead of
read-event.
2025-02-04 15:38:02 +01:00
Eli Zaretskii
5c36b41265 * src/fileio.c (Fsubstitute_in_file_name): Doc fix (bug#76023). 2025-02-04 16:06:36 +02:00
Eli Zaretskii
4212b2630f ; * test/src/editfns-tests.el (editfns-tests-styled-print): Fix last change. 2025-02-04 16:01:47 +02:00
Michael Albinus
2dbcabec78 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-02-04 14:33:51 +01:00
Michael Albinus
2b1c25e62b Fix some checks in autorevert.el
* lisp/autorevert.el (auto-revert-handler): Rework checks.
(auto-revert-handler): Don't run `vc-refresh-state' in
`auto-revert-tail-mode'.
2025-02-04 14:32:46 +01:00
Andrew G Cohen
2eb6171ec9 Don't use obsolete In-Reply-To format in messages (Bug#64454)
When creating a new message, message-send-mail uses an obsolete format
for the In-Reply-To header that includes additional information about
the originating message.  This patch changes the default to use the
rfc5322 approved format, but allow the obsolete format through a
defcustom.

* lisp/gnus/message.el (message-make-in-reply-to): Return only the
message-id of the originating message (the default) unless the new
custom variable message-header-use-obsolete-in-reply-to is non-nil.
* doc/misc/message.texi: Document the new custom variable
message-header-use-obsolete-in-reply-to.
* etc/NEWS: Update NEWS.
2025-02-04 21:13:59 +08:00
Michael Albinus
9597881592 Add inhibit-auto-revert macro
* doc/lispref/backups.texi (Reverting):
Add inhibit-auto-revert-buffers and inhibit-auto-revert.

* etc/NEWS: Add inhibit-auto-revert-buffers and inhibit-auto-revert.
Fix typos.

* lisp/autorevert.el (inhibit-auto-revert-buffers): New variable.
(inhibit-auto-revert): New macro.
(auto-revert-active-p, auto-revert-handler):
Check `inhibit-auto-revert-buffers'.

* lisp/dired.el (dired--inhibit-auto-revert): Remove.
(dired-buffer-stale-p): Don't set it.
(dired-map-over-marks, dired-internal-do-deletions):
Use `inhibit-auto-revert.

* test/lisp/autorevert-tests.el
(auto-revert-test08-auto-revert-inhibit-auto-revert)
(auto-revert-test08-auto-revert-inhibit-auto-revert-remote): New tests.
2025-02-04 14:09:52 +01:00
Eli Zaretskii
40e38a681d ; * test/src/editfns-tests.el (editfns-tests-styled-print): New test. 2025-02-04 14:18:38 +02:00
João Távora
164da071e0 Eglot: avoid 'null' as params to 'shutdown' request (bug#66144)
Doing so confuses some servers.  It used to be needed for the
gopls server, but according to
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66144#32
that has been fixed.

Thanks to Javier Olaechea <pirata@gmail.com>

* lisp/progmodes/eglot.el (eglot-shutdown): Use eglot--{}.
2025-02-04 12:06:04 +00:00
Stefan Kangas
73a45ce720 ; Update link to picons database
* lisp/gnus/gnus-art.el (gnus-picon-databases): Fix broken link.
2025-02-03 23:53:19 +01:00
Manuel Giraud
c4a67a4050 Fix OpenBSD compilation (bug#76009)
* configure.ac: Remove a bogus LD_SWITCH_SYSTEM for OpenBSD.
2025-02-03 23:21:50 +01:00
Stefan Monnier
f3ac16b3cc (save-place-abbreviate-file-names): Don't eagerly load alist (bug#75730)
Change the way we handle `save-place-abbreviate-file-names` such that
this preference is applied lazily when we load the alist, rather than
eagerly when we define it (which forced the alist to be loaded before we
needed it).

* lisp/saveplace.el (save-place-load-alist-from-file): Use `unless`,
`when`, and `with-temp-buffer` to hopefully help readability.
Call `save-place--normalize-alist`.
(save-place--normalize-alist): New function extracted from the setter
of `save-place-abbreviate-file-names`.
(save-place-abbreviate-file-names): Use it.
(save-place-alist-to-file): Use `with-temp-buffer`.
2025-02-03 16:34:35 -05:00
Pip Cet
14ebe4d5db Fix GC-related crashes in styled_format (bug#75754)
This approach ensures we don't use an SSDATA pointer after GC, and
that no Lisp callback code can modify the format string while we're
working on it.

* src/editfns.c (styled_format): Operate on a copy of the format
string rather than the original.  Ensure final NUL byte is copied.
2025-02-03 20:52:57 +00:00
Stefan Monnier
1c3a8bc9b5 * lisp/emacs-lisp/track-changes.el (track-changes-fetch): Fix bug#75906 2025-02-03 15:50:36 -05:00
Daniel Mendler
b5316e1ddb read-face-name: Build common completion table for CR and CRM
* lisp/faces.el (read-face-name): Build a common completion
table for both `completing-read' and `completing-read-multiple'
with completion metadata (bug#74865).
2025-02-03 20:32:44 +02:00
Eli Zaretskii
a22e971a11 Fix -nw sessions on MS-Windows
* src/w32console.c (w32con_clear_end_of_line): Set the space
glyphs' frame to NULL.
(w32con_write_glyphs): Handle face_id_frame == NULL, when called
from 'w32con_clear_end_of_line'.
(tty_draw_row_with_mouse_face): Adjust to changes in term.c.
2025-02-03 18:36:11 +02:00
Stefan Kangas
a3b3083081 ; Don't use HTTPS in HTTP-specific example
* doc/misc/org.org (External Links): Change HTTP example to use HTTP.
Changing it to HTTPS has been done before, but it's a mistake.  To avoid
making this mistake again, change the URL to orgmode.org to make it more
similar to the example on the next line, thereby contrasting the two.
2025-02-03 14:03:43 +01:00
Ulrich Müller
1639ad2814 Avoid ln(10) expression in calc units definition
* lisp/calc/calc-ext.el (calc-init-extensions): Autoload calc-math
for math-ln-10.
* lisp/calc/calc-units.el (math-standard-units): Use new ln10
constant instead of ln(10) in the decibel definition.
(math-find-base-units-rec): Allow ln10 in expression.
(math-to-standard-rec): Recognize the ln10 constant.  (Bug#75861)
2025-02-03 14:01:11 +01:00
Michael Albinus
fbc13ba9cc Better NaN handling in proced-tests.el
* test/lisp/proced-tests.el (proced--cpu-at-point): Make it more robust.
(proced--assert-process-valid-cpu-refinement):
Handle `ert-test-skipped' signal.
2025-02-03 12:51:48 +01:00
Robert Pluim
a7f34a532c Fix padding when using which-key-setup-side-window-right
* lisp/which-key.el (which-key--pad-column): Insert zero padding
spaces when the description string is longer than the column
width.  (Bug#75765)
2025-02-03 09:41:01 +01:00
Gerd Möllmann
a8e8524379 Handle mouse highlighting in the presence of tty child frames
* src/term.c (tty_draw_row_with_mouse_face): Draw only parts
of the highlighted text that are not covered by other frames.
2025-02-03 06:13:16 +01:00
Stephen Gildea
7f10d2680b ; time-stamp: documentation, tests, NEWS
* lisp/time-stamp.el (time-stamp-pattern, time-stamp-count): Document
how to update different time stamps on multiple lines.
* doc/emacs/files.texi (Time stamps): Add an example showing a time
stamp at the end of a file.
* etc/NEWS: Announce time-stamp format additions.
* test/lisp/time-stamp-tests.el: More title-case tests.
2025-02-02 20:15:19 -08:00
F. Jason Park
a62a262397 Run erc-services-regain-mode callback on a timer
* lisp/erc/erc-services.el (erc-services-regain-timeout-seconds): New
variable.
(erc-services-regain-mode): Mention CertFP in doc string.
(erc--nickname-in-use-make-request): Ensure the 900 RPL_LOGGEDIN
callback always runs after `erc-services-regain-timeout-seconds', even
when SASL isn't being used.
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--regain-command/oftc): New test.
* test/lisp/erc/resources/services/regain/taken-regain-oftc.eld: New
file.
2025-02-02 14:35:19 -08:00
F. Jason Park
fb53de0c06 ; Remove obsolete :options value from erc-mode-hook
* lisp/erc/erc.el (erc-mode-hook): Remove `erc-add-scroll-to-bottom'
from :options list because the function has been deprecated.
2025-02-02 14:32:11 -08:00
Eli Zaretskii
669bb2eaf5 Announce XINERAM and XRANDR in 'system-configuration-features'
* configure.ac (emacs_config_features): Add XINERAMA and XRANDR.
(Bug#75936)
2025-02-02 16:06:04 +02:00
Eli Zaretskii
6d7e7899d8 Improve documentation of 'display-monitor-attributes-
* doc/lispref/frames.texi (Multiple Terminals):
* lisp/frame.el (display-monitor-attributes-list): Better
documentation of what the 'source' key means on X.  (Bug#75936)
2025-02-02 15:58:18 +02:00
Paul Eggert
6b40dbda6a Improve format-seconds on negative args
* lisp/calendar/time-date.el (format-seconds):
Work better with negative seconds (Bug#75849).
* test/lisp/calendar/time-date-tests.el (test-format-seconds): Test it.
2025-02-01 22:55:30 -08:00
Paul Eggert
7ac05c33b1 Improve malloc Lisp alignment commentary
Prompted by a private email from Pip Cet.
2025-02-01 22:55:30 -08:00