Po Lu [Mon, 10 Mar 2025 12:43:02 +0000 (20:43 +0800)]
; Fix compiler warning in html-ts-mode.el
* lisp/textmodes/html-ts-mode.el (treesit-node-end)
(treesit-node-start): Declare.
(cherry picked from commit
7a72589847107f26d0ebdc22f9cfa61962d02af4)
Mauro Aranda [Mon, 10 Mar 2025 10:45:21 +0000 (07:45 -0300)]
Fix Package name for cond-star
* lisp/emacs-lisp/cond-star.el: Fix name. (Bug#76861)
(cherry picked from commit
6d99b74ef7701f00ccf6fe76ba7dbcbde00e241a)
Harald Jörg [Mon, 10 Mar 2025 10:40:10 +0000 (11:40 +0100)]
; cperl-mode.el: Improve docstring cperl-fontify-trailer
* lisp/progmodes/cperl-mode.el (cperl-fontify-trailer): Document
that this setting also affects indentation (Bug#76868).
(cherry picked from commit
442d16266ee1c83ab56809acb414ac7b41c56f42)
Sean Whitton [Mon, 10 Mar 2025 09:13:14 +0000 (17:13 +0800)]
vc-setup-buffer: Don't set current buffer as parent (bug#59457)
* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Don't set the
current buffer as parent (bug#59457).
(cherry picked from commit
6d62a293aff9af73d5f53ba0c7f226f29c6e35a2)
Sean Whitton [Mon, 10 Mar 2025 09:08:04 +0000 (17:08 +0800)]
vc-setup-buffer: Kill local file-local-variables-alist too
* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Kill
file-local-variables-alist variable, too (bug#44698).
* lisp/vc/vc.el (vc-log-internal-common): Don't call
kill-all-local-variables here, that's vc-setup-buffer's job.
(cherry picked from commit
e09a80143d5952b1d1d1ade2b0f2e217835e917d)
Martin Rudalics [Mon, 10 Mar 2025 08:33:17 +0000 (09:33 +0100)]
Fix handling of frame position values
* src/frame.c (tty_child_pos_param): Handle additional position
values. New SIZE argument.
(tty_child_frame_rect): Process size before position.
(Fmake_terminal_frame): Do not store calculated size/position
values in parameters to avoid that a negative absolute position
is later interpreted as position relative to bottom/right edge
of parent.
(Fmodify_frame_parameters): For tty child frames process size
before position values so the latter can take a new size into
account.
* src/frame.h: Adjust declaration of tty_child_pos_param.
* src/gtkutil.c (xg_set_geometry): Handle negative frame
position specifications.
* src/msdos.c (IT_set_frame_parameters): For tty child frames
process size before position parameters.
* src/xfns.c (x_window): In the non-GTK toolkit variant leave
negative position values unchanged - the toolkit should know how
to handle them. Process child frame position parameters
separately. In the non-toolkit variant process child frame
parameters separately.
(cherry picked from commit
cbad6215cf4fef826fa9c3600765a7c696872eaf)
Po Lu [Mon, 10 Mar 2025 04:44:26 +0000 (12:44 +0800)]
Reenable mmap-based dump allocation on wide int configurations
* src/pdumper.c (VM_SUPPORTED): Don't define to 0 when
!USE_LSB_TAG if WIDE_EMACS_INT.
(cherry picked from commit
94ba1b097ed12b9b77ecef4899c18b46b7e2dd36)
Po Lu [Mon, 10 Mar 2025 04:41:12 +0000 (12:41 +0800)]
Fix bug#76805
* src/xterm.c (x_fast_mouse_position): Clear the mouse_moved
flag whether or not mouse motion is reported, to avoid repeated
polling for mouse movement. (bug#76806)
(cherry picked from commit
ab5bfcebddf4c0613ef352231628d4034c8cb178)
Po Lu [Mon, 10 Mar 2025 03:31:50 +0000 (11:31 +0800)]
; Fix function declarations in frame.el
* lisp/frame.el (widget-field-text-end, widget-field-start)
(widget-get): Correct function declarations.
(cherry picked from commit
d343a80e6e1854ffdbea1378f0bc4f836fd01ea4)
Po Lu [Mon, 10 Mar 2025 03:28:38 +0000 (11:28 +0800)]
Don't claim that xftfont is being considered for deletion
* configure.ac: Don't claim that Xft is being considered for
deletion or that recent releases are buggy, or imply that
HarfBuzz support is exclusive to Cairo.
(cherry picked from commit
02681b0fbf02913cd474e082f67649f14115e4a6)
Stefan Monnier [Mon, 10 Mar 2025 02:07:39 +0000 (22:07 -0400)]
(makefile-dependency-regex): Fix bug#76759
* lisp/progmodes/make-mode.el (makefile-dependency-regex):
Decompose the regexp to be more understandable, and then change
it so the target part can't accidentally match a TAB.
* test/lisp/progmodes/make-mode-tests.el (make-mode-tests--bug17400):
New test.
(cherry picked from commit
c4a282316633bdc6a21077350650ecd97868934c)
Po Lu [Mon, 10 Mar 2025 01:43:13 +0000 (09:43 +0800)]
; Correct typos in commentary and error messages
* src/lisp.h (USE_LSB_TAG):
* src/pdumper.c (pdumper_load): Correct typos in commentary and
error messages.
(cherry picked from commit
5176eeb3003a4d31053b07a9c6045da723fa257d)
Mauro Aranda [Sun, 9 Mar 2025 22:07:40 +0000 (19:07 -0300)]
Provide better completion for customizing frame parameters
* lisp/frame.el (frame--special-parameters): New const.
(frame--complete-parameter-value): New function.
(initial-frame-alist, minibuffer-frame-alist): Use them in
:type. (Bug#39143)
* lisp/cus-start.el (default-frame-alist): Use them here as well.
* src/frame.c (frame_parms): Add comment to try to keep
frame--special-parameters updated.
(cherry picked from commit
0861da138b91b936a1b307fd59622d98f9b22cc6)
Stefan Kangas [Sun, 9 Mar 2025 18:34:00 +0000 (19:34 +0100)]
Rewrite ERT manual introduction
* doc/misc/ert.texi (Top): Rewrite for clarity. Don't give such
prominent mention to to TDD or JUnit, references which now seem dated.
(cherry picked from commit
7d0d61d8549904f460c5711b93ed359f853fb4c3)
Stefan Kangas [Sun, 9 Mar 2025 17:28:53 +0000 (18:28 +0100)]
; Fix byte-compiler warning
(cherry picked from commit
731af8747cb07aea532d9e9fd246857a88625a44)
Stefan Kangas [Sat, 8 Mar 2025 17:24:26 +0000 (18:24 +0100)]
Make second arg to defvar-local optional
This change allows declaring a variable both special
and buffer-local like so:
(defvar-local foo)
* lisp/subr.el (defvar-local): Make second argument optional.
* test/lisp/subr-tests.el (subr-test-defvar-local): New test.
* doc/lispref/variables.texi (Creating Buffer-Local): Document above change.
* etc/NEWS:
* lisp/mb-depth.el (minibuffer-depth-overlay):
* lisp/minibuf-eldef.el (minibuf-eldef-initial-input)
(minibuf-eldef-initial-buffer-length)
(minibuf-eldef-showing-default-in-prompt, minibuf-eldef-overlay):
* lisp/misc.el (list-dynamic-libraries--loaded-only-p):
* lisp/simple.el (minibuffer-history-isearch-message-overlay): Use
above new one-argument form of 'defvar-local'.
(cherry picked from commit
ce03bf252ae9bff28a6def163cb3f4fa102e691a)
Stefan Kangas [Sat, 8 Mar 2025 13:00:42 +0000 (14:00 +0100)]
Use lisp-data-mode in recentf-save-file
* lisp/recentf.el (recentf-save-file-header): Add cookie to use
lisp-data-mode in recentf-save-file.
(cherry picked from commit
a6523599f985eae5f884834bf15bd714c1cf557b)
Stefan Kangas [Sat, 8 Mar 2025 12:41:22 +0000 (13:41 +0100)]
Use .eld for some relevant cache and data files
* lisp/bookmark.el (bookmark-default-file):
* lisp/net/nsm.el (nsm-settings-file):
* lisp/progmodes/project.el (project-list-file):
* lisp/saveplace.el (save-place-file): Rename files to have the file
suffix ".eld". This change is backwards-compatible.
(cherry picked from commit
3396f0e5678cf1edb0056917182b30927a35335b)
Stefan Kangas [Sat, 8 Mar 2025 12:02:58 +0000 (13:02 +0100)]
Make locate-user-emacs-file accept a list too
This can be used to migrate to a new name, while also keeping
backwards-compatible support for an old name.
* lisp/files.el (locate-user-emacs-file): Accept a list as the
NEW-NAME argument.
* test/lisp/files-tests.el (files-test-locate-user-emacs-file): New
test for the above.
(cherry picked from commit
87db670d045bea2d90139b1f741eea8db7c193ea)
Stefan Kangas [Sat, 8 Mar 2025 11:23:50 +0000 (12:23 +0100)]
Add test for 'locate-user-emacs-file'
* test/lisp/files-tests.el
(files-test-locate-user-emacs-file): New test.
(cherry picked from commit
9c6e8589ee5eae0f793994c96d434b77f54749de)
Harald Jörg [Sun, 9 Mar 2025 15:26:51 +0000 (16:26 +0100)]
; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
* lisp/progmodes/cperl-mode.el
(cperl-after-block-and-statement-beg): Recognize _ as part of a
Perl symbol. Fixes Bug#76851
* test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts
Two new test cases around the edges of Bug#76851
(cherry picked from commit
b2f124f2a8887a3bf2e68ec09500361a2d4d0850)
Po Lu [Sun, 9 Mar 2025 15:02:21 +0000 (23:02 +0800)]
Re-port to 32-bit systems without alignment primitives
* configure.ac (ALIGNOF_INT, ALIGNOF_LONG, ALIGNOF_LONG_LONG):
New variables.
(emacs_cv_alignas_unavailable): Define if alignas and structure
alignment primitives are unavailable. In such an environment,
the MSB tagging scheme must be enabled, as must the GNU malloc.
* msdos/sed2v2.inp: Adjust correspondingly.
* src/alloc.c (union emacs_align_type): Remove types which
contain flexible array members. The address of a field
subsequent to an aggregate with flexible array members cannot
validly be taken.
(mark_memory) [!USE_LSB_TAG && !WIDE_EMACS_INT]: Strip type bits
before scanning memory.
* src/emacs.c (main):
* src/eval.c (Fautoload_do_load):
* src/fns.c (Frequire): Rename a number of illogically named
fields.
* src/lisp.h (ALIGNOF_EMACS_INT): Define to the natural
alignment of EMACS_INT.
(IDEAL_GCALIGNMENT): New macro.
(USE_LSB_TAG): Disable if no alignment specifiers are available,
WIDE_EMACS_INT is undefined, and the natural alignment of
EMACS_INT falls short of LSB tagging's requirements.
(gflags): Rename illogically named fields and don't define them
as bitfields, which runs afoul of certain compiler issues.
(will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
(dumped_with_pdumper_p): Adjust accordingly.
* src/pdumper.c (VM_SUPPORTED): Define to 0 when !USE_LSB_TAG.
It is better to read dump files into the heap by hand than to be
supplied with an address that is not representable.
(_dump_object_start_pseudovector): Rename to
dump_object_start_pseudovector, to avoid encroaching on reserved
names.
(START_DUMP_PVEC): Adjust correspondingly.
(dump_mmap_contiguous_vm): Preserve errno around failure
cleanup.
(dump_bitset_bit_set_p): Work around certain compiler issues.
(pdumper_load) [!USE_LSB_TAG]: Reject dump file allocations
that are not representable as Lisp_Objects.
Tested on i386-unknown-solaris2.10, sparc-sun-solaris2.10.
(cherry picked from commit
a5f8ce9f1eae29f87fe13adb61bd4e15faa628a2)
Eshel Yaron [Wed, 12 Mar 2025 18:46:35 +0000 (19:46 +0100)]
Eli Zaretskii [Sun, 9 Mar 2025 13:02:39 +0000 (15:02 +0200)]
Document return values of the various read-* functions
* lisp/textmodes/string-edit.el (read-string-from-buffer):
* lisp/simple.el (read-from-kill-ring, read-shell-command)
(read-signal-name):
* lisp/replace.el (read-regexp-case-fold-search):
* lisp/auth-source.el (read-passwd):
* lisp/subr.el (read-key, read-number):
* lisp/minibuffer.el (read-file-name, read-no-blanks-input):
* lisp/international/mule-cmds.el (read-multilingual-string):
* lisp/language/japan-util.el (read-hiragana-string):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-mode, read-file-local-variable-value):
* lisp/faces.el (read-face-font, read-face-name):
* lisp/simple.el (read-extended-command):
* lisp/env.el (read-envvar-name):
* lisp/files.el (read-directory-name):
* lisp/faces.el (read-color):
* lisp/international/mule-diag.el (read-charset):
* lisp/emacs-lisp/map-ynp.el (read-answer):
* src/coding.c (Fread_coding_system)
(Fread_non_nil_coding_system):
* src/minibuf.c (Fread_command, Fread_from_minibuffer):
* src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc
fixes.
(cherry picked from commit
59d1aac49dfdc49e34be5964f547db0cfa7e127b)
Mauro Aranda [Sun, 9 Mar 2025 12:22:29 +0000 (09:22 -0300)]
Allow changing theme settings without reloading it
* lisp/custom.el (custom--should-apply-setting): Return non-nil
for an enabled theme. Provide docstring. This allows for users
to reevaluate a custom-theme-set-* function and see the settings
applied right away. (Bug#76685)
(custom--inhibit-theme-enable): Adapt docstring.
* etc/NEWS: Announce the new behavior.
(cherry picked from commit
203747b87fbf976fda887d0652b05685447b8d65)
Eshel Yaron [Wed, 12 Mar 2025 18:41:23 +0000 (19:41 +0100)]
Gerd Möllmann [Sun, 9 Mar 2025 09:04:41 +0000 (10:04 +0100)]
Fix drawing to the bottom-right corner of terminals
* src/term.c (tty_write_glyphs_1): Renamed from tty_write_glyphs. Don't
check if writing the bottom-right corner.
(tty_write_glyphs): New function handling case of writing to the
bottom-right corner, and otherwise calling tty_write_glyphs_1.
(cherry picked from commit
6fb68f4310d808827b83da053fbc112b316b7757)
Mauro Aranda [Sun, 9 Mar 2025 11:10:17 +0000 (08:10 -0300)]
Guard against user saving ediff-meta-diff-buffer
* lisp/vc/ediff-mult.el (ediff-collect-custom-diffs): If the
diff buffer is visiting a file, create a new buffer. (Bug#3348)
* test/lisp/vc/ediff-mult-tests.el: New test file.
(cherry picked from commit
d01b7c85fea3e177df112513af150cead4bbb3e5)
Gerd Möllmann [Sun, 9 Mar 2025 10:47:35 +0000 (11:47 +0100)]
macOS: Don't constrainFrameRect for child frames
* src/nsterm.m ([EmacsWindow constrainFrameRect:toScreen:]): Don't do
anything for child frames.
(cherry picked from commit
ba20f73d8e0173a37fbdd2efe72a7a3b0d62dfa5)
Ben Scuron [Sat, 8 Mar 2025 03:29:36 +0000 (22:29 -0500)]
Fix TAGS regeneration with Universal Ctags
* lisp/progmodes/etags-regen.el (etags-regen--append-tags): Move
the "-o" option to before the filename, as Ctags doesn't allow
it to follow the file name. (Bug#76855)
Copyright-paperwork-exempt: yes
(cherry picked from commit
35c7837c6616b3a2b845ba06d3ed797bb12fb749)
Stefan Kangas [Fri, 7 Mar 2025 17:10:53 +0000 (18:10 +0100)]
Explicitly document read-string return value
* src/minibuf.c (Fread_string): Document return value explicitly.
Better document PROMPT argument, and reflow docstring. (Bug#76797)
(cherry picked from commit
af8017b23f6d94266dd05dcd084c8d7656393db8)
kobarity [Sun, 2 Mar 2025 08:37:36 +0000 (17:37 +0900)]
Improve docstrings of python.el import management
Added notes that when adding import statements for a file that
does not belong to a project, it may take some time to find
candidate import statements in the default directory.
* lisp/progmodes/python.el (python-add-import)
(python-fix-imports): Improve docstring. (Bug#74894)
(cherry picked from commit
cf03c2b6093d3b555f758f033610a6015378de57)
Eli Zaretskii [Fri, 7 Mar 2025 08:45:50 +0000 (10:45 +0200)]
; Improve doc strings of Speedbar
* lisp/speedbar.el (speedbar-extension-list-to-regex)
(speedbar-query-confirmation-method)
(speedbar-show-unknown-files, speedbar-use-imenu-flag)
(speedbar-track-mouse-flag, speedbar-default-position)
(speedbar-sort-tags, speedbar-directory-button-trim-method)
(speedbar-smart-directory-expand-flag)
(speedbar-hide-button-brackets-flag, speedbar-vc-do-check)
(speedbar-vc-indicator, speedbar-obj-do-check)
(speedbar-frame-mode, speedbar-handle-delete-frame)
(speedbar-show-info-under-mouse, speedbar-item-info)
(speedbar-item-rename, speedbar-item-delete)
(speedbar-initial-keymap, speedbar-insert-files-at-point)
(speedbar-generic-list-positioned-group-p)
(speedbar-generic-list-tag-p, speedbar-check-read-only)
(speedbar-tag-file, speedbar-tag-expand)
(speedbar-find-file-in-frame, speedbar-parse-tex-string)
(speedbar-buffer-click): Doc fixes.
(cherry picked from commit
01bcc6961a6b0db36c371c9016d6eb00a1ae8ea2)
Eli Zaretskii [Thu, 6 Mar 2025 13:49:27 +0000 (15:49 +0200)]
Avoid warnings about 'image-scaling-factor' in builds --without-x
* lisp/cus-start.el (standard): Exclude 'image-*' options if Emacs
was built without GUI support. (Bug#76716)
(cherry picked from commit
bd9c76ab175cde67fc98849d9d216c2ee4373042)
Eshel Yaron [Wed, 12 Mar 2025 18:36:30 +0000 (19:36 +0100)]
; * bookmark.el: Minor cleanup
Eshel Yaron [Tue, 11 Mar 2025 10:16:49 +0000 (11:16 +0100)]
completion-preview.el: Provide an API.
Add new functions for summoning and dismissing the
completion preview programmatically. This lets Lisp code
leverage the completion preview UI for different use cases.
* lisp/completion-preview.el (completion-preview-show): New
function.
(completion-preview-hide): Rename to
'completion-preview--hide', use old name for new public API
function.
(completion-preview--hide): New name, see above.
(completion-preview-active-mode)
(completion-preview--update): Use new functions.
Rudolf Adamkovič [Fri, 28 Feb 2025 13:54:14 +0000 (14:54 +0100)]
Make sure Comint minibuffer password prompts end with space
* lisp/comint.el (comint-watch-for-password-prompt): Add a trailing
space character to the minibuffer password prompt, if it does not
contain one already, per the minibuffer UI conventions.
Bug#76604
(cherry picked from commit
41c1c6ffac3bc3db9818ed8e0cc857c72b06d806)
Eshel Yaron [Sun, 9 Mar 2025 10:34:39 +0000 (11:34 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:34:33 +0000 (11:34 +0100)]
Arash Esbati [Sun, 9 Mar 2025 08:12:37 +0000 (09:12 +0100)]
; Add debug spec
* lisp/textmodes/reftex-parse.el (reftex-with-special-syntax): Add
debug spec and docstring.
(cherry picked from commit
31ebc00ece7d7234868a2a1e95f138473ea6646c)
Mauro Aranda [Sat, 15 Feb 2025 12:43:58 +0000 (09:43 -0300)]
Action button when point is just after it
* lisp/cus-edit.el (Custom-newline): If no button at point,
check for a button before point. (Bug#72341)
(cherry picked from commit
8bea0aae3bb59bd0452c61f856d74650838f6a45)
Christoph Badura [Sun, 26 Jan 2025 21:48:11 +0000 (22:48 +0100)]
VC: New hook to strip CVS template lines when committing
Add a hook function to strip all lines beginning with "CVS:" from the
commit message as CVS does. Do this only if 'log-edit-vc-backend' is
'CVS'. (Bug#72341)
* lisp/vc/log-edit.el
(log-edit-done-strip-cvs-lines): New command.
(log-edit-done-hook): Add it as an option.
* test/lisp/vc/log-edit-tests.el
(log-edit-done-strip-cvs-lines-helper): New function.
(log-edit-done-strip-cvs-lines-cvs)
(log-edit-done-strip-cvs-lines-non-cvs)
(log-edit-done-strip-cvs-lines-only-cvs-colon-blank)
(log-edit-done-strip-cvs-lines-only-cvs-colon): New test cases.
* etc/NEWS: Mention log-edit-done-strip-cvs-lines.
(cherry picked from commit
00e284fc52b44fc3cb435a5d17ce58af1b753a34)
Po Lu [Sun, 9 Mar 2025 05:22:59 +0000 (13:22 +0800)]
; * java/org/gnu/emacs/EmacsWindow.java (viewLayout): Typo in comment.
(cherry picked from commit
4db604f3751ffb6a1fc3fd4277445a8f94cec13f)
Po Lu [Sun, 9 Mar 2025 05:20:02 +0000 (13:20 +0800)]
Avoid reserved names in sfnt.c
* src/sfnt.c (_MIN, _MAX): Rename to INS_MIN and INS_MAX.
(sfnt_interpret_run): Adjust accordingly.
(cherry picked from commit
1e289586fc08615031783a28e1e197071b734aaf)
john muhl [Wed, 26 Feb 2025 16:31:24 +0000 (10:31 -0600)]
Use TS to support 'hs-minor-mode' in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Add list type to
'treesit-thing-settings'.
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
Remove regular expression based implementation.
* test/lisp/progmodes/lua-ts-mode-resources/hide-show.lua: New file.
* test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-hideshow):
Add test. (Bug#76693)
(cherry picked from commit
2f1b1414f78e471f1c4e852c1cbd8320cb0fa60d)
Michael Heerdegen [Sun, 18 Sep 2022 10:26:08 +0000 (12:26 +0200)]
Correct (debug body) edebug specs
This fixes Bug#69865.
* lisp/org/ob-exp.el (org-babel-exp--at-source):
* test/lisp/dired-tests.el (dired-test-with-temp-dirs):
* test/lisp/emacs-lisp/package-tests.el (with-fake-help-buffer):
Fix broken edebug specs (debug body) -> (debug (body)).
(cherry picked from commit
7905ea761ac8405628993708b4c1d4516370067c)
Eshel Yaron [Sun, 9 Mar 2025 10:30:12 +0000 (11:30 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:29:25 +0000 (11:29 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:29:13 +0000 (11:29 +0100)]
Po Lu [Sat, 8 Mar 2025 13:58:19 +0000 (21:58 +0800)]
; Enable pdumper on some buggy versions of Sun C
* src/pdumper.c (dump_sort_copied_objects, drain_reloc_list)
(dump_do_fixups, dump_do_dump_relocation): Do not expand
Fnreverse multiple times in CALLN. Sun C 5.12 evaluates the
arguments to array initializers to which it expands, which
clobbers the lists being reversed.
(cherry picked from commit
b36abc76ae3583ae30f9883ca276ff66d522bac1)
Po Lu [Sat, 8 Mar 2025 12:42:49 +0000 (20:42 +0800)]
Don't lose drag-and-drop data intended for XTerm-like programs
* src/xselect.c (x_own_selection): If special values exist for
drag-and-drop to unsupported programs, retain them till the
selection is cleared.
(cherry picked from commit
b0b7ad24e6efca04a373a4f2845a483984e3f1ea)
Eli Zaretskii [Sat, 8 Mar 2025 09:31:22 +0000 (11:31 +0200)]
Fix crash in daemon when "C-x C-c" while a client frame shows tooltip
* src/frame.c (delete_frame): Ignore tooltip frames when looking
for other frames on the same terminal. (Bug#76842)
(cherry picked from commit
d2445c8c23595efdd444fce6f0c33ba66b596812)
Eshel Yaron [Sun, 9 Mar 2025 10:28:57 +0000 (11:28 +0100)]
Sean Whitton [Sat, 8 Mar 2025 09:09:30 +0000 (17:09 +0800)]
vc-log-internal-common: Kill all local variables
* lisp/vc/vc.el (vc-log-internal-common): Kill all local
variables, even permanent-local ones (bug#44698).
(cherry picked from commit
a546225e1a86f16188897edef899a48f3c78e136)
Eshel Yaron [Sun, 9 Mar 2025 10:27:28 +0000 (11:27 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:27:26 +0000 (11:27 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:26:46 +0000 (11:26 +0100)]
João Távora [Sat, 8 Mar 2025 05:36:48 +0000 (05:36 +0000)]
Eglot: the margin code action indicator is interactive
* doc/misc/eglot.texi (Customization Variables): Fix.
(cherry picked from commit
1c313f8dce0ac9e0520f885420cd696703736baf)
João Távora [Sat, 8 Mar 2025 05:20:30 +0000 (05:20 +0000)]
Revert "Eglot: tests must work on 26.3"
This reverts commit
331492a148588991af5ce9a24a2020b3d380e03f.
My bad: gensym wasn't the problem, it's available from 26.1. Incf
was the problem, in the main program file.
* test/lisp/progmodes/eglot-tests.el (eglot--with-timeout): Back to gensym
(cherry picked from commit
02f9b525fc2188a57ff36ec38a60fa0032e2e547)
João Távora [Sat, 8 Mar 2025 05:15:57 +0000 (05:15 +0000)]
Eglot: unbreak from Emacs 26.3 (two-arg setq-local)
* lisp/progmodes/eglot.el (eglot--hierarchy-1): Use two-arg setq-local
(cherry picked from commit
d81cdf9fd23910d38f13a65ccb4909af2c2bdfd9)
João Távora [Sat, 8 Mar 2025 04:42:21 +0000 (04:42 +0000)]
Eglot: tests must work on 26.3
;; IMPORTANT: Since Eglot is a :core ELPA package, these tests are
;; supposed to run on Emacsen down to 26.3. Do not use bleeding-edge
;; functionality not compatible with that Emacs version.
* test/lisp/progmodes/eglot-tests.el (eglot--call-with-timeout):
Back to cl-gensym.
(cherry picked from commit
331492a148588991af5ce9a24a2020b3d380e03f)
Eshel Yaron [Sun, 9 Mar 2025 10:25:46 +0000 (11:25 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:25:32 +0000 (11:25 +0100)]
Daniel Colascione [Sat, 8 Mar 2025 00:22:56 +0000 (16:22 -0800)]
Stop term-erase-in-line disturbing markers
* lisp/term.el (term-erase-in-line): do nothing if there's nothing to
do; insert new newlines before deleting old ones.
(cherry picked from commit
062c6ab3dd5a1ce85fb7cb0fc84b65aa2cf60369)
Eshel Yaron [Sun, 9 Mar 2025 10:24:58 +0000 (11:24 +0100)]
Stefan Kangas [Fri, 7 Mar 2025 21:09:47 +0000 (22:09 +0100)]
; Add Maintainer header to checkdoc.el
* lisp/emacs-lisp/checkdoc.el: Add Maintainer header.
(cherry picked from commit
ebb94d712e21a3985fd90ea7011f14b420ff590b)
Gerd Möllmann [Fri, 7 Mar 2025 08:35:20 +0000 (09:35 +0100)]
Fix tty underline capability check (bug#75024)
* src/dispextern.h (TTY_CAP_UNDERLINE_STYLED): Fix. Also make this an
enum.
(cherry picked from commit
9277b037938b79e13a26c30ec0d2be30cfafd32b)
Daniel Colascione [Fri, 7 Mar 2025 20:17:54 +0000 (12:17 -0800)]
Revert "Stop moving markers during erase-in-line"
This reverts commit
6f19715937bbeaec5fb80ee9dad0d14b7712a989.
(cherry picked from commit
ae4671a7abb279aa9f3a9600028bdc85aff27c93)
Daniel Colascione [Fri, 7 Mar 2025 19:10:09 +0000 (11:10 -0800)]
Stop moving markers during erase-in-line
We shouldn't move a line marker just because we cleared a line next to
it. clear-in-line is defined not to affect line structure.
* lisp/term.el (term-erase-in-line): use insert-before-markers
(cherry picked from commit
6f19715937bbeaec5fb80ee9dad0d14b7712a989)
Daniel Colascione [Fri, 7 Mar 2025 19:07:12 +0000 (11:07 -0800)]
Make erase-in-line conform to ANSI spec in term
When handling \e[<N>K escape sequences, we're supposed to erase both to
the left _and_ to the right of the cursor when N is two.
* lisp/term.el (term-erase-in-line): make condition check more correct
(cherry picked from commit
4ea07cc4b4a676a5f8094d565cd3cea89e6ec77d)
Eshel Yaron [Sun, 9 Mar 2025 10:24:15 +0000 (11:24 +0100)]
Basil L. Contovounesios [Thu, 20 Feb 2025 09:34:00 +0000 (10:34 +0100)]
Clean up ert-font-lock error messages
* lisp/emacs-lisp/ert-font-lock.el: Remove redundant requires.
(ert-font-lock--parse-macro-args): First return value 'doc' being
nil already indicates omission of a docstring, so remove redundant
second return value doc-p. All users updated. Fix error
messages (bug#76372).
(ert-font-lock--check-faces): Simplify with ensure-list.
(cherry picked from commit
e62e7aa8990fd6c0b3a8742c8283efd20a2b10b7)
Tomas Nordin [Sun, 9 Feb 2025 21:39:58 +0000 (22:39 +0100)]
view-search: Start search from beginning or end of line
* lisp/view.el (view-search): Go to beginning-of-line or end-of-line
instead of previous or next line before the search. (Bug#76167)
(cherry picked from commit
e35435daf392462440bbc51a5b82d93eea7757c6)
Stefan Kangas [Fri, 7 Mar 2025 08:36:38 +0000 (09:36 +0100)]
Fix using log-edit-mode with git-commit-mode
* lisp/vc/log-edit.el (log-edit-font-lock-keywords): Avoid incorrect
fontification when used with the third-party git-commit-mode (part of
Magit).
(cherry picked from commit
c6fe5b779564001e40d5779976968850aa2a166a)
Stefan Kangas [Fri, 7 Mar 2025 08:28:41 +0000 (09:28 +0100)]
; Fix file headers in tty-tip.el
* lisp/tty-tip.el: Fix file headers.
(cherry picked from commit
646b3f8c5c206b0005020311f382206219f15e64)
Eshel Yaron [Sun, 9 Mar 2025 10:22:45 +0000 (11:22 +0100)]
Stefan Monnier [Fri, 7 Mar 2025 04:23:08 +0000 (23:23 -0500)]
(python-base-mode-map): Use it!
Rather than use `copy-keymap` between `python-mode-map` and
`python-ts-mode-map`, move the shared bindings to `python-base-mode-map`.
* lisp/progmodes/python.el (python-base-mode-map): Define it explicitly.
Move all the bindings of `python-mode-map` to it.
(python-mode-map, python-ts-mode-map): Inherit from it.
(cherry picked from commit
2dea3a0d34859852d3577f6054acb49f6e515eb2)
Stefan Monnier [Fri, 7 Mar 2025 04:18:31 +0000 (23:18 -0500)]
* src/eval.c (signal_or_quit): Reduce scope of `debugger_called`
(cherry picked from commit
06af71fbde9378384672a99048bb56ed4ac9a834)
Stefan Monnier [Thu, 6 Mar 2025 20:23:03 +0000 (15:23 -0500)]
(debug--early): Avoid re-entering the debugger for the same error
Fixes bug#76787.
* lisp/emacs-lisp/debug.el (debugger--last-error): Move ...
* lisp/emacs-lisp/debug-early.el (debugger--last-error): ... here.
(debug--early): Use it.
(cherry picked from commit
fb33e3b4c79f8d922d9fe6e593dcc12c3c4b24eb)
Philip Kaludercic [Sun, 23 Feb 2025 11:29:54 +0000 (12:29 +0100)]
Prepare cond-start for addition to GNU ELPA
(cherry picked from commit
4719df9f42c157e2683ac641883cff5efaa480bc)
shipmints [Sat, 22 Feb 2025 10:13:05 +0000 (05:13 -0500)]
mouse-face properties on tab-bar tab captions (bug#76394)
* etc/NEWS: Announce 'tab-bar' 'mouse-face' support.
* src/xdisp.c (note_tab_bar_highlight): Handle mouse-face property.
* lisp/tab-bar.el
(tab-bar-tab-highlight): New face.
(tab-bar-tab-name-format-mouse-face): New function adds the 'mouse-face'
'tab-bar-tab-highlight' to the tab name.
(tab-bar-tab-name-format-functions): Add
'tab-bar-tab-name-format-mouse-face'.
(cherry picked from commit
efd483cf0ecde3b0545a9eb39cc3fa9483fad76c)
Juri Linkov [Thu, 6 Mar 2025 18:22:50 +0000 (20:22 +0200)]
Improve treesit settings for js/typescript/ruby-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-list-nodes):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--list-nodes):
Replace leaf "string" with "template_string" and "template_substitution"
that can contain more nodes.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add the 'sentence' thing to treesit-thing-settings.
(cherry picked from commit
63cc542b9402ad0a794f4e05790366bd580b8bd1)
Stefan Monnier [Thu, 6 Mar 2025 18:02:37 +0000 (13:02 -0500)]
(debug): Don't `kill-emacs` upon exit when in batch mode
AFAICT this is a left over code from many years ago before
the `debug` special case was added to `condition-case` and
at a time where exiting from `debug` did not proceed to handle
remaining handlers.
In the usual case where we indeed want to kill Emacs,
`signal_or_quit` does it for us.
* lisp/emacs-lisp/debug.el (debug): Don't `kill-emacs` upon exit
when in batch mode (bug#76786)
(cherry picked from commit
82affcaeff8b7a0ed1f30adbf5905f934c4cebaf)
Stefan Monnier [Thu, 6 Mar 2025 16:21:42 +0000 (11:21 -0500)]
(replace_range): Delete argument `markers`
* src/lisp.h (replace_range):
* src/insdel.c (replace_range): Delete argument `markers`, always true.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers accordingly.
(cherry picked from commit
1133c081d6787fdc9634388b33e04382182be5b0)
Eli Zaretskii [Thu, 6 Mar 2025 14:27:00 +0000 (16:27 +0200)]
Fix images on the mode line under 'mode-line-compact'
* src/xdisp.c (display_mode_line): When 'mode-line-compact'
is in effect, don't remove spaces that have a 'display'
property on them. (Bug#76761)
(cherry picked from commit
cd051ef78e465bd70f9d89ba251288204cbb0383)
Kazuhiro Ito [Sun, 23 Feb 2025 13:47:00 +0000 (22:47 +0900)]
Avoid defining unneeded variables on Cygw32
lisp/term/w32-win.el contained definitions of variables which
were not used on Cygw32. It is now to split into two files,
common part and Windows native build specific part. The latter
is a new file, lisp/term/w32-nt.el.
* src/image.c (Qlibpng_version, Qlibgif_version)
(Qlibjpeg_version): Don't define on Cygw32 build.
* src/treesit.c (Qtree_sitter__library_abi): Ditto.
* lisp/term/w32-win.el (dynamic-library-alist, libpng-version)
(libgif-version, libjpeg-version, libgnutls-version)
(tree-sitter--library-abi, gui-backend-set-selection)
(gui-backend-get-selection, gui-backend-selection-owner-p)
(gui-selection-exists-p): Moved to lisp/term/w32-nt.el.
* lisp/term/w32-nt.el: New file, separated Windows native build
specific part from lisp/term/w32-win.el.
* lisp/loadup.el: Load term/w32-nt.el on Windows native build.
(Bug#75926)
(cherry picked from commit
64b3ad5c763ed3d2a9978fce06c0ccbdd085fe35)
Eshel Yaron [Sun, 9 Mar 2025 10:19:32 +0000 (11:19 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:19:04 +0000 (11:19 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:18:59 +0000 (11:18 +0100)]
Eshel Yaron [Sun, 9 Mar 2025 10:17:42 +0000 (11:17 +0100)]
Eli Zaretskii [Thu, 6 Mar 2025 10:52:05 +0000 (12:52 +0200)]
; Improve documentation of 2 symbol-related functions
* src/data.c (Fremove_pos_from_symbol, Fbare_symbol): Doc fixes.
(Bug#75290)
(cherry picked from commit
9065423e709de50509f45d08cc6697d9bb95fc93)
Eshel Yaron [Sun, 9 Mar 2025 07:17:23 +0000 (08:17 +0100)]
Eli Zaretskii [Thu, 6 Mar 2025 08:51:45 +0000 (10:51 +0200)]
Fix redisplay of tab bar when its text properties change
* src/xdisp.c (update_tab_bar): Use 'equal-including-properties'
to compare previous with the current tab-bar items. (Bug#76760)
(cherry picked from commit
bf027eb6ff267162c116006703698668794d37cc)
Mauro Aranda [Thu, 6 Mar 2025 08:45:50 +0000 (05:45 -0300)]
Fix some widgets in customize-dirlocals
* lisp/cus-edit.el (custom-dynamic-cons-value-create): Make sure
to eval the keymap property. (Bug#76756)
(cherry picked from commit
93ac2cb742f6fb90a36d758617cecb36c3d33e46)
Eli Zaretskii [Thu, 6 Mar 2025 07:43:11 +0000 (09:43 +0200)]
; * doc/emacs/maintaining.texi (Managing Projects): Fix wording.
(cherry picked from commit
2a8cf3ca5f91036c9731ab3b062426a56b1d8195)
Visuwesh [Mon, 3 Mar 2025 08:26:04 +0000 (13:56 +0530)]
Add new user option to exclude projects from being remembered
* lisp/progmodes/project.el (project-list-exclude): Add new user
option to exclude projects from being remembered.
(project-remember-project): Consider the user option above.
(project-switch-project): Use 'project-remember-project' instead.
* doc/emacs/maintaining.texi (Managing Projects): Mention the new user option.
* etc/NEWS: Announce the change. (Bug#76587)
(cherry picked from commit
6aa60038ee999d25184a639ce0ac76b614e3afb6)
Stefan Kangas [Wed, 5 Mar 2025 04:08:48 +0000 (05:08 +0100)]
Rewrite cl--parsing-keywords using backtick
* lisp/emacs-lisp/cl-seq.el (cl--parsing-keywords): Rewrite using
backtick.
(cherry picked from commit
4b5cc0bfc6d25ff4b7cd16c840e325e9fada4593)
Stefan Kangas [Wed, 5 Mar 2025 23:34:39 +0000 (00:34 +0100)]
Remove more redundant 'cl-' prefixes
* lisp/emacs-lisp/cl-seq.el (cl-substitute-if, cl-substitute-if-not)
(cl-count, cl-sort): Remove more redundant 'cl-' prefixes from
arguments and let-bound variables.
(cherry picked from commit
af44c7630cafba832a8b7c3b302dd0b16c4f271c)
Stefan Kangas [Wed, 5 Mar 2025 23:33:21 +0000 (00:33 +0100)]
New user option checkdoc-arguments-missing-flag
* lisp/emacs-lisp/checkdoc.el
(checkdoc-arguments-missing-flag): New user option.
(checkdoc-this-string-valid-engine): Use above new option.
(checkdoc--argument-missing-flag): Make into obsolete variable alias for
above new option.
(cherry picked from commit
679966b5a091106d37a2e2e769d9e87f3fb92a63)
Stefan Kangas [Wed, 5 Mar 2025 17:40:00 +0000 (18:40 +0100)]
Add more tests for cl-seq.el
* test/lisp/emacs-lisp/cl-seq-tests.el (cl--oddp-safe)
(cl-subst-if-test, cl-subst-if-not-test, cl-nsubst-test)
(cl-nsubst-if-test, cl-nsubst-if-not-test, cl-sublis-test)
(cl-nsublis-test, cl-tree-equal-test): New tests.
(cherry picked from commit
fac9097b16310cf7af058ef5ff26c86697b24a32)