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.
Gerd Möllmann [Mon, 21 Oct 2024 16:32:04 +0000 (18:32 +0200)]
Initial child frames based on master
This is based on a diff from 2024-10-15 which still applied.
Since then, I've inadvertantly modified the igc branch so that
it is no longer possible to get a clean diff of what has changed
since I created the branch.
Stephen Gildea [Sat, 14 Dec 2024 18:23:04 +0000 (10:23 -0800)]
time-stamp: fix search end, more compatibility suggestions
* lisp/time-stamp.el (time-stamp): Use a marker for the
search end limit so we don't insert past it.
(time-stamp-conv-warn): Include a second suggested conversion
that might be what was intended.
Include a link to variable 'time-stamp-format'.
* test/lisp/time-stamp-tests.el: more tests
Richard Lawrence [Fri, 13 Dec 2024 09:41:02 +0000 (10:41 +0100)]
Check for presuppositions in `calendar-date-is-valid-p'
Do not signal an error in `calendar-date-is-valid-p' if passed a
value which is not a three-element list of integers. Signaling
an error makes the function unusable as a predicate for valid
date values. (Bug#74848)
* lisp/calendar/calendar.el (calendar-date-is-valid-p): Add the
check that input is a 3-element list.
* test/lisp/calendar/calendar-tests.el: New file with tests.
Daniel Mendler [Wed, 11 Dec 2024 06:36:16 +0000 (07:36 +0100)]
Add `browse-url-qutebrowser'
The browser launcher supports the NEW-WINDOW argument and
`browse-url-qutebrowser-new-window-is-tab' to open tabs.
Furthermore opening new URLs is sped up via Unix socket IPC if
available.
* lisp/net/browse-url.el (browse-url-qutebrowser-send): Function
to send command to Qutebrowser via IPC.
(browse-url-qutebrowser): New browser launcher. Use
`browse-url-qutebrowser-send'.
(browse-url-qutebrowser-program, browse-url-qutebrowser-arguments)
(browse-url-qutebrowser-new-window-is-tab): New customizables.
(browse-url-mozilla-new-window-is-tab)
(browse-url-firefox-new-window-is-tab)
(browse-url-epiphany-new-window-is-tab): Improve docstrings.
Jared Finder [Sat, 14 Dec 2024 08:30:43 +0000 (09:30 +0100)]
Fix for xt-mouse-tests.el broken in prior commit
xt-mouse-tests not turning on xterm-mouse-mode if it was already
on did not work with xterm-mouse-mode being set to t by default.
It turns out that xt-mouse-tests already does not report proper
results when called inside a running Emacs session so the code
path is not useful anyways.
* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Always
turn on xterm-mouse-mode, even if it is already on.