1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-06 07:31:13 -08:00
Commit graph

176641 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Eli Zaretskii
354b2907fc Fix mouse pointer inside mouse-face on text with 'pointer' property
* src/dispnew.c (gui_update_window_end): Don't consider mouse face
overwritten.
* src/xdisp.c (show_mouse_face): Accept an additional argument;
redefine the mouse cursor only if that argument is 'true'.  All
callers changed.  (Bug#75931)
2025-02-02 08:23:02 +02:00
Gerd Möllmann
42f1318e65 Fix hiding tty cursor for overlapping children
* src/dispnew.c (is_cursor_obscured): If selected frame is in the
z-order of the root frame, use that, otherwise use the root frame.
2025-02-02 05:44:39 +01:00
Paul Eggert
c91c591f0f Omit 2 ‘volatile’s in internal_lisp_condition_case
* src/eval.c (internal_lisp_condition_case): Omit an unnecessary
‘volatile’ and an unnecessary pointer-to-volatile local var.
Perhaps these were needed in previous versions of Emacs, or to
pacify older versions of GCC when using --enable-gcc-warnings,
but they are not needed to pacify current GCC.
2025-02-01 14:17:54 -08:00
Eli Zaretskii
3ae7c9069f ; Fix last change. 2025-02-01 22:08:38 +02:00
shipmints
c7889d0545 Add missing custom :set to 'savehist-autosave-interval'
* lisp/savehist.el (savehist-autosave-interval): Correctly
reset 'savehist-timer' when 'savehist-autosave-interval' changes
via setopt or a Customize command.  (Bug#75834)
2025-02-01 22:08:03 +02:00
shipmints
1292b64216 Add auto save timer to save-place (bug#75837)
* lisp/saveplace.el (save-place-autosave-interval):
New user option 'save-place-autosave-interval' which defaults to nil,
and has a custom :set to manage the timer.  Add
'save-place--manage-timer' to enable or cancel the timer if the mode is
enabled and 'save-place-autosave-interval' is non-nil.  Amend
'save-place-mode' to invoke save-place--manage-timer.  Add
'save-place--cancel-timer'.  Add 'save-place--autosave'.
2025-02-01 22:01:37 +02:00
Michael Albinus
c5731a74c7 Minor Tramp changes
* doc/misc/tramp.texi (External methods): Precise remark on rsync speed.

* lisp/net/tramp-cache.el (tramp-connection-properties): Add link
to the Tramp manual in the docstring.
2025-02-01 18:52:13 +01:00
Jonas Bernoulli
3a86774ce5
Update to Transient v0.8.4-7-gabee7353 2025-02-01 18:14:47 +01:00
Pip Cet
5a5706f943 ; src/pdumper.c (dump_hash_table): Bump CHECK_STRUCTS hash. 2025-02-01 17:08:27 +00:00
Pip Cet
4eabfd68c9 Use #$ for lambda fixups in native compilation data vectors
The "#$" syntax is recognized by Fread, which substitutes
Vload_file_name in its place.  If Vload_file_name is bound
appropriately, no other value can produce an object EQ to the one
produced by "#$".

We use this to check the data vector for entries that we know should
have been initialized: if the value is still equal to what we bound
Vload_file_name to when it was read, it wasn't initialized, and we
abort.

* lisp/emacs-lisp/comp.el (comp--#$): New defvar.
(comp--finalize-container): Use it.
* src/comp.c (ABI_VERSION): Bump.
(emit_static_object): Ensure 'comp--#$' prints as "#$".
(load_static_obj): Ensure '#$' reads as Vcomp__hashdollar.
(check_comp_unit_relocs): Adjust assertion.
(syms_of_comp): Define 'comp--#$'.
* src/pdumper.c (dump_do_dump_relocation): Adjust assertion.
2025-02-01 17:02:50 +00:00
Eli Zaretskii
20e3959dc3 ; * lisp/progmodes/etags.el (tags-verify-table): Improve comment (bug#75946). 2025-02-01 15:44:47 +02:00
Konstantin Kharlamov
eb12b6d153 Avoid infinite questions if TAGS file was removed
When the visited TAGS file was removed, commands that depend on
TAGS, such as auto-completion, may invoke an interactive question
whether a user wants to re-read the file.  From that point on,
the question will be asked over and over, because the file no
longer exists, which results in mtime mismatch and inability to
"fix the mismatch" by reading from the file.  Fix that by simply
ignoring the mismatch if the file no longer exists.
* lisp/progmodes/etags.el (tags-verify-table): Avoid infinite
questions if TAGS file was removed.  (Bug#75946)
2025-02-01 15:41:51 +02:00
Po Lu
532ff6e29d Fix compilation warnings on Android
* src/alloc.c (pointer_align): Only define if
!USE_ALIGNED_ALLOC.
2025-02-01 20:59:24 +08:00
Eli Zaretskii
d58fe6619f Merge from origin/emacs-30
ba27193895 ; * etc/NEWS: Fix wording.
fdc6842a44 Remove bookmark fringe marks when deleting all bookmarks
3bccd04c5c Improve wording in symbols.texi
6441b9ea7a Fix typo in Gnus manual
87be3aa149 eglot: Allow omnisharp binary to be capitalized "OmniSharp"
5485ea6aef Do not set `trusted-content` in major modes
d11488fd6f ; * lisp/subr.el (sit-for): Doc fix.

# Conflicts:
#	etc/NEWS
2025-02-01 07:40:19 -05:00
Eli Zaretskii
25fc779986 ; Merge from origin/emacs-30
The following commits were skipped:

0b3e050c6c * src/puresize.h (BASE_PURESIZE): Increase (bug#75907).
0c6aa27cde ; Fix Cygw32 build (bug#75926)
2025-02-01 07:40:14 -05:00
Eli Zaretskii
5f7ef7ca8c Merge from origin/emacs-30
d0907a4388 ; * admin/MAINTAINERS: Prefer "website" to "home page".
2025-02-01 07:40:14 -05:00
Eli Zaretskii
68d516532d ; Merge from origin/emacs-30
The following commit was skipped:

1969c2c3ed ; * admin/MAINTAINERS: Remove Bastien Guerry.
2025-02-01 07:40:14 -05:00
Eli Zaretskii
7c0a93d7e5 Merge from origin/emacs-30
6447634f17 ; * admin/MAINTAINERS: Add CC Mode.
486d5d524c Update cc-mode URL to point to nongnu.org
17ef46e849 ; * etc/NEWS: Note CVE-2024-53920 further up also.
05ee2b741f ; * CONTRIBUTE: Suggest to run more tests sometimes.
e74efd9a42 * CONTRIBUTE: Recommend running the unit test prior to co...
a9cde2463a Don't signal an error in treesit-node-at
5d021a711a ; Improve documentation of '.dir-locals.el'
84595cbcc7 ; (let-alist): Document double-dot escape syntax. (Bug#75...
5617b07a45 ; Prefer HTTPS to HTTP in docs
fdd23023c8 ; * admin/MAINTAINERS: Sort external packages alphabetica...
74dcfe155a ; * etc/NEWS: Remove temporary documentation markers.
a87c382cab ; * etc/NEWS: Add missing temporary documentation tags.
3c820cd265 Document insert-directory-program as a user option
2c1edf5f62 doc/lispref/modes.texi (Syntactic Font Lock): Update for ...

# Conflicts:
#	etc/NEWS
2025-02-01 07:39:56 -05:00
Jostein Kjønigsen
0ef78b131b lisp/progmodes/csharp-mode.el: Fix fontification of typeof (bug#75406). 2025-02-01 13:29:51 +02:00
Eli Zaretskii
3a5aba81ca ; Fix last change
* etc/NEWS: Announce the change in 'ispell-help-timeout'.
* lisp/textmodes/ispell.el (ispell-help-timeout): Change :version.
(Bug#75804)
2025-02-01 13:26:06 +02:00
Michael Albinus
ba27193895 ; * etc/NEWS: Fix wording. 2025-02-01 12:24:27 +01:00
Rudolf Adamkovič
89eac993c7 Ispell: Increase help timeout
* lisp/textmodes/ispell.el (ispell-help-timeout): Increase the timeout
from 5 to 30 seconds to allow users, especially new users, read the
Ispell help menu comfortably and act confidently (bug#75804).
2025-02-01 13:22:02 +02:00