]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 weeks agoProtect against GCing of last_mouse_window
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Protect against GCing of last_mouse_window

* src/window.c (last_mouse_window): New global var.  All static
instances removed, and all their uses replaced with this global
var.  This fixes a very unlikely bug where last_mouse_window was
GC’ed and a new window created in its place.  It also fixes several
places that assumed NIL_IS_ZERO without static_asserting it.
(init_window_once): Initialize the new var.

(cherry picked from commit 2e8ef0910412aef8f9f1beba7c942473ad8602bb)

3 weeks agoPacify GCC in pgtkselect malloc alignment
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Pacify GCC in pgtkselect malloc alignment

* src/pgtkselect.c (pgtk_size_for_format): Remove.
(pgtk_get_window_property): Third arg is now void **, not unsigned
char **.  Omit last arg.  All callers changed.  Simplify
allocation to pacify GCC 14.2.1 complaint about malloc size
mismatching size of array: there’s no need for an extra byte when
converting from ldata to idata.
(selection_data_to_lisp_data): Third arg is now void const *,
not unsigned char const *.  All callers changed.
Omit unnecessary casts.  Make some locals more local.

(cherry picked from commit ff65cc9944dc0b37986d512ee8b9817c6913db36)

3 weeks agoAvoid undefined behavior with botched pgtk menu
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Avoid undefined behavior with botched pgtk menu

* src/pgtkmenu.c (pgtk_menu_show): Do not dereference save_wv if
null.  Problem found by gcc 20250110 (Red Hat 14.2.1-7)
-Wanalyzer-null-dereference.

(cherry picked from commit c0d83876f18cb21abae299d3b4a2a2bd7f117252)

3 weeks agoUse gtk_disable_setlocale
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Use gtk_disable_setlocale

* src/pgtkterm.c (pgtk_term_init):
* src/xterm.c (x_term_init):
Use gtk_disable_setlocale rather than fixup_locale.

(cherry picked from commit 06fd3f4e98d683b6595899861e47e931724e7020)

3 weeks agoAvoid unlikely int overflow.
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Avoid unlikely int overflow.

* src/pgtkterm.c (pgtk_term_init):
* src/xterm.c (x_term_init):
Use a bool, not an int that keeps incrementing,
to record whether initialization has occurred.

(cherry picked from commit a1e4f6a35c70cf265c77b445288f4e0ab6ffc19f)

3 weeks agoBeware large stack growth in pgtk_menu_show
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Beware large stack growth in pgtk_menu_show

* src/pgtkmenu.c (pgtk_menu_show): USE_SAFE_ALLOCA instead of alloca.
Problem found with --enable-gcc-warnings.

(cherry picked from commit 6ff06ff738ead96d7b4cb59eda15a1c72e2b5776)

3 weeks agoFix x-show-tip bignum crash
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Fix x-show-tip bignum crash

* src/pgtkfns.c (compute_tip_xy): Fix crash if user specifies
bignums.  Bug found with --enable-gcc-warnings.

(cherry picked from commit 17a8bf53f390718756e397cc0b31c1ef2c7de5f0)

3 weeks agoPrefer make_formatted_string in svg_load_image
Paul Eggert [Mon, 27 Jan 2025 06:15:49 +0000 (22:15 -0800)]
Prefer make_formatted_string in svg_load_image

* src/image.c (svg_load_image): Prefer make_formatted_string to
snprintf, as this simplifies the code and does not truncate the
resulting string arbitrarily.

(cherry picked from commit c50e8c24247eb69d85b004a72197e710c8e1e32a)

3 weeks agoSimplify building of color names in image.c
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Simplify building of color names in image.c

* src/image.c (make_color_name): New function.
(image_background, image_build_heuristic_mask, png_load_body): Use it.

(cherry picked from commit 028fae966142b6e2330b9250fb4cdf2cbd8e1446)

3 weeks agoSimplify make_formatted_string API
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Simplify make_formatted_string API

From a suggestion by Pip Cet.
* src/alloc.c (make_formatted_string): Omit first argument,
to simplify the calling convention.  All callers changed.
* src/doprnt.c (doprnt): Also support %u.  Update doc.

(cherry picked from commit f885806fdf1aa862ad55d124e9795794fed0b964)

3 weeks agoFix unlikely time zone abbreviation bug
Paul Eggert [Mon, 27 Jan 2025 06:15:48 +0000 (22:15 -0800)]
Fix unlikely time zone abbreviation bug

* src/timefns.c (Fcurrent_time_zone): Fix double-"-" bug when time
zone name is not known and time zone offset is -3600 or less.
Also, stop assuming that make_formatted_string works with "*"
precisions; this might ease future changes.

(cherry picked from commit bcfd4d21b0a62c5c15b919fa28673066c493775a)

3 weeks agoDon't use obsolete face alias in themes
Stefan Kangas [Mon, 27 Jan 2025 06:47:29 +0000 (07:47 +0100)]
Don't use obsolete face alias in themes

* etc/themes/leuven-dark-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el: Don't use obsolete face alias
'smerge-refined-change', preferring instead 'smerge-refined-changed'.

(cherry picked from commit b06364f1b667e7960d1724293398179f280e910b)

3 weeks ago; Skip commit 52c41a66bad451dd43940cb313c62a95f464db1e
Eshel Yaron [Thu, 30 Jan 2025 18:06:10 +0000 (19:06 +0100)]
; Skip commit 52c41a66bad451dd43940cb313c62a95f464db1e

3 weeks ago; Skip commit 2b3599bb08e8ccfe49bbaa28693fed8dca62440b
Eshel Yaron [Thu, 30 Jan 2025 18:06:05 +0000 (19:06 +0100)]
; Skip commit 2b3599bb08e8ccfe49bbaa28693fed8dca62440b

3 weeks agoFix the Android port
Po Lu [Mon, 27 Jan 2025 01:11:21 +0000 (09:11 +0800)]
Fix the Android port

* src/term.c (tty_frame_at) [HAVE_ANDROID]: Always return nil.

* src/terminal.c (cursor_to, raw_cursor_to) [HAVE_ANDROID]:
Don't call root_xy.

(cherry picked from commit 8d11871c63e65459fd14f1cbe08bf0460c452ac6)

3 weeks agoFix compilation warnings in pdumper with !HAVE_NATIVECOMP
Stefan Kangas [Sun, 26 Jan 2025 20:17:31 +0000 (21:17 +0100)]
Fix compilation warnings in pdumper with !HAVE_NATIVECOMP

* src/pdumper.c [!HAVE_NATIVECOMP] (cold_op, dump_subr): Fix
compilation warnings.
Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg01003.html

(cherry picked from commit aec9e66178793e631f0583768315a6371054c907)

3 weeks agoPrefer static switch-case checking in pdumper
Stefan Kangas [Sun, 26 Jan 2025 19:04:07 +0000 (20:04 +0100)]
Prefer static switch-case checking in pdumper

* src/pdumper.c (dump_fwd, dump_symbol, dump_drain_cold_data)
(dump_do_fixup, dump_anonymous_allocate_w32)
(dump_anonymous_allocate_posix, dump_map_file_w32, dump_map_file_posix)
(dump_do_emacs_relocation): Remove default clauses to allow static
checking using -Wswitch.

(cherry picked from commit 6e2e7265a04f63f482db7fbdfd8e2519d8bfe03e)

3 weeks ago* lisp/progmodes/xref.el (xref-after-jump-hook): Remove 'recenter'
Eshel Yaron [Thu, 30 Jan 2025 17:59:52 +0000 (18:59 +0100)]
* lisp/progmodes/xref.el (xref-after-jump-hook): Remove 'recenter'

3 weeks agoscope.el: Initial 'cl-tagbody' support
Eshel Yaron [Mon, 27 Jan 2025 09:25:04 +0000 (10:25 +0100)]
scope.el: Initial 'cl-tagbody' support

3 weeks agoAvoid crashes in Fdocumentation caused by incorrect data types
Pip Cet [Sun, 26 Jan 2025 14:34:45 +0000 (14:34 +0000)]
Avoid crashes in Fdocumentation caused by incorrect data types

Note that this can only change things when function-documentation is
defined or overloaded incorrectly.

* src/doc.c (Fdocumentation): Check that the cdr of a docstring cons
is a fixnum.

(cherry picked from commit b07c12ce59c96db753a1f8f3a829f9ab5514e35f)

3 weeks ago; Fix last change
Eli Zaretskii [Sun, 26 Jan 2025 15:50:34 +0000 (17:50 +0200)]
; Fix last change

* lisp/disp-table.el (display-table-slot)
(set-display-table-slot):
* etc/NEWS:
* doc/lispref/display.texi (Display Tables): Fix punctuation and
typos.

(cherry picked from commit 8cfb4e35da4b7ffa84c521e28fd592c40209d04e)

3 weeks agoDisplay separators on tty menus with display table entries
Gerd Möllmann [Sun, 26 Jan 2025 10:31:32 +0000 (11:31 +0100)]
Display separators on tty menus with display table entries

* src/xdisp.c (display_tty_menu_separator): Lookup separator char in
standard-display-table, make a string, and display that using
display_string.
* src/xdisp.c (display_tty_menu_separator_char): New function.
(display_tty_menu_separator): Use it.
* lisp/disp-table.el (display-table): Increase from 12 to 18.
(box-double-vertical, box-double-horizontal, box-double-down-right)
(box-double-down-left, box-double-up-right, box-double-up-left): New
symbols for extra slots.
(display-table-slot, set-display-table-slot): Change doc string.
(describe-display-table): Describe new slots.
(standard-display-unicode-special-glyphs): Define new slots.
* src/disptab.h (DISP_TABLE_P): Add enumerators.
(DISP_TABLE_EXTRA_SLOTS): Define based on enum box.
* src/dispnew.c (produce_box_glyphs): Add new enumerators to switch to
make it exhaustive.
* src/xdisp.c (display_tty_menu_separator): Use BOX_DOUBLE_HORIZONTAL
for '=' if present.
* doc/lispref/display.texi: Add documentation.
* etc/NEWS: Mention in NEWS.

(cherry picked from commit 4e78a3e117f4ca0b6b9f3b7a2d7919cb5b2e0295)

3 weeks agoTweak .gitattributes
Eshel Yaron [Sun, 26 Jan 2025 19:02:14 +0000 (20:02 +0100)]
Tweak .gitattributes

3 weeks agoUse dired--inhibit-auto-revert for fixing bug#71264
Tassilo Horn [Sun, 26 Jan 2025 08:44:59 +0000 (09:44 +0100)]
Use dired--inhibit-auto-revert for fixing bug#71264

The original fix bound auto-revert-mode to nil which had the side-effect
of disabling auto-revert forever in this buffer because
auto-revert-handler removes the buffer from auto-revert-buffer-list when
it's called but auto-revert-mode is nil.

* lisp/dired.el (dired-internal-do-deletions): Bind
dired--inhibit-auto-revert during deletion (bug#71264).

(cherry picked from commit 01d93d56cd469ddb45d142da948caef9f2dc1a3f)

3 weeks agoChange doc string of frame-visible-p
Gerd Möllmann [Sat, 25 Jan 2025 20:18:00 +0000 (21:18 +0100)]
Change doc string of frame-visible-p

* src/frame.c (Fframe_visible_p): Don't say it always returns t for tty
frames.

(cherry picked from commit 35d39278599caf30eb4bfbd83118ffe15d2bc705)

3 weeks agoReplace is_frame_ancestor with frame_ancestor_p
Gerd Möllmann [Sat, 25 Jan 2025 18:42:52 +0000 (19:42 +0100)]
Replace is_frame_ancestor with frame_ancestor_p

* src/dispnew.c (is_frame_ancestor): Removed.
(frame_z_order_cmp): Use frame_ancestor_p.
(copy_child_glyphs): Ditto.
* src/dispextern.h: Declaration removed.
* src/term.c (mouse_get_xy): Use frame_ancestor_p.

(cherry picked from commit 85aec497c71e26b66ecfc85c20d7888336300e1f)

3 weeks agoAdd 'treesit-forward-comment' with 'forward-comment-function'
Juri Linkov [Sat, 25 Jan 2025 18:14:15 +0000 (20:14 +0200)]
Add 'treesit-forward-comment' with 'forward-comment-function'

* lisp/treesit.el (treesit-forward-comment): New function.
(treesit-major-mode-setup): Set 'forward-comment-function' to
'treesit-forward-comment' if the 'comment' thing is defined.

* src/syntax.c (forward-comment-function): New variable.
(Fforward_comment): Call the function from 'forward-comment-function'
when it's non-nil (bug#75609).

(cherry picked from commit 63df2164903e0cd6819187483a64b892aa7e0219)

3 weeks ago* lisp/treesit.el: Display treesit-explore buffer below selected window.
Juri Linkov [Sat, 25 Jan 2025 17:59:56 +0000 (19:59 +0200)]
* lisp/treesit.el: Display treesit-explore buffer below selected window.

(treesit-explorer-switch-parser, treesit-explore):
Use display-buffer-below-selected for display-buffer (bug#75079).

(cherry picked from commit 3bc6b88cc71b8ccc96b5e61d895e5208009aa3c0)

3 weeks ago(scope-define-global-minor-mode): Remove.
Eshel Yaron [Sun, 26 Jan 2025 18:48:11 +0000 (19:48 +0100)]
(scope-define-global-minor-mode): Remove.

3 weeks agoscope.el: Optimize.
Eshel Yaron [Sun, 26 Jan 2025 18:21:35 +0000 (19:21 +0100)]
scope.el: Optimize.

3 weeks ago(elisp-completion-at-point): Complete custom theme names
Eshel Yaron [Sun, 26 Jan 2025 18:11:30 +0000 (19:11 +0100)]
(elisp-completion-at-point): Complete custom theme names

3 weeks ago(cl-case): Leave keywords unquoted.
Eshel Yaron [Sun, 26 Jan 2025 18:10:53 +0000 (19:10 +0100)]
(cl-case): Leave keywords unquoted.

3 weeks agoRemove 'ispell-help'
Eshel Yaron [Sun, 26 Jan 2025 18:10:31 +0000 (19:10 +0100)]
Remove 'ispell-help'

3 weeks ago; (let-alist): Document double-dot escape syntax.
Eshel Yaron [Sun, 26 Jan 2025 07:56:15 +0000 (08:56 +0100)]
; (let-alist): Document double-dot escape syntax.

3 weeks agoHandle `let-alist' double-dot escape
Eshel Yaron [Sun, 26 Jan 2025 07:55:39 +0000 (08:55 +0100)]
Handle `let-alist' double-dot escape

4 weeks agoscope.el: Finalize refactor and let-alist support
Eshel Yaron [Sat, 25 Jan 2025 18:54:19 +0000 (19:54 +0100)]
scope.el: Finalize refactor and let-alist support

4 weeks ago(when-let*): Warn if body is empty
Stefan Monnier [Sat, 25 Jan 2025 15:39:12 +0000 (10:39 -0500)]
(when-let*): Warn if body is empty

* lisp/subr.el (when-let*): Warn if body is empty.
* lisp/textmodes/tex-mode.el (xref-backend-references): Fix use of
`when-let*`.

(cherry picked from commit 442d04081bbe9913def50b543e499422c4ad9ece)

4 weeks ago; * src/term.c (handle_one_term_event): Fix last change.
Eli Zaretskii [Sat, 25 Jan 2025 14:59:40 +0000 (16:59 +0200)]
; * src/term.c (handle_one_term_event): Fix last change.

(cherry picked from commit e8f173f0ba9327033781429ea9a1d99ff8d2f751)

4 weeks agoRestore the old behavior of `bookmark-write-file'
Zhengyi Fu [Thu, 23 Jan 2025 05:35:16 +0000 (13:35 +0800)]
Restore the old behavior of `bookmark-write-file'

* lisp/bookmark.el (bookmark-write-file): Use 'pp-28' to avoid
filling the bookmarks.  (Bug#75775)

Copyright-paperwork-exempt: yes
(cherry picked from commit 67903f5909db5c6140eeffebfaf818b4f93625d5)

4 weeks agoFix the mistake that led to the reverts
Gerd Möllmann [Sat, 25 Jan 2025 13:43:17 +0000 (14:43 +0100)]
Fix the mistake that led to the reverts

* src/terminal.c (raw_cursor_to): Fix reversed arguments.

(cherry picked from commit 1d086441166f564d8f8cd4945cb9590410c9676b)

4 weeks agoReapply "Multi-tty: selected frame can be a GUI frame"
Gerd Möllmann [Sat, 25 Jan 2025 13:28:18 +0000 (14:28 +0100)]
Reapply "Multi-tty: selected frame can be a GUI frame"

This reverts commit d93d822285813b89f2444ef93c5747cbeb67a46b.

(cherry picked from commit 20f26723774d50292f21487fb21b92355444d678)

4 weeks agoReapply "Fix mouse position handling for nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 13:28:13 +0000 (14:28 +0100)]
Reapply "Fix mouse position handling for nested tty child frames"

This reverts commit e2cc52dbcd196f95cc79c6c6d899b9e86e696fe5.

(cherry picked from commit ccf3f8d21e346ac1fdb092079227c37f987f253d)

4 weeks agoReapply "Fix tty-frame-at for nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 13:28:11 +0000 (14:28 +0100)]
Reapply "Fix tty-frame-at for nested tty child frames"

This reverts commit 9ad28959d6895720865c0718bf60f4b7b0b144f3.

(cherry picked from commit e839b83c828fe09546edcc46dcfc5e09dd39b9fe)

4 weeks agoReapply "Fix cursor positioning of nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 13:28:09 +0000 (14:28 +0100)]
Reapply "Fix cursor positioning of nested tty child frames"

This reverts commit 65036323fc1cdf18a7812b1c922583e6466972a6.

(cherry picked from commit 26b144f241c7843b635415f2b68b8c3df0b23e02)

4 weeks agoReapply "Simplify absolute (x, y) computation on ttys"
Gerd Möllmann [Sat, 25 Jan 2025 13:28:03 +0000 (14:28 +0100)]
Reapply "Simplify absolute (x, y) computation on ttys"

This reverts commit 13fdcd730ff63bf79caace9a6e46aff5f944b1b7.

(cherry picked from commit 945ed044cd8ab67ccbbc185c19f500f723cd9045)

4 weeks agoDelete all overlays that belong to an editable-field
Mauro Aranda [Sat, 18 Jan 2025 11:25:40 +0000 (08:25 -0300)]
Delete all overlays that belong to an editable-field

* lisp/wid-edit.el (widget-specify-field): Store the end overlay
that we sometimes create for an editable-field widget.
(widget-field-value-delete): Make sure we delete all overlays
that belong to the widget.  (Bug#75646)

* test/lisp/wid-edit-tests.el (widget-test-delete-field-overlays): New
test.

(cherry picked from commit d4220a17c4ecf4639a276352149218077c1d6315)

4 weeks agopython-mode: add 'exit' and 'quit' to the list of block-enders
Konstantin Kharlamov [Tue, 21 Jan 2025 15:34:54 +0000 (18:34 +0300)]
python-mode: add 'exit' and 'quit' to the list of block-enders

'exit()' and 'quit()' end the current codeflow, there can't be
any code past it, similarly to 'return', 'continue', etc.  So
when calculating indentation for the line next to 'exit()',
'os.exit()', 'os._exit()', 'sys.exit()' and 'quit()', decrease
the indentation level.
* /lisp/progmodes/python.el (python-rx): Add 'exit()', 'os.exit()',
'os._exit()', 'sys.exit()', 'quit' to the list of block-enders.
(Bug#75729)

(cherry picked from commit 0514619b2c944ae17fbf649496595c5e866ff785)

4 weeks agolisp: Introduce a `lisp-fill-paragraph-as-displayed' variable.
Maxim Cournoyer [Tue, 21 Jan 2025 02:50:44 +0000 (11:50 +0900)]
lisp: Introduce a `lisp-fill-paragraph-as-displayed' variable.

Starting with Emacs 28, filling strings now happens in a
narrowed scope, and looses the leading indentation and can cause
the string to extend past the fill-column value.  Introduce
`lisp-fill-paragraph-as-displayed' as a new variable allowing
opting out of this new behavior in specific scenarios (such as
when using the Scheme major mode, say).

* lisp/emacs-lisp/lisp-mode.el
(lisp-fill-paragraph-as-displayed): New variable.
(lisp-fill-paragraph): Honor it, by avoiding the logic narrow to
strings before applying fill-paragraph.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-fill-paragraph-respects-fill-column): Test it.
(lisp-fill-paragraph-docstring-boundaries): New test, as a
safeguard to avoid regressions.

Fixes: bug#56197
(cherry picked from commit 192355e54af91ad6e7d1343071a749e1ced29400)

4 weeks agoAvoid error with empty search string in Customize
Mauro Aranda [Tue, 21 Jan 2025 00:16:48 +0000 (21:16 -0300)]
Avoid error with empty search string in Customize

* lisp/cus-edit.el (custom-buffer-create-internal): Only call
customize-apropos if the string is not empty.  (Bug#75714)

(cherry picked from commit d4ca688abefa90cf3e54add036b32c06b7da6363)

4 weeks ago; Improve prompts and error messages in 'info-look'
Eli Zaretskii [Sat, 25 Jan 2025 10:10:32 +0000 (12:10 +0200)]
; Improve prompts and error messages in 'info-look'

* lisp/info-look.el (info-lookup-change-mode): Improve text of
prompt and error messages.  (Bug#75634)

(cherry picked from commit 062da7003f98cb8352e9cc91e0a8fd7de11b2bd1)

4 weeks ago; Clean up 'xterm-mouse-mode' auto-enabling vars
Jared Finder [Sun, 19 Jan 2025 05:06:00 +0000 (21:06 -0800)]
; Clean up 'xterm-mouse-mode' auto-enabling vars

* lisp/term/xterm.el (xterm--auto-xt-mouse-allowed-names)
(xterm--auto-xt-mouse-allowed-types): Use `rx' macro and
update docstring.  (Bug#74833)

(cherry picked from commit 0f3d4e157fb9e638f568128096c818d4485b60fa)

4 weeks agoReload <pkg>-loaddefs when replacing built-in packages
Stefan Monnier [Wed, 19 Jun 2024 20:35:56 +0000 (16:35 -0400)]
Reload <pkg>-loaddefs when replacing built-in packages

* lisp/emacs-lisp/package.el (package--reload-previously-loaded):
Add new optional argument to display a specified warning upon
reloading.
(package-activate-1): Always reload libraries when loading built-in
packages.  This avoids ELPA versions of built-in packages to be
mixed with the built-in package autoloads.

Link: https://yhetil.org/emacs-devel/87y1adrria.fsf@localhost/
(cherry picked from commit 5878c9ae7c958af1828e85a7b4d922c1a8c1b6bf)

4 weeks agoibuffer: Display column titles in header line
Daniel Mendler [Sat, 11 Jan 2025 15:36:56 +0000 (16:36 +0100)]
ibuffer: Display column titles in header line

If the option `ibuffer-use-header-line' is set to `title',
display column titles in the header line.
* lisp/ibuffer.el (ibuffer--format-title)
(ibuffer--format-summary): New functions extracted from
`ibuffer-update-title-and-summary'.
(ibuffer-update-title-and-summary): Use them.
(ibuffer-update): Do not always override `header-line-format'.
(ibuffer-use-header-line): Update docstring and option `:type'.
* lisp/ibuf-macs.el (define-ibuffer-sorter): Add "@" to the
interactive specification for clicks on the header line.

* etc/NEWS: Announce the change.
(Bug#75497)

(cherry picked from commit 5294d450da47734bbe2ca259505674bcae5ff573)

4 weeks agolisp/repeat.el: Don't expose `cl-extra/cl-lib` distinction
Stefan Monnier [Sat, 25 Jan 2025 09:42:01 +0000 (04:42 -0500)]
lisp/repeat.el: Don't expose `cl-extra/cl-lib` distinction

(cherry picked from commit 5ee12424b600fe5d677f6b526ab038bad4747f83)

4 weeks agoibuffer: New defcustom `ibuffer-human-readable-size'
Daniel Mendler [Sat, 11 Jan 2025 13:22:02 +0000 (14:22 +0100)]
ibuffer: New defcustom `ibuffer-human-readable-size'

* lisp/ibuffer.el (ibuffer-human-readable-size): New
defcustom.
(define-ibuffer-column size): Use it.

* etc/NEWS: Mention new defcustom.
(Bug#75495)

(cherry picked from commit 35576fde5670dffe104a6b2a76837a1f0a4c16ce)

4 weeks agoQuote identifiers in SQL queries in 'sqlite-mode'
Vladimir Panteleev [Wed, 15 Jan 2025 18:33:23 +0000 (18:33 +0000)]
Quote identifiers in SQL queries in 'sqlite-mode'

* lisp/sqlite-mode.el: (sqlite-mode-list-tables)
(sqlite-mode-list-columns, sqlite--mode--list-data)
(sqlite-mode-delete): Quote identifiers (table and column
names) in the SQL queries.  Fixes, e.g., opening databases
which have a table called "values".  (Bug#75598)

(cherry picked from commit 5e0fc49f3b14928f08eb314b15f70ccbb2ce7229)

4 weeks agoRevert "Simplify absolute (x, y) computation on ttys"
Gerd Möllmann [Sat, 25 Jan 2025 08:39:56 +0000 (09:39 +0100)]
Revert "Simplify absolute (x, y) computation on ttys"

This reverts commit 5e132835ad320be1d5c45ffbf83d67d16fc7bf96.

(cherry picked from commit 13fdcd730ff63bf79caace9a6e46aff5f944b1b7)

4 weeks agoRevert "Fix cursor positioning of nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 08:39:54 +0000 (09:39 +0100)]
Revert "Fix cursor positioning of nested tty child frames"

This reverts commit 8cbb3c7335ff03b6fae4efeae126e91993cb962a.

(cherry picked from commit 65036323fc1cdf18a7812b1c922583e6466972a6)

4 weeks agoRevert "Fix tty-frame-at for nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 08:39:51 +0000 (09:39 +0100)]
Revert "Fix tty-frame-at for nested tty child frames"

This reverts commit 9693f2a95ad14bf0caa34e60d72722d4dd4d85c9.

(cherry picked from commit 9ad28959d6895720865c0718bf60f4b7b0b144f3)

4 weeks agoRevert "Fix mouse position handling for nested tty child frames"
Gerd Möllmann [Sat, 25 Jan 2025 08:39:47 +0000 (09:39 +0100)]
Revert "Fix mouse position handling for nested tty child frames"

This reverts commit f37559a1ee035d184bc4db6e4f597281d3ac6879.

(cherry picked from commit e2cc52dbcd196f95cc79c6c6d899b9e86e696fe5)

4 weeks agoRevert "Multi-tty: selected frame can be a GUI frame"
Gerd Möllmann [Sat, 25 Jan 2025 08:39:11 +0000 (09:39 +0100)]
Revert "Multi-tty: selected frame can be a GUI frame"

This reverts commit 57b7c07b3709d9a2b2c70e0c8218a52448368a12.

(cherry picked from commit d93d822285813b89f2444ef93c5747cbeb67a46b)

4 weeks ago; * admin/admin.el (set-version): Note about Android.
Eli Zaretskii [Sat, 25 Jan 2025 08:38:29 +0000 (10:38 +0200)]
; * admin/admin.el (set-version): Note about Android.

(cherry picked from commit 52dc01f1c8b3c14405cc9ce2a825ea68edcdadc8)

4 weeks agoMulti-tty: selected frame can be a GUI frame
Gerd Möllmann [Sat, 25 Jan 2025 06:54:56 +0000 (07:54 +0100)]
Multi-tty: selected frame can be a GUI frame

* src/dispnew.c (frame_selected_window_frame): New function.
(is_cursor_obscured): Use it.
(terminal_cursor_magic): Use the frame of the selected window of he root
frame.
(combine_updates_for_frame): Move Android conditional compilation out.

(cherry picked from commit 57b7c07b3709d9a2b2c70e0c8218a52448368a12)

4 weeks agoFix mouse position handling for nested tty child frames
Gerd Möllmann [Sat, 25 Jan 2025 06:33:45 +0000 (07:33 +0100)]
Fix mouse position handling for nested tty child frames

* src/dispnew.c (child_xy): New function.
* src/dispextern.h: Declare it.
* src/term.c (tty_frame_at): Return child-relative (x, y) in output
parameters.
(Ftty_frame_at): Return a list (FRAME CHILD-X CHILD-Y).
(handle_one_term_event): Adapt use of tty_frame_at.
* lisp/xt-mouse.el (xterm-mouse-event): Use new tty-frame-at.

(cherry picked from commit f37559a1ee035d184bc4db6e4f597281d3ac6879)

4 weeks agoFix tty-frame-at for nested tty child frames
Gerd Möllmann [Sat, 25 Jan 2025 05:43:49 +0000 (06:43 +0100)]
Fix tty-frame-at for nested tty child frames

* src/term.c (tty_frame_at): Translate child frame origin to absolute
coordinates.

(cherry picked from commit 9693f2a95ad14bf0caa34e60d72722d4dd4d85c9)

4 weeks agoFix cursor positioning of nested tty child frames
Gerd Möllmann [Sat, 25 Jan 2025 04:44:03 +0000 (05:44 +0100)]
Fix cursor positioning of nested tty child frames

* src/terminal.c (cursor_to, raw_cursor_to): Fix translation to root
coordinates.

(cherry picked from commit 8cbb3c7335ff03b6fae4efeae126e91993cb962a)

4 weeks agoSimplify absolute (x, y) computation on ttys
Gerd Möllmann [Sat, 25 Jan 2025 04:33:13 +0000 (05:33 +0100)]
Simplify absolute (x, y) computation on ttys

* src/dispnew.c (root_xy): New function.
(frame_pos_abs): Removed.
(frame_rect_abs, abs_cursor_pos): Use root_xy.
* src/dispextern.h: Declare root_xy.
* src/term.c (mouse_get_xy): Use it.

(cherry picked from commit 5e132835ad320be1d5c45ffbf83d67d16fc7bf96)

4 weeks agoAvoid double spaces around abbrevations in Texinfo
Stefan Kangas [Fri, 24 Jan 2025 16:32:17 +0000 (17:32 +0100)]
Avoid double spaces around abbrevations in Texinfo

* doc/emacs/custom.texi (Init Rebinding):
* doc/emacs/dired.texi (Operating on Files):
* doc/emacs/emacs.texi (Top):
* doc/emacs/emerge-xtra.texi (Emerge):
* doc/emacs/files.texi (Files):
* doc/emacs/frames.texi (Drag and Drop):
* doc/emacs/misc.texi (Hyperlinking):
* doc/emacs/modes.texi (Modes):
* doc/emacs/mule.texi (Input Methods):
* doc/emacs/windows.texi (Window Tool Bar):
* doc/lispintro/emacs-lisp-intro.texi
(Lexical & Dynamic Binding Differences):
* doc/lispref/elisp.texi (Top):
* doc/lispref/functions.texi (Functions, Generic Functions):
* doc/lispref/hash.texi (Defining Hash):
* doc/lispref/keymaps.texi (Creating Keymaps):
* doc/lispref/lists.texi (Property Lists):
* doc/lispref/modes.texi (%-Constructs):
* doc/lispref/nonascii.texi (Character Properties):
* doc/lispref/processes.texi (Misc Network):
* doc/lispref/searching.texi (Regexp Functions):
* doc/lispref/syntax.texi (Syntax Table Internals):
* doc/lispref/text.texi (Filling, Checksum/Hash)
(JSONRPC deferred requests):
* doc/misc/calc.texi (What is Calc, Modes Tutorial):
* doc/misc/cc-mode.texi (List Line-Up, Operator Line-Up)
(Custom Macros, Indenting Directives):
* doc/misc/efaq.texi (Colors on a TTY, Security risks with Emacs):
* doc/misc/eglot.texi (Eglot Variables):
* doc/misc/erc.texi (Connecting):
* doc/misc/eshell.texi (Aliases, Completion):
* doc/misc/flymake.texi (Backend functions):
* doc/misc/gnus-faq.texi (FAQ 5 - Composing messages):
* doc/misc/gnus.texi (Gnus Unplugged, Window Layout)
(Filtering Incoming Mail, History):
* doc/misc/idlwave.texi (Online Help, Catalogs):
* doc/misc/wisent.texi (Wisent Overview): Be more consistent with
abbreviations.  Use @: or comma or rewrite to avoid double spaces.
Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg00909.html

(cherry picked from commit fb282da2a0756d4e6de16b5879e42204f0d33e5b)

4 weeks ago; time-stamp: Rename some internal symbols
Stephen Gildea [Fri, 24 Jan 2025 18:12:58 +0000 (10:12 -0800)]
; time-stamp: Rename some internal symbols

* lisp/time-stamp.el: (time-stamp-string-preprocess): Rename 'alt-form'
to 'colon-cnt' because it is now an integer.
* test/lisp/time-stamp-tests.el: Rename 'formatz-generate-tests' to
'define-formatz-tests'.

(cherry picked from commit a00e6e7143d5ebf7282b5e5b410e1bd882634d57)

4 weeks ago; * lisp/time-stamp.el: Improve two documentation strings
Stephen Gildea [Fri, 24 Jan 2025 17:44:03 +0000 (09:44 -0800)]
; * lisp/time-stamp.el: Improve two documentation strings

(cherry picked from commit 77fe4fbeffc723337bd295e593c8062cd4ab7e43)

4 weeks ago; * doc/emacs/files.texi: only one time stamp index entry
Stephen Gildea [Fri, 24 Jan 2025 16:54:13 +0000 (08:54 -0800)]
; * doc/emacs/files.texi: only one time stamp index entry

(cherry picked from commit 0d38f1d07b27ad3634a667388c39d55ed2bb6137)

4 weeks ago; Skip commit bc1ab8ac3d8fd8f42641ad45820df995525ddf0b
Eshel Yaron [Sat, 25 Jan 2025 17:45:20 +0000 (18:45 +0100)]
; Skip commit bc1ab8ac3d8fd8f42641ad45820df995525ddf0b

4 weeks ago; Fix previous change
Robert Pluim [Fri, 24 Jan 2025 14:58:47 +0000 (15:58 +0100)]
; Fix previous change

* doc/emacs/fixit.texi (Spelling): Use "personal" instead of
"private" dictionary.

(cherry picked from commit b41ef43af19479279f6f967e3cb9e6b0aa3622d8)

4 weeks agoIspell: Use "personal dictionary" terminology consistently
Rudolf Adamkovič [Fri, 24 Jan 2025 09:52:14 +0000 (10:52 +0100)]
Ispell: Use "personal dictionary" terminology consistently

* lisp/textmodes/ispell.el (ispell-command-loop, ispell-help): Use
consistent terminology when referring to "personal dictionary".
(Bug#75802)

(cherry picked from commit 5638b1d6bd41e822796cbba1e1692c0899183bb5)

4 weeks agoDisable more redisplay optimizations when child frames are visible
Gerd Möllmann [Fri, 24 Jan 2025 10:18:54 +0000 (11:18 +0100)]
Disable more redisplay optimizations when child frames are visible

* src/xdisp.c (redisplay_internal): Disable more optimizations
on a tty root frame displaying a child frame.
(try_cursor_movement,(try_window_reusing_current_matrix)
(try_window_id): Don't use on tty root frames displaying a child frame.

(cherry picked from commit 07a2a67e3bfd674daad7a7d8947a0ab67b4e13e8)

4 weeks ago; * src/dispnew.c (combine_updates_for_frame): Fix whitespace.
Eli Zaretskii [Fri, 24 Jan 2025 08:41:00 +0000 (10:41 +0200)]
; * src/dispnew.c (combine_updates_for_frame): Fix whitespace.

(cherry picked from commit 5e657ad1fe2567f7d21639dbac40949870fe76f9)

4 weeks agoRevert "; * src/dispnew.c (combine_updates_for_frame): Fix whitespace."
Eli Zaretskii [Fri, 24 Jan 2025 08:40:14 +0000 (10:40 +0200)]
Revert "; * src/dispnew.c (combine_updates_for_frame): Fix whitespace."

This reverts commit c941b94e51f4e5996718416ac908249cb71da1d9.
It was pushed by mistake.

(cherry picked from commit 6c633ece6e6743d9724ff116322e573ddf79d79f)

4 weeks ago; * src/dispnew.c (combine_updates_for_frame): Fix whitespace.
Eli Zaretskii [Fri, 24 Jan 2025 08:26:26 +0000 (10:26 +0200)]
; * src/dispnew.c (combine_updates_for_frame): Fix whitespace.

(cherry picked from commit c941b94e51f4e5996718416ac908249cb71da1d9)

4 weeks agoHandle update of invisible tty frames (bug#75056)
Gerd Möllmann [Thu, 23 Jan 2025 19:53:50 +0000 (20:53 +0100)]
Handle update of invisible tty frames (bug#75056)

* src/dispnew.c (combine_updates_for_frame): Don't assume root frame is
visible.

(cherry picked from commit 15315780ae36cc2af6e276165562dc793334c2f9)

4 weeks ago; Check man pages for mistakes less frequently
Stefan Kangas [Fri, 24 Jan 2025 00:53:21 +0000 (01:53 +0100)]
; Check man pages for mistakes less frequently

* admin/make-tarball.txt: Move checking man pages from here...
* admin/release-process: ...to here.

(cherry picked from commit cc791e7499fb2cc64a317e340fc90b45fb683da7)

4 weeks ago; * admin/release-process: Minor copy-edits.
Stefan Kangas [Fri, 24 Jan 2025 00:40:55 +0000 (01:40 +0100)]
; * admin/release-process: Minor copy-edits.

(cherry picked from commit 4ed4792e3b9f77a504925ca46b2181b5e823556b)

4 weeks agoSupport loading dynamic docstrings from Emacs <29
Stefan Kangas [Thu, 23 Jan 2025 23:44:21 +0000 (00:44 +0100)]
Support loading dynamic docstrings from Emacs <29

* src/doc.c (get_doc_string): Take absolute value to be compatible with
bytecode from Emacs <29.

(cherry picked from commit f14c24dbe7f65786115f8f62a337be45996c38b8)

4 weeks agoDon't use negative positions for docstrings
Stefan Kangas [Thu, 23 Jan 2025 23:16:08 +0000 (00:16 +0100)]
Don't use negative positions for docstrings

These were used for user-variables (doc starts with a '*'), but we don't
use that convention any more.  On my machine, there are no docstrings
starting with a '*' in etc/DOC.

* src/doc.c (Fsnarf_documentation): Never use negative positions.
(get_doc_string): Don't use eabs; position must now be positive, and all
callers are verified to do that.

(cherry picked from commit c7f6da7a4141a9f3492b8dbb0c1de710bd4757fa)

4 weeks agoFix GC bug causing incorrect 'format' output (Bug#75754)
Pip Cet [Wed, 22 Jan 2025 19:08:02 +0000 (19:08 +0000)]
Fix GC bug causing incorrect 'format' output (Bug#75754)

This fixes the correctness bug discovered in bug#75754, but not the
performance issue or excessive stack usage.

* src/editfns.c (styled_format): Split 'info' array into two arrays,
one of them allocated via SAFE_ALLOCA_LISP for GC protection.

(cherry picked from commit ed5067e689a5e38795d5c27c5a688886d259a298)

4 weeks agoSimplify Fdocumentation and Fdocumentation_property
Stefan Kangas [Thu, 23 Jan 2025 17:45:14 +0000 (18:45 +0100)]
Simplify Fdocumentation and Fdocumentation_property

* src/doc.c (Fdocumentation, Fdocumentation_property): Simplify;
reread_doc_file always returns true so just assume that.
(reread_doc_file): Change return type to void.

(cherry picked from commit 990b0811adefb4b792d36797540e5773791437f9)

4 weeks agoAdd language server "ruff server" for Python
Stefan Kangas [Thu, 23 Jan 2025 17:32:29 +0000 (18:32 +0100)]
Add language server "ruff server" for Python

* lisp/progmodes/eglot.el (eglot-server-programs): Add "ruff
server" for Python.

(cherry picked from commit 4a867c823b77fc77be57f13d355fe9469281d653)

4 weeks agoFix go-ts-mode type declaration indentation (Bug#75785)
Randy Taylor [Thu, 23 Jan 2025 16:16:34 +0000 (11:16 -0500)]
Fix go-ts-mode type declaration indentation (Bug#75785)

* lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules):
Add rule for type_declaration.

(cherry picked from commit 9e687c2871f8fd6146b0c5591d65ee61d8374c5e)

4 weeks agoEglot: skip Tramp tests except on Emacs 28+
João Távora [Thu, 23 Jan 2025 11:20:38 +0000 (11:20 +0000)]
Eglot: skip Tramp tests except on Emacs 28+

* test/lisp/progmodes/eglot-tests.el
(eglot--call-with-tramp-test): Fix

(cherry picked from commit c888e726ca9092fedd98e80e40c28b0fa54a34be)

4 weeks agoHandle tty menus overlapping child frames
Gerd Möllmann [Thu, 23 Jan 2025 14:30:30 +0000 (15:30 +0100)]
Handle tty menus overlapping child frames

* src/dispnew.c (frame_pos_abs, is_frame_ancestor): Make externally
visible.
* src/dispextern.h: Declare above functions.
* src/term.c (mouse_get_xy): Handle mouse movement over child frames.

(cherry picked from commit d83d090de1127d6e88e4ff33a617d8621a85a8cd)

4 weeks ago; * lisp/emacs-lisp/shortdoc.el (map): Fix copy'n'pasto.
Robert Pluim [Thu, 23 Jan 2025 12:27:40 +0000 (13:27 +0100)]
; * lisp/emacs-lisp/shortdoc.el (map): Fix copy'n'pasto.

(cherry picked from commit da3b93ff9658481fa81a1dbd49618ed8792f9f3b)

4 weeks ago; Minor improvements for doc strings in map.el
Eli Zaretskii [Thu, 23 Jan 2025 10:29:04 +0000 (12:29 +0200)]
; Minor improvements for doc strings in map.el

* lisp/emacs-lisp/map.el (map-let, map-put, map-apply)
(map-values-apply, map-some, map-every-p, map--merge)
(map-merge-with, map-put!): Doc fixes.

(cherry picked from commit f751b3afa4f5646625293cb5484606842f96495e)

4 weeks agoAdd shortdoc for map.el functions
Robert Pluim [Thu, 23 Jan 2025 10:17:12 +0000 (11:17 +0100)]
Add shortdoc for map.el functions

* lisp/emacs-lisp/shortdoc.el (map): New shortdoc group.

(cherry picked from commit 67480c159ed3a4b3c8a93f6dbe0317617cf6ee26)

4 weeks ago; Fix typos
Stefan Kangas [Thu, 23 Jan 2025 02:13:01 +0000 (03:13 +0100)]
; Fix typos

(cherry picked from commit cda78edc7d9194181bcda1790f29cb7cf3ceb0b9)

4 weeks ago; * src/w32.c (w32_memory_info): Fix coding style of last change.
Eli Zaretskii [Tue, 21 Jan 2025 19:25:15 +0000 (21:25 +0200)]
; * src/w32.c (w32_memory_info): Fix coding style of last change.

(cherry picked from commit ce50a1d3c18bcf0e5f51f4ed49f292f7be31010d)

4 weeks agoFix bug in w32_memory_info
Arthur Miller [Tue, 21 Jan 2025 18:10:14 +0000 (19:10 +0100)]
Fix bug in w32_memory_info

* src/w32.c (w32_memory_info): Initialize struct size.

(cherry picked from commit 58d3d4820ad327f07cea5894a9675bf30553461e)

4 weeks agoAvoid crashes in redisplay due to problematic font setups
Eli Zaretskii [Tue, 21 Jan 2025 12:24:57 +0000 (14:24 +0200)]
Avoid crashes in redisplay due to problematic font setups

* src/xdisp.c (handle_single_display_spec)
(produce_stretch_glyph): Avoid crashes if a face's font is NULL.
(Bug#75725)

(cherry picked from commit 77386412050fa348940bf83c5d736ff7b745d5d8)

4 weeks agoImprove 'key-valid-p' docstring
Robert Pluim [Fri, 17 Jan 2025 08:44:32 +0000 (09:44 +0100)]
Improve 'key-valid-p' docstring

* lisp/keymap.el (key-valid-p): Add "RET", "<return>", and "C-m"
examples.

(Bug#75586)

(cherry picked from commit 0e3687e6006ea93603a032056c6af99a242c6af5)

4 weeks agoMinor copyedits in internals.texi
Stefan Kangas [Sun, 19 Jan 2025 13:28:30 +0000 (14:28 +0100)]
Minor copyedits in internals.texi

* doc/lispref/internals.texi (Writing Emacs Primitives): Minor
copyedits.

(cherry picked from commit 9878092d2b9114d70149c3d9ce1c24e2825138ae)

4 weeks agoBetter document side-effect free and pure C functions
Stefan Kangas [Sun, 19 Jan 2025 12:57:23 +0000 (13:57 +0100)]
Better document side-effect free and pure C functions

* doc/lispref/internals.texi (Writing Emacs Primitives):
Document that side-effect free and pure properties of C functions
are defined in byte-opt.el.

(cherry picked from commit 4726900fdc5b0736feb03e928594eb64262f9bd5)

4 weeks ago; Fix documentation about faces of tool-tip text
Eli Zaretskii [Sat, 18 Jan 2025 13:07:52 +0000 (15:07 +0200)]
; Fix documentation about faces of tool-tip text

* lisp/tooltip.el (tooltip):
* src/frame.c (syms_of_frame) <use-system-tooltips>: Doc fixes.

(cherry picked from commit 04c475a39f25b09b557e3183bcd5340d75120e0c)