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.
kobarity [Wed, 11 Dec 2024 14:21:04 +0000 (23:21 +0900)]
Fix font-lock of Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings): Bind
'parse-sexp-ignore-comments' to nil so that we can look for
closing braces even if a hash is used in the format specifier.
* test/lisp/progmodes/python-tests.el
(python-font-lock-f-string-1): New test. (Bug#74738)
Yuan Fu [Fri, 13 Dec 2024 05:42:44 +0000 (21:42 -0800)]
Apply string syntax only to string in jsx (bug#73978)
The current code applies string syntax to too many things. This
patch makes tsx-ts-mode (and friends) only apply string syntax
to actual text in tsx/jsx.
* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts--s-p-query): Only capture jsx_text.
(tsx-ts--syntax-propertize-captures): handle the case when the
text is one character long.
Robert Pluim [Tue, 10 Dec 2024 13:56:21 +0000 (14:56 +0100)]
Fix 'gnus-select-method' custom type
* lisp/gnus/gnus.el (gnus-redefine-select-method-widget): Cater
for the 'gnus-search-engine' configuration variable, which takes
2 args instead of 1. (Bug#74759)
Jared Finder [Tue, 10 Dec 2024 06:16:40 +0000 (22:16 -0800)]
Enable xterm-mouse-mode by default in xterm
* lisp/xt-mouse.el (xterm-mouse-mode): Change default value of
xterm-mouse-mode to t.
* lisp/term/xterm.el (xterm--init): Enable xterm-mouse-mode if
the default value is still set.
* etc/NEWS: Document new behavior.
Daniel Mendler [Sat, 7 Dec 2024 21:56:15 +0000 (22:56 +0100)]
eww: Use browse-url-with-browser-kind in eww-browse-with-external-browser
Guarantee that an external browser is used by EWW if
`browse-url-secondary-browser-function' is set to
`eww-browse-url'.
* lisp/net/eww.el (eww-browse-with-external-browser): Use
`browse-url-secondary-browser-function' only if it is an
external browser, otherwise fall back to
`browse-url-with-browser-kind'.
(eww-follow-link): Use `eww-browse-with-external-browser' if the
EXTERNAL prefix argument is non-nil. Improve docstring.
* lisp/net/browse-url.el (browse-url-secondary-browser-function):
Update docstring. (Bug#74730)
Visuwesh [Thu, 5 Dec 2024 06:10:02 +0000 (11:40 +0530)]
Revert Dired buffer when clicking on basename of directory
* lisp/dired.el (dired--make-directory-clickable): Make clicking
on basename of the directory revert the Dired buffer.
* etc/NEWS: Announce the change. (Bug#74700)
Pengji Zhang [Tue, 10 Dec 2024 10:55:36 +0000 (18:55 +0800)]
Rework history Isearch for Eshell
This is to make history Isearch for Eshell similar to that of
'comint-mode', by hooking into Isearch properly instead of
defining new commands to emulate Isearch (bug#74287).
* lisp/eshell/em-hist.el (eshell-history-isearch): New user
option.
(eshell-goto-history, eshell--isearch-setup)
(eshell-history-isearch-end, eshell-history-isearch-search)
(eshell-history-isearch-message, eshell-history-isearch-wrap)
(eshell-history-isearch-push-state): New functions.
(eshell-isearch-backward-regexp, eshell-isearch-forward-regexp):
New commands.
(eshell--history-isearch-message-overlay)
(eshell--stored-incomplete-input, eshell--force-history-isearch):
New internal variables.
(eshell-hist-mode-map): Bind 'M-r' to
'eshell-isearch-backward-regexp' and free 'M-s' binding for
normal in-buffer search commands.
(eshell-isearch-backward, eshell-isearch-forward): Use the new
way to start searching.
(eshell-hist-initialize): Use the new Isearch setup function.
(eshell-previous-matching-input): Use 'eshell-goto-history'.
Also inhibit messages when searching.
(eshell-isearch-map, eshell-isearch-repeat-backward)
(eshell-isearch-abort, eshell-isearch-delete-char)
(eshell-isearch-return, eshell-isearch-cancel)
(eshell-isearch-repeat-forward, eshell-test-imatch)
(eshell-return-to-prompt, eshell-prepare-for-search): Remove.
These are for the old history Isearch implementation.
Pengji Zhang [Wed, 11 Dec 2024 07:05:09 +0000 (09:05 +0200)]
Do not call custom-reevaluate-setting in comint.el (bug#74287)
* lisp/comint.el (comint--force-history-isearch): New internal variable.
(comint-history-isearch-backward, comint-history-isearch-backward-regexp):
Set comint--force-history-isearch to t.
(comint-history-isearch-setup): Check comint--force-history-isearch.
(comint-history-isearch-end): Set comint--force-history-isearch back to nil
instead of calling custom-reevaluate-setting.
Björn Bidar [Tue, 10 Dec 2024 22:43:29 +0000 (00:43 +0200)]
Update browse-url-kde variables
* lisp/net/browse-url.el (browse-url-kde-program, browse-url-kde-args):
Update defaults to more modern alternative to kfmclient. Kfmclient is
only installed when Konqueror is installed, which isn't the default
file-manager since KDE4. In contrast, it is more likely that kde-open
is installed as it is required by Plasma, and it exists since
KDE4. (Bug#74775)
Paul Eggert [Tue, 10 Dec 2024 19:19:25 +0000 (11:19 -0800)]
Use builtin-expect directly
* admin/merge-gnulib (GNULIB_MODULES): Add builtin-expect,
since src/lisp.h now uses __builtin_expect directly,
which we should no longer rely on it being pulled in as
a dependency of some other Gnulib module that we use.
Stephen Gildea [Tue, 10 Dec 2024 17:09:39 +0000 (09:09 -0800)]
time-stamp: properly abbreviate instead of truncating names
* lisp/time-stamp (time-stamp-string-preprocess): Stop truncating month
and weekday name strings; it didn't internationalize well.
Some historical conversions, previously accepted quietly, now warn.
(time-stamp-format): Recommend the simpler formats implemented in 2019.
* test/lisp/time-stamp-tests.el: Update tests and comments to match.
Revert commit 83e4559664 (2022-07-01), which was working around the
former confusion between truncation and abbreviation.