]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 months agoFix ':defer nil' in 'use-package'
Eli Zaretskii [Sun, 4 Aug 2024 08:52:12 +0000 (11:52 +0300)]
Fix ':defer nil' in 'use-package'

* lisp/use-package/use-package-core.el
(use-package-normalize-keywords): Use 'plist-get' instead of
'plist-member'.  (Bug#72414)

(cherry picked from commit bfb1aee99898d7704a64ee124217b9e9ca43d66d)

3 months agoDocument unsupported color Emoji on OpenBSD
Manuel Giraud [Thu, 25 Jul 2024 11:57:59 +0000 (13:57 +0200)]
Document unsupported color Emoji on OpenBSD

Bug#72268

* etc/PROBLEMS (Runtime problems related to font handling):
Document unsupported color Emoji on OpenBSD.

(cherry picked from commit d787817076e26d28163073847f01fd3587106355)

3 months ago; Skip commit db1f749db5560611f58c000b9582174b9187e045
Eshel Yaron [Sun, 11 Aug 2024 07:23:44 +0000 (09:23 +0200)]
; Skip commit db1f749db5560611f58c000b9582174b9187e045

3 months agoAvoid inserting extra space in SVG data
David Ponce [Fri, 19 Jul 2024 14:10:00 +0000 (16:10 +0200)]
Avoid inserting extra space in SVG data

* lisp/svg.el (svg-print): Remove useless extra space from
the XML representation of child node.  (Bug#72198)

(cherry picked from commit f94d58008eb3d6e9d3ea9e9b967be329a880057b)

3 months ago; Skip commit 292fcd2009918a3e4f15b6451ad521a0a92188ad
Eshel Yaron [Sun, 11 Aug 2024 07:22:44 +0000 (09:22 +0200)]
; Skip commit 292fcd2009918a3e4f15b6451ad521a0a92188ad

3 months agoFix missing type checks before specbind
Mattias Engdegård [Sat, 3 Aug 2024 17:08:39 +0000 (19:08 +0200)]
Fix missing type checks before specbind

This fixes bugs that crashed Emacs when the Lisp interpreter was fed
bad code.

* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Hoist symbol-with-pos elimination and type checks to a
dominating position for efficiency.  This also plugs at least two typing
holes. (Mea culpa.)
* test/src/eval-tests.el (eval-bad-specbind): New regression test.

(cherry picked from commit e50d597f4508c6ef333c5616a2a924360437ba55)

3 months agoAdd minibuffer-action to 'cl-describe-type'. Bind it too.
Eshel Yaron [Sun, 11 Aug 2024 07:17:41 +0000 (09:17 +0200)]
Add minibuffer-action to 'cl-describe-type'.  Bind it too.

3 months agoscope.el: Prefer 'nconc' where possible
Eshel Yaron [Sat, 10 Aug 2024 15:02:33 +0000 (17:02 +0200)]
scope.el: Prefer 'nconc' where possible

3 months ago; Update ldefs-boot.el
Eshel Yaron [Sat, 10 Aug 2024 13:09:40 +0000 (15:09 +0200)]
; Update ldefs-boot.el

3 months ago(read-char-by-name): Adhere to changes in 'completions-group'
Eshel Yaron [Sat, 10 Aug 2024 12:00:11 +0000 (14:00 +0200)]
(read-char-by-name): Adhere to changes in 'completions-group'

3 months agoHighlight occurrences of var at point in Emacs Lisp
Eshel Yaron [Thu, 8 Aug 2024 20:26:16 +0000 (22:26 +0200)]
Highlight occurrences of var at point in Emacs Lisp

3 months agoHighlight binding and free var occurrences in Emacs Lisp
Eshel Yaron [Thu, 8 Aug 2024 19:28:44 +0000 (21:28 +0200)]
Highlight binding and free var occurrences in Emacs Lisp

3 months agoAdd refactor backend for 'emacs-lisp-mode'
Eshel Yaron [Thu, 8 Aug 2024 17:10:50 +0000 (19:10 +0200)]
Add refactor backend for 'emacs-lisp-mode'

3 months agoXref: support lexical variables in Emacs Lisp
Eshel Yaron [Thu, 8 Aug 2024 11:55:34 +0000 (13:55 +0200)]
Xref: support lexical variables in Emacs Lisp

* lisp/emacs-lisp/scope.el
* test/lisp/emacs-lisp/scope-tests.el: New files.
* lisp/progmodes/elisp-mode.el (xref-backend-definitions)
Use new 'scope' function to find bindings of lexical vars.
(xref-backend-references): Implement method.
* lisp/progmodes/xref.el (xref-location-line): Implement for
'xref-buffer-location' locations.

3 months agoeglot.el: Cease overriding 'flymake-diagnostic-functions'
Eshel Yaron [Thu, 8 Aug 2024 11:20:49 +0000 (13:20 +0200)]
eglot.el: Cease overriding 'flymake-diagnostic-functions'

3 months ago; * lisp/emacs-lisp/cond-star.el: Minor cleanup.
Eshel Yaron [Thu, 8 Aug 2024 11:19:59 +0000 (13:19 +0200)]
; * lisp/emacs-lisp/cond-star.el: Minor cleanup.

3 months ago; Fix tests
Eshel Yaron [Tue, 6 Aug 2024 16:20:46 +0000 (18:20 +0200)]
; Fix tests

3 months ago* lisp/tab-bar.el (tab-bar--format-tab-group): Add 'current-group'.
Juri Linkov [Tue, 6 Aug 2024 06:59:48 +0000 (09:59 +0300)]
* lisp/tab-bar.el (tab-bar--format-tab-group): Add 'current-group'.

Use current-group symbol for current tab group item (bug#71883).

(cherry picked from commit 7b49261b5e33b0de967c885aeee988b0221026bb)

3 months agoAvoid compiler warning
Pip Cet [Mon, 5 Aug 2024 21:58:16 +0000 (21:58 +0000)]
Avoid compiler warning

* src/timefns.c (Fdecode_time): Use 'UNINIT' to avoid a warning with
gcc 14 and checking enabled.

(cherry picked from commit 0822d0c1cdd0f107c2090016ab528a5279c50756)

3 months agoFix typo in pdumper.c
Pip Cet [Mon, 5 Aug 2024 21:47:57 +0000 (21:47 +0000)]
Fix typo in pdumper.c

* src/pdumper.c (dump_interval_node): Call 'dump_field_fixup_later' with
the correct arguments.  Discovered by Danny McClanahan.

(cherry picked from commit e7109dfd9c15312d20582efdde8c929c9a65282a)

3 months ago* src/search.c (Fre__describe_compiled): Use 'CHECK_STRING'.
Pip Cet [Mon, 5 Aug 2024 21:46:58 +0000 (21:46 +0000)]
* src/search.c (Fre__describe_compiled): Use 'CHECK_STRING'.

(cherry picked from commit ca258e81b81539dc20a06958f911fc5dcd3df922)

3 months agoAvoid warning when building on macOS versions < 14 (bug#72440)
Mattias Engdegård [Mon, 5 Aug 2024 19:27:17 +0000 (21:27 +0200)]
Avoid warning when building on macOS versions < 14 (bug#72440)

* src/nsterm.m ([EmacsView initFrameFromEmacs:]):
The clipsToBounds property of NSView is only public from macOS 14 on.

(cherry picked from commit ee371f55b359b509cd381c87e78b5f5ee9311f37)

3 months ago; Fix the fix for EmacsView
Gerd Möllmann [Mon, 5 Aug 2024 15:26:23 +0000 (17:26 +0200)]
; Fix the fix for EmacsView

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Check if
setClipsToBound is available.

(cherry picked from commit 3ad4623bec49428fda34a475641eae9f1f33fc78)

3 months ago; * lisp/transient.el: require pp to defvar pp-default-function
Mattias Engdegård [Mon, 5 Aug 2024 14:44:17 +0000 (16:44 +0200)]
; * lisp/transient.el: require pp to defvar pp-default-function

(cherry picked from commit 1d0c68fbdcbfe0ab5f4e14882d8003f7b7d7d0a0)

3 months agoUpdate to Transient v0.7.4-1-g3d9e9358
Jonas Bernoulli [Mon, 5 Aug 2024 12:41:02 +0000 (14:41 +0200)]
Update to Transient v0.7.4-1-g3d9e9358

(cherry picked from commit c7d9cd722e5a7042a52c92f8497f903bfe9870b8)

3 months ago; Fix last change in EmacsView
Gerd Möllmann [Mon, 5 Aug 2024 09:39:44 +0000 (11:39 +0200)]
; Fix last change in EmacsView

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Don't check AppKit
version.

(cherry picked from commit f1e29506822739208e5706b733cfd713c5f37cfd)

3 months agoRestore a default before macOS 14 API change (bug#72440)
Gerd Möllmann [Mon, 5 Aug 2024 07:39:01 +0000 (09:39 +0200)]
Restore a default before macOS 14 API change (bug#72440)

* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Set clipsToBounds to
YES.

(cherry picked from commit 9253910a5a5ec89fe6e676e53f355f3b0bdc176e)

3 months ago* lisp/tab-bar.el (tab-bar-tab-group-format-default): Hide hints.
Juri Linkov [Mon, 5 Aug 2024 06:56:38 +0000 (09:56 +0300)]
* lisp/tab-bar.el (tab-bar-tab-group-format-default): Hide hints.

Don't display hints when tab-bar-show-inactive-group-tabs is customized
to t (bug#71939).  Suggested by Ship Mints <shipmints@gmail.com>.

(cherry picked from commit 7a14f60b90ea640087b759466f2e2bafa490699d)

3 months agoFix c-ts-common filling
Yuan Fu [Mon, 5 Aug 2024 03:46:45 +0000 (20:46 -0700)]
Fix c-ts-common filling

* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Exclude the last line from filling if
it only has non-word characters like *=-.
* test/lisp/progmodes/c-ts-mode-resources/filling.erts: Fir the
multi-line test and add a single line test.

(cherry picked from commit 5ecd35555e9e20de9717f0184f58a15d8a2e68a3)

3 months agoAdd support for variable-pitch fonts in 'visual-wrap-prefix-mode'
Jim Porter [Sun, 28 Jul 2024 03:48:38 +0000 (20:48 -0700)]
Add support for variable-pitch fonts in 'visual-wrap-prefix-mode'

* lisp/emacs-lisp/subr-x.el (string-pixel-width): Allow passing BUFFER
to use the face remappings from that buffer when calculating the width.

* lisp/visual-wrap.el (visual-wrap--prefix): Rename to...
(visual-wrap--adjust-prefix): ... this, and support PREFIX as a number.
(visual-wrap-fill-context-prefix): Make obsolete in favor of...
(visual-wrap--content-prefix): ... this.
(visual-wrap-prefix-function): Extract inside of loop into...
(visual-wrap--apply-to-line): ... this.

* doc/lispref/display.texi (Size of Displayed Text): Update
documentation for 'string-pixel-width'.

* etc/NEWS: Announce this change.

(cherry picked from commit f70a6ea0ea86ef461e40d20664a75a92d02679ea)

3 months agoClarify that 'pcase-lambda' only destructs
Philip Kaludercic [Sun, 4 Aug 2024 14:52:38 +0000 (16:52 +0200)]
Clarify that 'pcase-lambda' only destructs

* lisp/emacs-lisp/pcase.el (pcase-lambda): Copy notice from
'pcase-let', indicating that pcase-lambda won't pattern match
like 'pcase', but just try to destruct with uncertain side
effects if this fails. (Bug#71503)

(cherry picked from commit 0756f3085ea948c945e309e2ce347fc5ab836574)

3 months agoRemove further compat code from Tramp
Michael Albinus [Sun, 4 Aug 2024 11:23:43 +0000 (13:23 +0200)]
Remove further compat code from Tramp

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
Use `process-file-return-signal-string'.

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Use "lisp-data" for persistency file.

* lisp/net/tramp-cmds.el (tramp-cleanup-this-connection)
(tramp-rename-these-files, tramp-recompile-elpa):
Declare `completion'.

* lisp/net/tramp-container.el (tramp-kubernetes--container)
(tramp-kubernetes--pod, tramp-kubernetes--namespace): Make more
robust.

* lisp/net/tramp-crypt.el (tramp-crypt-remove-directory):
Declare `completion'.

* lisp/net/tramp-gvfs.el (file-notyify-callback): Declare.

* lisp/net/tramp-sh.el (process-file-return-signal-string)
(vc-handled-backends): Don't declare.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Use `copy-directory-create-symlink'.

* lisp/net/tramp.el (tramp-skeleton-write-region): Use `lock-file' and
`unlock-file'..
(tramp-handle-make-lock-file-name): Use `remote-file-name-inhibit-locks'.
(tramp-handle-unlock-file): Use `remote-file-name-inhibit-locks'
and `userlock--handle-unlock-error'.
(tramp-handle-shell-command): Use `shell-command-buffer-name-async'
and `shell-command-buffer-name'.
(tramp-read-passwd): Remove workaround.

(cherry picked from commit 1b806a200edcb893471237f47e969dbb9d6a99f1)

3 months agoImprove font search and handling on MS-Windows
Eli Zaretskii [Sat, 3 Aug 2024 15:11:57 +0000 (18:11 +0300)]
Improve font search and handling on MS-Windows

* src/w32font.c: Add commentary about font search on MS-Windows.
(w32font_coverage_ok, add_font_entity_to_list)
(font_supported_scripts): Consider the coverage OK if a font has
only the SIP bit set, but also sets relevant codepage bits in the
CSB bits.
(font_supported_scripts): Fix script for USB bit 99.
* src/font.c (font_parse_fcname, font_parse_family_registry)
[HAVE_NTGUI]: Don't consider hyphenated suffixes of some Windows
fonts as not belonging to the family name.
* src/w32uniscribe.c (uniscribe_check_otf_1): Increase tags[]
array size, to avoid the E_OUTOFMEMORY error for some fonts.

* lisp/international/fontset.el (font-encoding-alist): Add
'unicode-sip'.

(cherry picked from commit ff6954b9c833bfeb8032fb772fa08e60e9ec56a8)

3 months agoRevert "Remove redundant byte-swapping boundary"
Po Lu [Sat, 3 Aug 2024 09:34:18 +0000 (17:34 +0800)]
Revert "Remove redundant byte-swapping boundary"

This reverts commit daefd6771a4879bb8e71ea67f69522700155df01.

* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34.  Reported by Pip
Cet <pipcet@protonmail.com>.

(cherry picked from commit 8d073823c61017c581a18853c89ec84432018d60)

3 months agoFix various typos reported by Pip Cet
Po Lu [Sat, 3 Aug 2024 08:46:47 +0000 (16:46 +0800)]
Fix various typos reported by Pip Cet

* src/ftfont.c (get_adstyle_property):

* src/sfntfont.c (sfntfont_list_1): Correct typos.  Reported by
Pip Cet <pipcet@protonmail.com>.

(cherry picked from commit c25687e860fbae6178afe8096ec003f5f4ce6462)

3 months agoNS: Fix placement of candidate window (bug#72422)
Gerd Möllmann [Sat, 3 Aug 2024 08:29:24 +0000 (10:29 +0200)]
NS: Fix placement of candidate window (bug#72422)

* src/nsterm.m ([EmacsView firstRectForCharacterRange:actualRange:]):
Call method of NSTextInput.

(cherry picked from commit e539a5c7d79b76eb16eed4cb5da4c3a531a640b4)

3 months agoFix 'script-representative-chars' for the 'han' script
Eli Zaretskii [Sat, 3 Aug 2024 07:29:38 +0000 (10:29 +0300)]
Fix 'script-representative-chars' for the 'han' script

* lisp/international/fontset.el (script-representative-chars):
Remove from 'han' codepoints that belong to 'cjk-misc'.

(cherry picked from commit 15afa72460b4a0ec910749646cb9852b4c578f5e)

3 months ago; * lisp/touch-screen.el: Correct commentary.
Po Lu [Sat, 3 Aug 2024 00:14:52 +0000 (08:14 +0800)]
; * lisp/touch-screen.el: Correct commentary.

(cherry picked from commit 94fe5894d99f8bb5cb175d7646f07e68360f2089)

3 months agoInstall cond*
Richard Stallman [Fri, 2 Aug 2024 16:03:45 +0000 (12:03 -0400)]
Install cond*

* oond-star.el: New file.

(cherry picked from commit 18491f48d973c9cbc453d9f742ec7f73e83df3bb)

3 months agoAvoid aborts when buffer is modified during its redisplay
Eli Zaretskii [Thu, 1 Aug 2024 11:01:17 +0000 (14:01 +0300)]
Avoid aborts when buffer is modified during its redisplay

* src/xdisp.c (redisplay_window): Restore point from saved byte
position only if the buffer was not changed meanwhile.
(Bug#72165)

(cherry picked from commit ef5466c267542970f28548c820783f3257c1b0cf)

3 months agoFix c++-ts-mode indentation for templace (bug#72263)
Yuan Fu [Thu, 1 Aug 2024 06:45:26 +0000 (23:45 -0700)]
Fix c++-ts-mode indentation for templace (bug#72263)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Add rule for template.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add test.

(cherry picked from commit cb421286d2e9834d90d29288c932a6c6e03a555f)

3 months agoBring back 'oddp' and 'evenp'
Eshel Yaron [Tue, 6 Aug 2024 09:51:28 +0000 (11:51 +0200)]
Bring back 'oddp' and 'evenp'

3 months agoTeach electric-pair-mode about numeric prefix arguments
Eshel Yaron [Sat, 3 Aug 2024 10:55:51 +0000 (12:55 +0200)]
Teach electric-pair-mode about numeric prefix arguments

3 months agoDrop 'tabulated-list-groups'
Eshel Yaron [Fri, 2 Aug 2024 10:59:32 +0000 (12:59 +0200)]
Drop 'tabulated-list-groups'

3 months agoFix display of empty margins when default face is remapped
Eli Zaretskii [Fri, 2 Aug 2024 06:48:55 +0000 (09:48 +0300)]
Fix display of empty margins when default face is remapped

* src/xdisp.c (display_line): Append space glyphs to margin areas
if the default face is remapped and nothing is written to the
margin area of this screen line.
(produce_special_glyphs): If the truncation/continuation glyphs do
not specify a face, use the remapped default face, not the
original frame-global default face.  Reported by Nicolas
P. Rougier <nicolas.rougier@inria.fr> in
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg01217.html.

(cherry picked from commit 80108438e5e2e95ca75e59212fb1669a723241b5)

3 months agoFix finding anchor references after 'Info-on-current-buffer'
Eli Zaretskii [Fri, 2 Aug 2024 06:24:55 +0000 (09:24 +0300)]
Fix finding anchor references after 'Info-on-current-buffer'

* lisp/info.el (Info--record-tag-table): New function, extracted
from 'Info-find-node-2'.
(Info-find-node-2, Info-on-current-buffer): Use
'Info--record-tag-table'.  (Bug#72391)

(cherry picked from commit 4fa540f86587d4458cf33da352176f57e20723d4)

3 months ago; * lisp/eshell/em-dirs.el (eshell/cd): Remove extraneous 'eshell-protect'.
Jim Porter [Thu, 1 Aug 2024 16:31:44 +0000 (09:31 -0700)]
; * lisp/eshell/em-dirs.el (eshell/cd): Remove extraneous 'eshell-protect'.

(cherry picked from commit 1134734e19617a0875b77f8c7df64cfb265ec118)

3 months agoFix regression in 'todo-test-todo-quit02'
Martin Rudalics [Thu, 1 Aug 2024 16:04:20 +0000 (18:04 +0200)]
Fix regression in 'todo-test-todo-quit02'

* lisp/window.el (switch-to-prev-buffer): If BURY-OR-KILL is
non-nil, remove any 'quit-restore' or 'quit-restore-prev'
parameter referencing the old buffer too.  This fixes a
regression when running 'todo-test-todo-quit02' from 'ert'
(reported by Andrea Corallo <acorallo@gnu.org>).

(cherry picked from commit 0892b66e9b0233cf66d5f6d10bbd9bf096c41755)

3 months agoFix edge cases in tramp-crypt.el
Michael Albinus [Thu, 1 Aug 2024 14:57:53 +0000 (16:57 +0200)]
Fix edge cases in tramp-crypt.el

* lisp/net/tramp-crypt.el (tramp-crypt-handle-set-visited-file-modtime)
(tramp-crypt-handle-verify-visited-file-modtime): New defuns.
(tramp-crypt-file-name-handler-alist): Use them.
(tramp-crypt-handle-lock-file): Care about `buffer-file-name'.
(tramp-crypt-handle-unlock-file): Remove compat code.

(cherry picked from commit 889e7027d3ec54be204e7bd1f1fa1b8c93f3e172)

3 months agoRemove misspelled rx category `chinse-two-byte`
Mattias Engdegård [Thu, 1 Aug 2024 08:29:10 +0000 (10:29 +0200)]
Remove misspelled rx category `chinse-two-byte`

* lisp/emacs-lisp/rx.el (rx--categories): Remove misspelled variant
present in Emacs 21-1-24.3, correct name since 24.4.
* etc/NEWS: Announce.

(cherry picked from commit 4437d730a5fff6dca61f99a146c99aefd0f67577)

3 months agoImprove window/buffer handling code
Martin Rudalics [Thu, 1 Aug 2024 07:37:50 +0000 (09:37 +0200)]
Improve window/buffer handling code

The purpose of these changes is to improve the code handling the
display of buffers in windows, switching to previous and next
buffers in windows and restoring a previous state after quitting
or killing buffers.  In particular it does:

- Add a new window parameter 'quit-restore-prev' so a window can
keep its initial 'quit-restore' parameter and undoing a sequence
of quit window operations becomes more reliable (Bug#59862).

- Optionally have 'kill-buffer' call 'quit-restore-window' for
all windows showing the argument buffer (Bug#59862).

- Add a new hook so it's possible to avoid that a window gets
deleted implicitly by functions like 'kill-buffer' (Bug#71386).

- Add a new option to make 'quit-restore-window' delete windows
more aggressively (Bug#59862).

- Immediately remove killed buffers from all windows' previous
and next buffers.  For windows that are already dead, use a weak
hash table to be used by 'kill-buffer'.  This avoids any special
handling of such windows by the garbage collector.

- Immediately remove 'quit-restore' and 'quit-restore-prev'
window parameters that reference killed buffers.  These
parameters have no more use once their buffers got killed.

- Make sure that internal windows do not have any previous and
next buffers.  This fixes a silly memory leak.

- Make sure that after set_window_buffer and some wset_buffer
calls the buffer now shown in the window does not appear in the
lists of that window's previous and next buffers.  The old
behavior could make functions investigating these lists
erroneously believe that there still existed some other buffer
to switch to.

* src/alloc.c (mark_discard_killed_buffers): Remove function.
(mark_window): No more filter previous and next buffer lists.
* src/window.h (struct window): Move up prev_buffers and
next-buffers in structure; they are now treated by the collector
as usual.
* src/window.c (window_discard_buffer_from_alist)
(window_discard_buffer_from_list)
(window_discard_buffer_from_window)
(window_discard_buffer_from_dead_windows)
(Fwindow_discard_buffer): New functions.
(set_window_buffer): Discard BUFFER from WINDOW's previous and
next buffers.
(make_parent_window): Make sure internal windows have no previous
and next buffers.
(make_window): Don't initialize window's previous and next
buffers, they are handled by allocate_window now.
(Fdelete_window_internal): Add WINDOW to window_dead_windows_table.
(Fset_window_configuration): Remove resurrected window from
window_dead_windows_table.  Make sure buffers set by wset_buffer
calls are not recorded in window's previous and next buffers.
(delete_all_child_windows): Add deleted windows to
window_dead_windows_table.
(window_dead_windows_table): New weak hash table to record dead
windows that are stored in saved window configurations.
* src/buffer.c (Fkill_buffer): Call new function
'window_discard_buffer_from_dead_windows'.
* lisp/window.el (window-deletable-functions): New hook.
(window-deletable-p): Update doc-string.  Run
'window-deletable-functions' (Bug#71386).
(unrecord-window-buffer): New argument ALL.  Move body to
'window-discard-buffer-from-window' so that if ALL is non-nil,
WINDOW's 'quit-restore' and 'quit-restore-prev' parameters get
removed too.
(switch-to-prev-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should have done that already.  Use
'unrecord-window-buffer'.
(switch-to-next-buffer): Don't care about killed buffers here;
'replace-buffer-in-windows' should do that now.
(kill-buffer-quit-windows): New option.
(delete-windows-on): Update doc-string.  Handle new option
'kill-buffer-quit-windows'.  Update 'unrecord-window-buffer'
calls.
(replace-buffer-in-windows): Update doc-string.  Handle new
option 'kill-buffer-quit-windows' (Bug#59862).  Update call to
'unrecord-window-buffer'.
(quit-restore-window-no-switch): New option.
(quit-restore-window): Update doc-string.  Handle additional
values of BURY-OR-KILL so to not kill a buffer about to be
killed by the caller.  Handle 'quit-restore-prev' parameter
(Bug#59862).  Handle new option 'quit-restore-window-no-switch'
(Bug#59862).
(quit-windows-on): Update doc-string.  Call 'quit-window-hook'
and call 'quit-restore-window' directly so that the buffer does
not get buried or killed by the latter.  Update
'unrecord-window-buffer' call.
(display-buffer-record-window): Update doc-string.  Handle new
`quit-restore-prev' parameter (Bug#59862).
(switch-to-buffer): Call 'display-buffer-record-window' so a
latter 'quit-restore-window' can use its parameters.
* doc/lispref/windows.texi (Deleting Windows): Describe implicit
deletion of windows and new hook 'window-deletable-functions'.
(Buffers and Windows): Update description of
'replace-buffer-in-windows'.  Describe new option
'kill-buffer-quit-windows'.
(Quitting Windows): Describe 'quit-restore-prev' parameter and
new option 'quit-restore-window-no-switch'.  Update description
of 'quit-restore-window'.
(Window Parameters): Mention 'quit-restore-prev' parameter.
* etc/NEWS: Add entries for 'window-deletable-functions',
'kill-buffer-quit-windows', 'quit-restore-window-no-switch'.
mention new parameter 'quit-restore-prev' and new argument
values for 'quit-restore-window'.

(cherry picked from commit 27381d71c65bd0ba93ed61f57011dbc66bd5bfab)

3 months agoBetter resolve bug#72188
Po Lu [Thu, 1 Aug 2024 00:23:36 +0000 (08:23 +0800)]
Better resolve bug#72188

* lisp/international/fontset.el (setup-default-fontset) <han>:
Don't search for fonts matching the `han' script elsewhere than
on Android, which restores the status quo existing in Emacs 29.
(bug#72188)

(cherry picked from commit 1154d8aafe2f4702b8fc775835f830fd00cfbaaf)

3 months agoRevert "Re-enable displaying `han' characters on Android"
Eli Zaretskii [Wed, 31 Jul 2024 15:36:41 +0000 (18:36 +0300)]
Revert "Re-enable displaying `han' characters on Android"

This reverts commit bf0aeaa0d7a1581a095aa423e75d0d71cceb28cd.
The characters removed by this commit cause Emacs to select
sub-optimal fonts that lack many Chinese characters, because
Emacs generally stops looking for fonts when it finds the
first one that seems to match.

(cherry picked from commit d00eb0468b147f2bfcb58bc586801f0495f5973d)

3 months agoMacOS: Let EmacsView implement NSTextInputClient
Gerd Möllmann [Tue, 30 Jul 2024 05:47:44 +0000 (07:47 +0200)]
MacOS: Let EmacsView implement NSTextInputClient

* src/nsterm.h (@interface EmacsView): Implement NSTextInputClient protocol.
* src/nsterm.m: Implement required NSTextInputClient methods, forwarding
to existing NSTextInput methods.

(cherry picked from commit ceb5a1522270c41d0c9f5e6b52d61e3173f72f1d)

3 months agoNS: Set frame position when entering/exiting fullscreen (bug#71912)
Gerd Möllmann [Thu, 25 Jul 2024 07:20:04 +0000 (09:20 +0200)]
NS: Set frame position when entering/exiting fullscreen (bug#71912)

* src/nsterm.h ([EmacsView adjustEmacsRectRect]): Declare.
* src/nsterm.m ([EmacsView windowDidEnterFullScreen]): New method.
([EmacsView windowDidEnterFullScreen]): Call it.
([EmacsView windowDidExitFullScreen]): Call it.

(cherry picked from commit 9f7c1ace9f86e4b657030a6e94c5d6aadc586878)

3 months ago* lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a new group's tab.
Juri Linkov [Mon, 29 Jul 2024 18:16:16 +0000 (21:16 +0300)]
* lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a new group's tab.

Move tab with a new group to the end of the tab bar (bug#72352)
Suggested by Ship Mints <shipmints@gmail.com>

(cherry picked from commit abefd9514bcf9d8de9d9e7f000ef55fad0d822fb)

3 months ago; * doc/lispref/modes.texi (Mode Line Data): Fix formatting.
Eli Zaretskii [Sat, 27 Jul 2024 12:56:47 +0000 (15:56 +0300)]
; * doc/lispref/modes.texi (Mode Line Data): Fix formatting.

(cherry picked from commit 158835668dffcad0c5668dd01200f2737972bb3e)

3 months ago(read--expression-try-read): Mark as minibuffer-specific
Eshel Yaron [Fri, 2 Aug 2024 09:49:56 +0000 (11:49 +0200)]
(read--expression-try-read): Mark as minibuffer-specific

3 months agoAdd a couple of compatibility definitions for removed functions
Eshel Yaron [Fri, 2 Aug 2024 09:49:36 +0000 (11:49 +0200)]
Add a couple of compatibility definitions for removed functions

3 months ago(vhdl-run-when-idle): Don't use `timer--triggered`
Stefan Monnier [Wed, 31 Jul 2024 08:52:08 +0000 (04:52 -0400)]
(vhdl-run-when-idle): Don't use `timer--triggered`

* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle): Avoid relying
needlessly on internal accessor and fix last change to make sure
we always create a timer.

(cherry picked from commit 44c9c2c8456117625ec8a54d4a6908404e483f83)

3 months agoRe-enable displaying `han' characters on Android
Po Lu [Wed, 31 Jul 2024 00:32:24 +0000 (08:32 +0800)]
Re-enable displaying `han' characters on Android

* lisp/international/fontset.el (script-representative-chars)
<han>: Remove several characters that were just recently
introduced into unicode and are consequently absent from many
fonts, so that they may match font specs specifying scripts
rather than QClang in the default fontset.

(cherry picked from commit bf0aeaa0d7a1581a095aa423e75d0d71cceb28cd)

3 months agoNew variable treesit-language-remap-alist (bug#72388)
Yuan Fu [Sat, 27 Jul 2024 23:18:13 +0000 (16:18 -0700)]
New variable treesit-language-remap-alist (bug#72388)

* doc/lispref/parsing.texi (Using Parser): Manual entry for the new
variable.
* src/treesit.c (resolve_language_symbol): New function.
(Ftreesit_parser_create, Ftreesit_parser_list): Resolve language before
using it.
(Vtreesit_language_remap_alist): New variable.

(cherry picked from commit a7e3181e2f7adb928d63a8878a11849818ba321c)

3 months agoFix filling in c-ts-mode (bug#72116)
Yuan Fu [Sat, 27 Jul 2024 21:50:19 +0000 (14:50 -0700)]
Fix filling in c-ts-mode (bug#72116)

The previous fix introduced a regression in the case when there's only a
single line in the block comment.  In that case we don't want to add a
start at the second line:

/* foo foo foo */ should => /* foo foo
                               foo */

rather than   /* foo foo
               * foo */

This commit fixes that.

* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Don't mask the /*.
(c-ts-common--adaptive-fill-prefix): New function.
(c-ts-common-comment-setup): Don't set adaptive-regexp, change
adaptive-fill-first-line-regexp to work with the new
adaptive-fill-function.
* test/lisp/progmodes/c-ts-mode-resources/filling.erts: New tests

(cherry picked from commit 74bb1e5897f4532fbdefddada28258a8d3d5c95f)

3 months ago"Separate" tree-sitter parser list for indirect buffers
Yuan Fu [Sat, 27 Jul 2024 05:33:17 +0000 (22:33 -0700)]
"Separate" tree-sitter parser list for indirect buffers

When create a parser for the indirect buffer, set the buffer field of
the parser to the indirect buffer, but add the parser to the base
buffer's parser list.  This way, all the parsers still get buffer
updates, but indirect buffer's parsers can have different narrowing than
the parsers of the base buffer.

When returning the parser list of a buffer, do filtering and only return
the parser for that buffer.

From user's POV, indirect buffers appear to have their own parser list.

* doc/lispref/parsing.texi (Using Parser): Remove the text describing
indirect buffer's special case.
* src/treesit.c (Ftreesit_parser_create): When create a parser for the
indirect buffer, set the buffer field of the parser to the indirect
buffer, but add the parser to the base buffer's parser list.
(Ftreesit_parser_list): Filter parser list, only return parsers for this
buffer.

xx

(cherry picked from commit e4cd26defc0e1a6deafbe4b2310ebdb3ffa4578f)

3 months agoDefine custom var rmail-summary-starting-message.
Richard Stallman [Tue, 30 Jul 2024 21:42:52 +0000 (17:42 -0400)]
Define custom var rmail-summary-starting-message.

* lisp/mail/rmailsum.el (rmail-summary-starting-message):
New custom variable.
(rmail-new-summary-1): Use it.

(cherry picked from commit a2c439db687774f7b57959c39560993579c5d1bd)

3 months agovhdl-mode: don't use timer accessors in XEmacs
Mattias Engdegård [Tue, 30 Jul 2024 20:34:39 +0000 (22:34 +0200)]
vhdl-mode: don't use timer accessors in XEmacs

* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle):
No need to activate a newly created idle timer; keep it as
compatibility (or voodoo) code for XEmacs which probably doesn't have
the timer accessors anyway.

(cherry picked from commit b6c18817a259ec10df5bd741a6eef6842199e95b)

3 months ago; Add Harald Jörg as maintainer of cperl-mode
Harald Jörg [Tue, 30 Jul 2024 11:55:19 +0000 (13:55 +0200)]
; Add Harald Jörg as maintainer of cperl-mode

* admin/MAINTAINERS: Add Harald Jörg as maintainer of cperl-mode

(cherry picked from commit a8ac8650abb440119becad64cfd5ee534c6e413e)

3 months ago; cperl-mode.el: Make it checkdoc clean
Harald Jörg [Mon, 29 Jul 2024 19:24:14 +0000 (21:24 +0200)]
; cperl-mode.el: Make it checkdoc clean

This commit does only docstrings, no functional changes at all.

* lisp/progmodes/cperl-mode.el: Docstrings are added where missing.
All parameters are documented.  The first line is a complete sentence.
All docstring lines are 80 characters or less.

(cherry picked from commit cfadd047a27f5f7e96af3b3ff8947f32b048cb0c)

3 months ago* lisp/tab-bar.el (tab-bar-show-inactive-group-tabs): New defcustom.
Juri Linkov [Mon, 29 Jul 2024 18:27:30 +0000 (21:27 +0300)]
* lisp/tab-bar.el (tab-bar-show-inactive-group-tabs): New defcustom.

(tab-bar-format-tabs-groups): Use it (bug#71939).
Suggested by Ship Mints <shipmints@gmail.com>.

(cherry picked from commit 63e609f6aa1e058c709b84cf132fab7ce7ecb5ee)

3 months agoImprove handling of menu-bar menus in 'help-complete-keys'
Eshel Yaron [Tue, 30 Jul 2024 17:57:29 +0000 (19:57 +0200)]
Improve handling of menu-bar menus in 'help-complete-keys'

3 months agoFix sporadic crashes and `select' failures in dumped images
Po Lu [Mon, 29 Jul 2024 02:37:16 +0000 (10:37 +0800)]
Fix sporadic crashes and `select' failures in dumped images

* src/process.c (init_process_emacs) [HAVE_UNEXEC]: Clear
dumped values of child_signal_read_fd and child_signal_write_fd.

(cherry picked from commit 5cf64d8377ad43f9a7b0ad28cbb4a494b403806b)

3 months agoCorrect display of Doc View documents after tab switching
Po Lu [Mon, 29 Jul 2024 01:19:48 +0000 (09:19 +0800)]
Correct display of Doc View documents after tab switching

* lisp/doc-view.el (doc-view-new-window-function): Prevent
creation of duplicate overlays for the same window after a
window configuration change occasions a call to i-m-r-winprops.

(cherry picked from commit a475360af980673fe97a701633375c3a308364c6)

3 months ago; Skip commit d50c82f3e98e5418e5a42b48162bc26028309b89
Eshel Yaron [Mon, 29 Jul 2024 18:12:02 +0000 (20:12 +0200)]
; Skip commit d50c82f3e98e5418e5a42b48162bc26028309b89

3 months agoAdd new optional argument NO-HIGHLIGHT to query-replace-read-args
Visuwesh [Sun, 28 Jul 2024 04:57:33 +0000 (10:27 +0530)]
Add new optional argument NO-HIGHLIGHT to query-replace-read-args

* lisp/replace.el (query-replace-read-args): Add new optional
argument to disable regexp highlighting.

* lisp/dired-aux.el (dired-do-query-replace-regexp)
(dired-do-replace-regexp-as-diff)
(dired-do-find-regexp-and-replace): Revert last change, and use
the new argument instead.  (bug#72147)

(cherry picked from commit 99704a7b41f9c3c6c2215cf5c47bc161df05cfa4)

3 months ago* lisp/language/misc-lang.el ("Tifinagh"): Fix `language-info-alist'.
Juri Linkov [Sun, 28 Jul 2024 06:44:44 +0000 (09:44 +0300)]
* lisp/language/misc-lang.el ("Tifinagh"): Fix `language-info-alist'.

(cherry picked from commit 0b565d97064a6979f0102f4133537af7e633dc2d)

3 months agoUse 'unwind-protect' to ensure that Eshell always closes I/O handles
Jim Porter [Sat, 20 Jul 2024 01:02:16 +0000 (18:02 -0700)]
Use 'unwind-protect' to ensure that Eshell always closes I/O handles

See bug#72220.

* lisp/eshell/esh-cmd.el (eshell-with-handles): New macro...
(eshell-commands): ... use it.
(eshell-with-copied-handles): Remove STEAL-P and allow multiple body
forms (this is an incompatible change, but the macro is currently
internal despite the name).
(eshell-parse-command, eshell-do-pipelines)
(eshell-do-pipelines-synchronously, eshell--invoke-command-directly-p):
Remove handle stealing.
(eshell-structure-basic-command, eshell-do-command)
(eshell-lisp-command): Remove 'eshell-close-handles'.
(eshell-protect): Make obsolete.
(eshell-rewrite-for-command, eshell-rewrite-while-command)
(eshell-rewrite-if-command, (eshell-parse-pipeline): Remove
'eshell-protect'.

* lisp/eshell/esh-io.el (eshell-duplicate-handles): Make STEAL-P
obsolete.

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Call
'eshell-protect-handles' one more time.  Remove 'eshell-close-handles'.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Reimplement
$<COMMAND> form using 'eshell-with-handles'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/command-not-found/pipeline): New test.

* test/lisp/eshell/em-tramp-tests.el
(em-tramp-test/should-replace-command): Adjust check for
'eshell-with-copied-handles'.

(cherry picked from commit 50339b38fdef31982744bdb8b51838012dd4ef47)

3 months ago; Improve correctness of 'eshell-do-eval' in some edge cases
Jim Porter [Sat, 20 Jul 2024 01:07:36 +0000 (18:07 -0700)]
; Improve correctness of 'eshell-do-eval' in some edge cases

* lisp/eshell/esh-cmd.el (eshell-do-eval): Make sure that replacing 'if'
forms returns the correct result, and evaluate to 'nil' for 'progn'
forms with no body.

(cherry picked from commit 8bfdee8689f8b99f353179898e922ec3d975a113)

3 months ago; Skip commit 469bc7c96868e3cd31e03603366f32b88070f887
Eshel Yaron [Mon, 29 Jul 2024 17:13:16 +0000 (19:13 +0200)]
; Skip commit 469bc7c96868e3cd31e03603366f32b88070f887

3 months ago; * admin/MAINTAINERS: Note what I maintain
Philip Kaludercic [Sat, 27 Jul 2024 08:30:48 +0000 (10:30 +0200)]
; * admin/MAINTAINERS: Note what I maintain

(cherry picked from commit 367c0490a8298ec156421bf265f6e091aa2807c7)

3 months agotmm.el: Simplify
Eshel Yaron [Mon, 29 Jul 2024 08:56:02 +0000 (10:56 +0200)]
tmm.el: Simplify

3 months agoExtract Kubed to separate Git repository
Eshel Yaron [Sun, 28 Jul 2024 14:16:13 +0000 (16:16 +0200)]
Extract Kubed to separate Git repository

See https://eshelyaron.com/kubed.html

3 months agoMake sure SES always writes non abbreviated expressions to data area.
Vincent Belaïche [Sat, 27 Jul 2024 16:33:00 +0000 (18:33 +0200)]
Make sure SES always writes non abbreviated expressions to data area.

Corrupted data area would occur when print-length or print-level are non nil.

(cherry picked from commit e8f38d1364a8879c91cb810160a5d2d5f7437bde)

3 months ago* lisp/net/kubed.el (kubed-define-resource): Simplify a bit
Eshel Yaron [Sat, 27 Jul 2024 20:02:30 +0000 (22:02 +0200)]
* lisp/net/kubed.el (kubed-define-resource): Simplify a bit

3 months agoNew commands 'kubed-rename-context' and 'kubed-display-config'
Eshel Yaron [Sat, 27 Jul 2024 18:47:10 +0000 (20:47 +0200)]
New commands 'kubed-rename-context' and 'kubed-display-config'

3 months agoReduce type checks in arithcompare
Mattias Engdegård [Sat, 27 Jul 2024 12:10:40 +0000 (14:10 +0200)]
Reduce type checks in arithcompare

* src/data.c (coerce_marker, not_number_or_marker): New.
(arithcompare): Don't use NUMBERP to check types up-front since we
are going to branch on types anyway.

(cherry picked from commit 7753a597fb84ce03ebcab87ec57553a06f6327e1)

3 months ago* src/data.c (arithcompare): Simplify fixnum/bignum comparisons.
Mattias Engdegård [Sat, 27 Jul 2024 11:38:57 +0000 (13:38 +0200)]
* src/data.c (arithcompare): Simplify fixnum/bignum comparisons.

Noticed by Pip Cet.

(cherry picked from commit e5a94491170bdde62c1afa19ec86e16a07429395)

3 months agoRevert "* test/lisp/net/tramp-tests.el (tramp-test42-utf8): Don't test "Tifinagh"."
Michael Albinus [Sat, 27 Jul 2024 10:49:12 +0000 (12:49 +0200)]
Revert "* test/lisp/net/tramp-tests.el (tramp-test42-utf8): Don't test "Tifinagh"."

This reverts commit b9f2ef2a333fa7c813913dbba798c5ba8778eefd.

(cherry picked from commit 829ebbd1d1da80e327c476d0cb173ae04313eaba)

3 months ago* lisp/language/misc-lang.el ("Tifinagh"): Fix `sample-text'.
Michael Albinus [Sat, 27 Jul 2024 10:48:47 +0000 (12:48 +0200)]
* lisp/language/misc-lang.el ("Tifinagh"): Fix `sample-text'.

(cherry picked from commit 10b91328d96b19f0f9b775d88f319abdd7d46c0a)

3 months agoSimplify and speed up numeric comparisons
Mattias Engdegård [Sat, 20 Jul 2024 11:12:19 +0000 (13:12 +0200)]
Simplify and speed up numeric comparisons

This makes comparison functions (=, /=, <, <=, >, >=, min, max) quite
a bit faster (10-20 %).  Bytecode ops on fixnums are not affected,
nor is `value<`.

* src/data.c (arithcompare): Simplify the code to reduce the number of
branches.  Remove the comparison code argument; instead, return the
relation encoded as bits, which can be tested cheaply.  All callers
adapted.
* src/lisp.h (enum Arith_Comparison): Remove.
(Cmp_Bit_*, cmp_bits_t): New.

(cherry picked from commit 2fd38e5c496a2351a25e95df37a7900f6f80f22f)

3 months agokubed.el: Add a couple of TODOs
Eshel Yaron [Sat, 27 Jul 2024 16:22:39 +0000 (18:22 +0200)]
kubed.el: Add a couple of TODOs

3 months ago(kubed-kubectl-command): Fix handling of transient scope
Eshel Yaron [Sat, 27 Jul 2024 16:20:22 +0000 (18:20 +0200)]
(kubed-kubectl-command): Fix handling of transient scope

3 months agokubed.el: Support ingress resources
Eshel Yaron [Sat, 27 Jul 2024 16:15:36 +0000 (18:15 +0200)]
kubed.el: Support ingress resources

3 months agokubed.el: Support ingressclass resources
Eshel Yaron [Sat, 27 Jul 2024 16:13:34 +0000 (18:13 +0200)]
kubed.el: Support ingressclass resources

3 months ago* lisp/net/kubed.el (kubed-create-cronjob): Fix typos
Eshel Yaron [Sat, 27 Jul 2024 16:12:15 +0000 (18:12 +0200)]
* lisp/net/kubed.el (kubed-create-cronjob): Fix typos

3 months ago(kubed-define-resource): New keyword argument :plural
Eshel Yaron [Sat, 27 Jul 2024 15:12:04 +0000 (17:12 +0200)]
(kubed-define-resource): New keyword argument :plural

3 months agokubed.el: Refine 'kubed-create-cronjob'
Eshel Yaron [Sat, 27 Jul 2024 15:06:46 +0000 (17:06 +0200)]
kubed.el: Refine 'kubed-create-cronjob'

3 months agoNew commands 'kubed{-transient}-apply'
Eshel Yaron [Sat, 27 Jul 2024 12:22:58 +0000 (14:22 +0200)]
New commands 'kubed{-transient}-apply'

3 months agokubed.el: Fix typo
Eshel Yaron [Sat, 27 Jul 2024 09:54:30 +0000 (11:54 +0200)]
kubed.el: Fix typo

3 months ago; Skip commit 156a3ba4f9ef9f7a401cfd3ca118152169f0ddcf
Eshel Yaron [Sat, 27 Jul 2024 09:30:55 +0000 (11:30 +0200)]
; Skip commit 156a3ba4f9ef9f7a401cfd3ca118152169f0ddcf

3 months ago* test/lisp/net/tramp-tests.el (tramp-test42-utf8): Don't test "Tifinagh".
Michael Albinus [Sat, 27 Jul 2024 08:26:14 +0000 (10:26 +0200)]
* test/lisp/net/tramp-tests.el (tramp-test42-utf8): Don't test "Tifinagh".

(cherry picked from commit b9f2ef2a333fa7c813913dbba798c5ba8778eefd)