1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00
Commit graph

176387 commits

Author SHA1 Message Date
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
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
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
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
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
Eli Zaretskii
5e657ad1fe ; * src/dispnew.c (combine_updates_for_frame): Fix whitespace. 2025-01-24 10:41:00 +02:00
Eli Zaretskii
6c633ece6e Revert "; * src/dispnew.c (combine_updates_for_frame): Fix whitespace."
This reverts commit c941b94e51.
It was pushed by mistake.
2025-01-24 10:40:14 +02:00
Eli Zaretskii
c941b94e51 ; * src/dispnew.c (combine_updates_for_frame): Fix whitespace. 2025-01-24 10:26:26 +02:00
Gerd Möllmann
15315780ae Handle update of invisible tty frames (bug#75056)
* src/dispnew.c (combine_updates_for_frame): Don't assume root frame is
visible.
2025-01-24 06:25:08 +01:00
Stefan Kangas
f14c24dbe7 Support loading dynamic docstrings from Emacs <29
* src/doc.c (get_doc_string): Take absolute value to be compatible with
bytecode from Emacs <29.
2025-01-24 00:48:17 +01:00
Stefan Kangas
c7f6da7a41 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.
2025-01-24 00:16:08 +01:00
Pip Cet
ed5067e689 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.
2025-01-23 18:00:01 +00:00
Stefan Kangas
990b0811ad 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.
2025-01-23 18:45:14 +01:00
João Távora
c888e726ca Eglot: skip Tramp tests except on Emacs 28+
* test/lisp/progmodes/eglot-tests.el
(eglot--call-with-tramp-test): Fix
2025-01-23 15:52:07 +00:00
Gerd Möllmann
d83d090de1 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.
2025-01-23 15:34:36 +01:00
Robert Pluim
da3b93ff96 ; * lisp/emacs-lisp/shortdoc.el (map): Fix copy'n'pasto. 2025-01-23 13:29:26 +01:00
Robert Pluim
67480c159e Add shortdoc for map.el functions
* lisp/emacs-lisp/shortdoc.el (map): New shortdoc group.
2025-01-23 11:27:10 +01:00
Gerd Möllmann
076cd69fc2 Don't forget setting the top frame if not switching root frames
* src/frame.c (do_switch_frame): Make sure to set top frame in all
cases.
2025-01-23 11:09:19 +01:00
Gerd Möllmann
b1ec006e9f Fix setting a tty's top frame when switching frames
* src/frame.c (do_switch_frame): Compare root frames correctly.
2025-01-23 07:54:48 +01:00
Eli Zaretskii
1dc529d463 ; * doc/lispref/elisp.texi (Top): Move menu item to submenu. 2025-01-23 07:45:54 +02:00
Eli Zaretskii
796665b32e ; * doc/lispref/functions.texi (Functions): Remove extraneous menu item. 2025-01-23 07:43:40 +02:00
Stephen Gildea
90b4c1b6f2 Fix ERT / find-function type integration typos
* lisp/emacs-lisp/ert.el (ert-test-location, ert-describe-test):
Correctly type the test object as 'ert--test'.
* lisp/emacs-lisp/find-func.el (find-ert-deftest-regexp): Remove this
duplicate, broken customization.
2025-01-22 19:22:24 -08:00
Stephen Gildea
aa6d2a396a * doc/lispref: new node "Finding Definitions"
How to use variable 'find-function-regexp-alist',
properties 'definition-name' and 'find-function-type-alist',
and function 'find-function-update-type-alist' to help Emacs
locate the definition of objects defined by macros.

This material is moved from node "Standard Properties" and expanded.
2025-01-22 18:31:10 -08:00
F. Jason Park
331bcfaee5 Reuse client cert for connectivity probing in ERC
* lisp/erc/erc-backend.el (erc--server-connect-function)
(erc--server-post-dial-function): Rename former to latter because the
existing name is better suited for the eventual generalizing of
`erc-server-connect' in a future version.
(erc-server-connect): Use new name for `erc--server-connect-function',
`erc--server-post-dial-function'.
(erc--recon-probe-reschedule, erc--recon-probe-sentinel)
(erc--recon-probe-filter, erc--recon-probe-check): New functions
factored out of `erc-server-delayed-check-reconnect'.
(erc-server-delayed-check-reconnect): Refactor, splitting off lambdas
into top-level functions for improved tracing.
* lisp/erc/erc.el (erc-message-english-recon-probe-hung-up)
(erc-message-english-recon-probe-nobody-home): New
variables.  (Bug#62044)

Thanks to Libera.Chat user arjan for reporting this bug, which
is new in ERC 5.6 and Emacs 30.1.
2025-01-22 16:07:55 -08:00
F. Jason Park
d6b210aa09 ; Don't quote localp argument to define-erc-module
* etc/ERC-NEWS: Rearrange some entries for 5.6.1.
* lisp/erc/erc-fill.el (erc-fill-wrap-mode):
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-mode)
(erc-command-indicator-mode):
* lisp/erc/erc-nicks.el (erc-nicks-mode):
* lisp/erc/erc-notify.el (erc-querypoll-mode):
* lisp/erc/erc-sasl.el (erc-sasl-mode):
* lisp/erc/erc-services.el (erc-services-regain-mode): Don't quote
localp argument.
* test/lisp/erc/erc-scenarios-misc.el (erc-nicks-track-faces/defer):
Skip on Emacs 27 due to recent CI failures.
* test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood): Adjust
timeout.
2025-01-22 16:07:55 -08:00
João Távora
92c5c1b786 Eglot: unbreak a rarely run test
* test/lisp/progmodes/eglot-tests.el
(eglot-test-snippet-completions-with-company): Don't expect fooba to be
there, do expect two completions to be candidates.
2025-01-22 23:07:36 +00:00
João Távora
47a938c889 Eglot: unbreak tests for older Emacsen
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Use skip-unless
2025-01-22 23:07:33 +00:00
João Távora
9068dcbd71 Eglot: fix edebug spec of eglot--dbind
* lisp/progmodes/eglot.el (eglot--dbind): Fix edebug spec.
2025-01-22 23:07:28 +00:00
João Távora
7e2f6ce0cb Eglot: unbreak completion in Emacs 26.3 (at least)
For reasons yet to be investigated, in some Emacs older versions,
callers of the completion table created by eglot-completion-at-point
will destroy text properties in the strings returned by the
"all-completions" call (destroy here means completely erase).  This
completely breaks Eglot completion.

(eglot-completion-at-point): Copy substrings in all-completions
call.
2025-01-22 23:07:15 +00:00