Eli Zaretskii [Wed, 18 Dec 2024 19:16:07 +0000 (21:16 +0200)]
Avoid MinGW compilation warning in lib/
* nt/mingw-cfg.site (ac_cv_func_malloc_0_nonnull)
(gl_cv_malloc_ptrdiff, gl_cv_func_malloc_posix):
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_malloc-gnu): Set to avoid
compiling lib/malloc.c, which is not needed and causes a
compilation warning.
Stefan Kangas [Wed, 18 Dec 2024 02:46:04 +0000 (03:46 +0100)]
Make font-lock face variables obsolete
Using these variables as "another mechanism for changing face
appearance" never really worked, since mode authors were free to use the
face instead of the variable (i.e. quoting the symbol). This means that
when users customized the variables, it would change its appearance only
in some cases, which is a rather surprising interface.
Indeed, it turns out that some modes have not always been consistent,
and mixed using the variable and the face, increasing the confusion even
further. Thus, the only thing users could rely on to always work was to
leave the variables at their default value, and to customize the face.
We now recommend customizing the face, and are obsoleting these
variables. This will lead to some minor code-churn, but it is believed
that it will be ultimately worth it. To fix existing Lisp code, you
should typically only need to quote the symbol, as this commit shows.
It might be the case that we will have to keep the obsolete variables,
that have been with us since Emacs 19, around for a longer time-period
than normal, to allow package authors to adapt.
* lisp/font-lock.el (font-lock-comment-face)
(font-lock-comment-delimiter-face, font-lock-string-face)
(font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face)
(font-lock-builtin-face, font-lock-function-name-face)
(font-lock-variable-name-face, font-lock-type-face)
(font-lock-constant-face, font-lock-warning-face)
(font-lock-negation-char-face, font-lock-preprocessor-face): Make face
variables obsolete in favor of customizing the faces directly
instead. (Bug#71469)
* doc/lispref/modes.texi (Faces for Font Lock): Don't document above
obsolete variables.
Juri Linkov [Tue, 17 Dec 2024 18:51:03 +0000 (20:51 +0200)]
Display commands with repeat-continue-only in describe-repeat-maps
* lisp/repeat.el (describe-repeat-maps): Display commands with the
property 'repeat-continue-only' used to continue the currently
active repeat-map (bug#74140). Also use 'cl--map-keymap-recursively'
instead of 'map-keymap' to find more deep keybindings.
Juri Linkov [Tue, 17 Dec 2024 18:45:42 +0000 (20:45 +0200)]
Improve support of property repeat-continue-only in repeat-mode (bug#74140)
* lisp/repeat.el (repeat-get-map): Add optional arg 'rep-map'.
Move the check for 'repeat-continue-only' from 'repeat-pre-hook'.
Improve its logic to check if the current map 'repeat-in-progress'
exists in the list from the 'repeat-continue-only' property.
(repeat-post-hook): Set 'repeat-in-progress' to the symbol
from the property 'repeat-map'.
* test/lisp/repeat-tests.el (repeat-tests-another-repeat-map):
Add new keymap to test multiple parallel repeat-maps.
(repeat-tests-continue-another): New test that uses commands
from 'repeat-tests-another-repeat-map' shared with
'repeat-tests-repeat-map'.
Stefan Kangas [Mon, 16 Dec 2024 22:58:34 +0000 (23:58 +0100)]
unintern: Drop support for obsolete calling convention
* lisp/subr.el (unintern):
* src/lread.c (Funintern): Drop support for old calling convention,
obsolete since 23.3.
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-shorthand-escape): Don't use obsolete calling convention.
Stefan Kangas [Mon, 16 Dec 2024 21:21:37 +0000 (22:21 +0100)]
all-completions: Drop support for obsolete calling convention
* src/minibuf.c (Fall_completions):
* lisp/subr.el (all-completions): Drop support for old calling
convention, obsolete since 23.1.
* src/minibuf.c (Finternal_complete_buffer): Update caller.
Stefan Kangas [Mon, 16 Dec 2024 20:43:29 +0000 (21:43 +0100)]
Bind inhibit-read-only to t in substitute-command-keys
* lisp/help.el (substitute-command-keys): Bind inhibit-read-only to t,
to allow modifying strings that are intended for the minibuffer, and
therefore already use minibuffer-prompt-properties.
Ship Mints [Mon, 16 Dec 2024 16:58:10 +0000 (17:58 +0100)]
Support pixelwise frame cloning (Bug#74750)
* lisp/frame.el (clone-frame): Honor 'frame-resize-pixelwise'
when cloning a frame's geometry via the 'text-pixels' feature of
'make-frame' (Bug#74750). Correctly specify source frame in
'display-graphic-p' test for tty selection behavior.
john muhl [Sun, 15 Dec 2024 23:15:35 +0000 (17:15 -0600)]
Add Qutebrowser to list of choices in customize
* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
Include 'browse-url-qutebrowser' so that it appears in the Choice
menus of 'browse-url-browser-function' and
'browse-url-secondary-browser-function'. (Bug#74904)
Stefan Kangas [Mon, 16 Dec 2024 02:26:48 +0000 (03:26 +0100)]
Invert preprocessor condition to fix 'C-x 4 a'
Typing 'C-x 4 a' in the main function now correctly adds 'main' to the
generated ChangeLog, whereas before it added 'andreid_emacs_init'.
Inverting the preprocessor condition seems like an easier fix than
changing the add-change-log-entry-other-window heuristic.
* src/emacs.c (main): Invert preprocessor condition to appease the
'add-change-log-entry-other-window' heuristic.
Stefan Kangas [Sun, 15 Dec 2024 23:01:43 +0000 (00:01 +0100)]
Move pure+side-effect-free declarations to byte-opt.el
* src/json.c (syms_of_json): Move pure and side-effect-free declarations
for json-serialize and json-parse-string from here...
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
...to here.
Stefan Monnier [Sun, 15 Dec 2024 22:05:55 +0000 (17:05 -0500)]
trusted-content: Adjust the last patch based on preliminary feedback
* lisp/files.el (trusted-content): Rename from `trusted-files`.
Update all references.
* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/simple.el (read--expression): Set `trusted-content` since
these buffers contain code that the user presumably intends to run anyway.
(elisp--safe-macroexpand-all): Make the warning more discreet.
Stefan Monnier [Tue, 10 Dec 2024 21:26:31 +0000 (16:26 -0500)]
elisp-mode.el: Disable Flymake byte-compile backend in untrusted files
To address serious security issues (CVE-2024-53920), disable
`elisp-flymake-byte-compile` except in those files explicitly
specified as "trusted".
For that introduce a new custom var `trusted-files` and new
function `trusted-content-p`.
While at it, similarly skip the implicit macroexpansion done during
completion if the current file is not trusted.
* lisp/files.el (trusted-files): New variable.
(trusted-content-p): New function.
* lisp/progmodes/elisp-mode.el (elisp--safe-macroexpand-all):
New function, extracted from `elisp--local-variables`.
Use `trusted-content-p`.
(elisp--local-variables): Use it.
(elisp-flymake-byte-compile): Disable according to `trusted-content-p`.
Gerd Möllmann [Sun, 8 Dec 2024 05:54:47 +0000 (06:54 +0100)]
Prevent too early hiding of tty tips
* lisp/tty-tip.el (tty-tip--show-timer): Renamed from
tty-tip--timeout-id.
(tty-tip--hide-timer): New variable.
(tty-tip--delete-frame): Cancel hide timer if set.
(tty-tip--create-frame): Use run-with-timer instead of run-at-time
for consistency.
Gerd Möllmann [Mon, 18 Nov 2024 15:50:51 +0000 (16:50 +0100)]
Consider all windows for redisplay if frames have been cleared
* src/xdisp.c (clear_garbaged_frames): Return true if any tty frame's
current matrix has been cleared.
(redisplay_internal): Consider all windows if clear_garbaged_frames
returns true.
Gerd Möllmann [Fri, 15 Nov 2024 12:34:55 +0000 (13:34 +0100)]
Don't pause display for pending input
* src/dispnew.c: Remove display_completed, redisplay_dont_pause,
redisplay-dont-pause was declared obsolete in Emacs 24. Remove anything
checking pending input, change function signatures accordingly, and so
on.
* src/keyboard.c (read_char): Don't use redisplay_dont_pause.
* src/minibuf.c (read_minibuf): Use new function signatures.
* src/xdisp.c: Don't check display_completed. Use new API.
Gerd Möllmann [Tue, 5 Nov 2024 09:26:36 +0000 (10:26 +0100)]
TTY menus: handle saved state referencing dead frames
* src/term.c (restore_desired_matrix): If a tty menu saves a current
matrix that contains glyphs from a child frame, handle the case that
that child frame dies before the saved state is restored.
Eli Zaretskii [Sat, 26 Oct 2024 09:14:21 +0000 (12:14 +0300)]
More fixes for w32 console build
* src/w32term.c (w32_read_socket): Don't use FRAME_OBSCURED_P,
which was removed.
* src/frame.h (struct frame): Move !HAVE_NTGUI to its original
place.
* src/treesit.c (treesit_load_language): Shut up GCC warning.