1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 14:30:42 -08:00
Commit graph

176424 commits

Author SHA1 Message Date
Stefan Kangas
6e2e7265a0 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.
2025-01-26 20:09:08 +01:00
Pip Cet
b07c12ce59 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.
2025-01-26 17:02:42 +00:00
Eli Zaretskii
8cfb4e35da ; 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.
2025-01-26 17:50:34 +02:00
Gerd Möllmann
4e78a3e117 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.
2025-01-26 16:41:01 +01:00
Tassilo Horn
01d93d56cd 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).
2025-01-26 09:44:59 +01:00
Gerd Möllmann
35d3927859 Change doc string of frame-visible-p
* src/frame.c (Fframe_visible_p): Don't say it always returns t for tty
frames.
2025-01-25 21:20:55 +01:00
Gerd Möllmann
85aec497c7 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.
2025-01-25 20:00:56 +01:00
Juri Linkov
63df216490 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).
2025-01-25 20:14:15 +02:00
Juri Linkov
3bc6b88cc7 * 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).
2025-01-25 19:59:56 +02:00
Stefan Monnier
442d04081b (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*`.
2025-01-25 10:40:25 -05:00
Eli Zaretskii
6016967e85 Merge from origin/emacs-30
67903f5909 Restore the old behavior of `bookmark-write-file'
062da7003f ; Improve prompts and error messages in 'info-look'
52dc01f1c8 ; * admin/admin.el (set-version): Note about Android.
fb282da2a0 Avoid double spaces around abbrevations in Texinfo
bc1ab8ac3d ; * doc/emacs/custom.texi (Init Rebinding): Fix spacing.
b41ef43af1 ; Fix previous change
5638b1d6bd Ispell: Use "personal dictionary" terminology consistently
cc791e7499 ; Check man pages for mistakes less frequently
4ed4792e3b ; * admin/release-process: Minor copy-edits.
4a867c823b Add language server "ruff server" for Python
9e687c2871 Fix go-ts-mode type declaration indentation (Bug#75785)
f751b3afa4 ; Minor improvements for doc strings in map.el
cda78edc7d ; Fix typos
ce50a1d3c1 ; * src/w32.c (w32_memory_info): Fix coding style of last...
58d3d4820a Fix bug in w32_memory_info
7738641205 Avoid crashes in redisplay due to problematic font setups
0e3687e600 Improve 'key-valid-p' docstring
9878092d2b Minor copyedits in internals.texi
4726900fdc Better document side-effect free and pure C functions
04c475a39f ; Fix documentation about faces of tool-tip text

# Conflicts:
#	admin/codespell/codespell.exclude
2025-01-25 10:06:19 -05:00
Eli Zaretskii
e8f173f0ba ; * src/term.c (handle_one_term_event): Fix last change. 2025-01-25 16:59:40 +02:00
Zhengyi Fu
67903f5909 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
2025-01-25 15:57:09 +02:00
Gerd Möllmann
1d08644116 Fix the mistake that led to the reverts
* src/terminal.c (raw_cursor_to): Fix reversed arguments.
2025-01-25 14:46:05 +01:00
Gerd Möllmann
20f2672377 Reapply "Multi-tty: selected frame can be a GUI frame"
This reverts commit d93d822285.
2025-01-25 14:46:05 +01:00
Gerd Möllmann
ccf3f8d21e Reapply "Fix mouse position handling for nested tty child frames"
This reverts commit e2cc52dbcd.
2025-01-25 14:46:05 +01:00
Gerd Möllmann
e839b83c82 Reapply "Fix tty-frame-at for nested tty child frames"
This reverts commit 9ad28959d6.
2025-01-25 14:46:05 +01:00
Gerd Möllmann
26b144f241 Reapply "Fix cursor positioning of nested tty child frames"
This reverts commit 65036323fc.
2025-01-25 14:46:05 +01:00
Gerd Möllmann
945ed044cd Reapply "Simplify absolute (x, y) computation on ttys"
This reverts commit 13fdcd730f.
2025-01-25 14:46:05 +01:00
Mauro Aranda
d4220a17c4 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.
2025-01-25 15:40:01 +02:00
Konstantin Kharlamov
0514619b2c 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)
2025-01-25 12:51:27 +02:00
Maxim Cournoyer
192355e54a 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
2025-01-25 12:17:32 +02:00
Mauro Aranda
d4ca688abe 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)
2025-01-25 12:14:44 +02:00
Eli Zaretskii
062da7003f ; 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)
2025-01-25 12:10:32 +02:00
Jared Finder
0f3d4e157f ; 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)
2025-01-25 11:58:28 +02:00
Stefan Monnier
5878c9ae7c 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/
2025-01-25 11:52:44 +02:00
Eli Zaretskii
1197e85e20 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-01-25 11:44:32 +02:00
Daniel Mendler
5294d450da 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)
2025-01-25 11:43:45 +02:00
Stefan Monnier
5ee12424b6 lisp/repeat.el: Don't expose cl-extra/cl-lib distinction 2025-01-25 04:42:01 -05:00
Daniel Mendler
35576fde56 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)
2025-01-25 11:41:44 +02:00
Vladimir Panteleev
5e0fc49f3b 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)
2025-01-25 11:14:01 +02:00
Gerd Möllmann
13fdcd730f Revert "Simplify absolute (x, y) computation on ttys"
This reverts commit 5e132835ad.
2025-01-25 09:39:56 +01:00
Gerd Möllmann
65036323fc Revert "Fix cursor positioning of nested tty child frames"
This reverts commit 8cbb3c7335.
2025-01-25 09:39:54 +01:00
Gerd Möllmann
9ad28959d6 Revert "Fix tty-frame-at for nested tty child frames"
This reverts commit 9693f2a95a.
2025-01-25 09:39:51 +01:00
Gerd Möllmann
e2cc52dbcd Revert "Fix mouse position handling for nested tty child frames"
This reverts commit f37559a1ee.
2025-01-25 09:39:47 +01:00
Gerd Möllmann
d93d822285 Revert "Multi-tty: selected frame can be a GUI frame"
This reverts commit 57b7c07b37.
2025-01-25 09:39:11 +01:00
Eli Zaretskii
52dc01f1c8 ; * admin/admin.el (set-version): Note about Android. 2025-01-25 10:38:29 +02:00
Gerd Möllmann
57b7c07b37 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.
2025-01-25 07:59:45 +01:00
Gerd Möllmann
f37559a1ee 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.
2025-01-25 07:35:51 +01:00
Gerd Möllmann
9693f2a95a Fix tty-frame-at for nested tty child frames
* src/term.c (tty_frame_at): Translate child frame origin to absolute
coordinates.
2025-01-25 07:35:51 +01:00
Gerd Möllmann
8cbb3c7335 Fix cursor positioning of nested tty child frames
* src/terminal.c (cursor_to, raw_cursor_to): Fix translation to root
coordinates.
2025-01-25 07:35:51 +01:00
Gerd Möllmann
5e132835ad 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.
2025-01-25 07:35:51 +01:00
Stefan Kangas
fb282da2a0 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
2025-01-24 23:10:23 +01:00
Stephen Gildea
a00e6e7143 ; 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'.
2025-01-24 10:14:30 -08:00
Stephen Gildea
77fe4fbeff ; * lisp/time-stamp.el: Improve two documentation strings 2025-01-24 09:45:50 -08:00
Stephen Gildea
0d38f1d07b ; * doc/emacs/files.texi: only one time stamp index entry 2025-01-24 08:55:41 -08:00
Robert Pluim
bc1ab8ac3d ; * doc/emacs/custom.texi (Init Rebinding): Fix spacing. 2025-01-24 16:55:15 +01:00
Robert Pluim
b41ef43af1 ; Fix previous change
* doc/emacs/fixit.texi (Spelling): Use "personal" instead of
"private" dictionary.
2025-01-24 15:58:47 +01:00
Rudolf Adamkovič
5638b1d6bd 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)
2025-01-24 13:58:27 +02:00
Gerd Möllmann
07a2a67e3b 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.
2025-01-24 11:32:59 +01:00