Commit graph

176370 commits

Author SHA1 Message Date
Gerd Möllmann
7c10518d16 Merge branch 'master' into scratch/se-matrix 2025-01-23 15:38:26 +01: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
24ee721795 Merge branch 'master' into scratch/se-matrix 2025-01-23 11:09:56 +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
b4204bea34 Merge branch 'master' into scratch/se-matrix 2025-01-23 08:10:04 +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
João Távora
a60249b098 Eglot: abandon compat.el
After period of months using this to help compatibility to older Emacs
versions.  It's not really buying us that much and complicates
maintenance, so it gets the axe.

A common problem is the compatibility alias for require-with-check,
which often errors with some "Feature X loaded from Y is now provided by
Z".  The tests for Emacs 26.3 were all failing in the Github tracker
ever since this (and track-changes.el) were added to Eglot.

* lisp/progmodes/eglot.el (compat): No longer require.
(eglot-alternatives): Reword comment.
(eglot-alternatives): Call eglot--executable-find.
(eglot--guess-contact): Call eglot--executable-find.
(eglot--connect): Check if package-get-version exists.
(eglot--format): Check if substitute-quotes exists.
(eglot--format-markup): Check if text-property-search exists.
2025-01-22 23:05:33 +00:00
João Távora
ac902ddadc Eglot: abandon track-changes.el
After a ~10 month period of using track-changes.el as a support library
for tracking buffer changes, I've decided to go back to manually using
after-change-functions and before-change-functions.

track-changes.el showed promise:

- One of the selling points was to turn complicated a-c-functions and
  b-c-functions into something easier, but that objectively didn't pan
  out, with "virtual" positions, one-shot hooks, and tracker
  registrations being abstractions and complications mastered by very
  few.

- The other selling point was the ability to log and detect those parts
  of Emacs that cheat the modification hooks and correct them.  As far
  as I can tell, only one such cheater -- quail.el -- was identified.
  But with little consequence, only an ugly workaround in eglot.el (now
  removed).

- After using Eglot daily for all this time, I didn't notice any
  decrease in desynchronization events.

- I did notice an increase in track-changes.el related bugs, some of
  which still baffle me and and hard to reproduce.  A common occurence
  is the '(cl-assertion-failed (memq id track-changes--trackers))'
  which is hard to track down.

- The library makes it more complicated to run Eglot on older Emacsen.

I might yet revisit this matter for the next version but this
experience has shown that it didn't bring the advantages I thought it
would, so I'm abandoning it until at least 1.19 is out.

* lisp/progmodes/eglot.el (track-changes): No longer require.
(eglot--virtual-pos-to-lsp-position): Delete.
(eglot--managed-mode): Simplify.
(eglot--track-changes): Delete this variable.
(eglot--recent-changes): Reword doc.
(eglot--before-change, eglot--after-change): Bring back.
(eglot--track-changes-fetch): Delete.
(eglot--add-one-shot-hook): Delete.
(eglot--track-changes-signal): Delete.
2025-01-22 23:02:35 +00:00
Stefan Kangas
d3ada49a37 Minor image_error related cleanups
* src/image.c (image_create_x_image_and_pixmap_1): Avoid temporary
variable by passing the value directly to image_error.
(tiff_handler): Prefer image_error to add_to_log for local
consistency.
2025-01-22 23:42:13 +01:00
Pip Cet
bf55eb1a8a ; * src/pdumper.c (dump_hash_table): Adjust hash; bitfields changed. 2025-01-22 19:50:31 +00:00
Paul Eggert
34166dcf9c Port allows-stdout test to overly-suspicious bwrap
* test/src/emacs-tests.el (emacs-tests/bwrap/allows-stdout):
Skip test if bwrap prohibits even "echo Hi",
which it does on my Ubuntu 24.10 platform.
This extra check means we no longer need to test
separately whether the filter is readable.
2025-01-22 11:04:57 -08:00
Gerd Möllmann
25b8321069 Revert "Don't use a redisplay optimization in a certain case on ttys"
This reverts commit 0fd5b2d146.
2025-01-22 14:56:02 +01:00
Paul Eggert
2efffbe773 Don’t silently truncate connection-lost diagnostic
* src/xterm.c (x_io_error_quitter): Do not silently truncate
the diagnostic when a connection is lost to an X server.
2025-01-21 22:31:00 -08:00
Paul Eggert
db9ea9b77a Check for snprintf truncation in pgtkterm
* src/pgtkterm.c (pgtk_enumerate_devices):
Abort if snprintf truncated.
2025-01-21 22:31:00 -08:00
Paul Eggert
4a25ed300f Port pdumper to unlikely long sprintf output
* src/pdumper.c (dump_ptr_referrer): Port to platforms
where sprintf %p generates absurdly long output.
(dump_vectorlike): Port to hypothetical platforms
where %d generates absurdly long output.
2025-01-21 22:31:00 -08:00
Paul Eggert
8ff7338fdd When debugging image.c, abort if silent truncation
* src/image.c (image_build_heuristic_mask, png_load_body):
Abort if snprintf truncated.  (If truncation is not possible
here we should use sprintf instead, as that simplifies
automatic runtime checking.)
2025-01-21 22:31:00 -08:00
Gerd Möllmann
af7ac8e625 Merge branch 'master' into scratch/se-matrix 2025-01-22 04:39:58 +01:00
Pip Cet
6ea1e03fe7 Destroy GTK tool bar widget if it was never attached (bug#75636)
* src/gtkutil.c (xg_free_frame_widgets): Call gtk_widget_destroy on an
unpacked toolbar widget.
2025-01-22 00:59:06 +00:00
Stefan Kangas
cdcfffd50a Prefer snprintf to sprintf in image.c
* src/image.c (image_background, image_build_heuristic_mask)
(png_load_body): Prefer snprintf to sprintf.
2025-01-22 00:49:50 +01:00
Stefan Kangas
5f108cb663 Delete some duplicate face attributes
* etc/themes/leuven-dark-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/manoj-dark-theme.el: Delete duplicate face attributes.
2025-01-21 21:46:54 +01:00
Gerd Möllmann
d30f40868b Improve copying current glyphs when building frame matrix
* src/dispnew.c (build_frame_matrix_from_leaf_window): Don't make space
glyphs. More comments.
2025-01-21 20:43:17 +01:00
Pip Cet
1f02677500 ; * src/gtkutil.c (free_frame_tool_bar): Remove redundant assignment. 2025-01-21 19:13:24 +00:00
Pip Cet
d7bdaa4170 Handle unknown units provided by the rsvg library (bug#75712)
* src/image.c (svg_css_length_to_pixels): Restructure so GCC warns
about new enum members.  Add case for RSVG_UNIT_CH.  Warn about
unknown units discovered at runtime.
2025-01-21 19:04:11 +00:00
Gerd Möllmann
0fd5b2d146 Don't use a redisplay optimization in a certain case on ttys
* src/dispnew.c (is_tty_root_frame_with_visible_child): New function.
* src/dispextern.h: Declare it.
* src/xdisp.c (redisplay_internal): Don't use optimization 1 for tty root
frames with a visible child frame.
2025-01-21 19:31:53 +01:00
Gerd Möllmann
eaa79e25a6 Remove a false #ifdef HAVE_WINDOW_SYSTEM
* src/xdiso.c (update_tab_bar)_ Don't use #ifdef HAVE_WINDOW_SYSTEM for
setting the selected frame. That only makes a build without window
system misbehave.
2025-01-21 19:30:54 +01:00
Robert Pluim
14e686e6cc Signal error when keyword/arg list is malformed
* src/data.c (syms_of_data): Add Qmalformed_keyword_arg_list
error symbol.

* src/process.c (Fmake_process, Fmake_pipe_process)
(Fserial_process_configure, Fmake_serial_process)
(Fmake_network_process): Signal Qmalformed_keyword_arg_list when
the argument list length is odd.
* src/sound.c (parse_sound): Also here..
* src/w32fns.c (Fw32_notification_notify): ..and here.

(Bug#75584)
2025-01-21 17:41:35 +01:00
Stefan Kangas
64d314e0f6 Prefer defface's ':slant italic' to obsolete alias ':italic t'
* etc/themes/manoj-dark-theme.el (manoj-dark):
* etc/themes/modus-themes.el (modus-themes-faces):
* etc/themes/manoj-dark-theme.el (manoj-dark):
* etc/themes/modus-themes.el (modus-themes-faces):
* lisp/emacs-lisp/eieio-custom.el (eieio-custom-slot-tag-face):
* lisp/gnus/gnus-art.el (gnus-emphasis-italic)
(gnus-emphasis-underline-italic, gnus-emphasis-bold-italic)
(gnus-emphasis-underline-bold-italic, gnus-signature)
(gnus-header-from, gnus-header-subject, gnus-header-newsgroups)
(gnus-header-content):
* lisp/gnus/gnus-cite.el (gnus-cite-attribution, gnus-cite-1)
(gnus-cite-2, gnus-cite-3, gnus-cite-4, gnus-cite-5, gnus-cite-6)
(gnus-cite-7, gnus-cite-8, gnus-cite-9, gnus-cite-10, gnus-cite-11):
* lisp/gnus/gnus-srvr.el (gnus-server-cloud-host)
(gnus-server-closed):
* lisp/gnus/gnus.el (gnus-group-mail-1-empty)
(gnus-group-mail-2-empty, gnus-summary-low-ticked)
(gnus-summary-low-ancient, gnus-summary-low-undownloaded)
(gnus-summary-low-unread, gnus-summary-low-read):
* lisp/gnus/message.el (message-header-to)
(message-header-newsgroups, message-header-other):
* lisp/gnus/mm-decode.el (mm-command-output):
* lisp/mh-e/mh-e.el (mh-face-data, mh-folder-body):
* lisp/net/dictionary.el (dictionary-word-entry-face):
* lisp/org/org-faces.el (org-formula, org-agenda-date-today)
(org-scheduled, org-scheduled-today):
* lisp/proced.el (proced-interruptible-sleep-status-code):
* lisp/progmodes/prolog.el (prolog-font-lock-keywords):
* lisp/progmodes/verilog-mode.el (verilog-font-lock-translate-off-face)
(verilog-font-lock-p1800-face, verilog-font-lock-ams-face)
(verilog-font-lock-grouping-keywords-face):
* lisp/progmodes/vhdl-mode.el (vhdl-font-lock-attribute-face)
(vhdl-font-lock-enumvalue-face, vhdl-font-lock-function-face)
(vhdl-font-lock-directive-face):
* lisp/transient.el (transient-inapt-suffix):
* lisp/vc/ediff-init.el (ediff-even-diff-A, ediff-even-diff-B)
(ediff-even-diff-C, ediff-even-diff-Ancestor, ediff-odd-diff-A)
(ediff-odd-diff-B, ediff-odd-diff-C, ediff-odd-diff-Ancestor):
Prefer defface attribute ':slant italic' to its obsolete alias
':italic t'.  See also Bug#73552.
2025-01-21 09:56:59 +01:00
Stefan Kangas
375befcacc Prefer defface's ':weight bold' to obsolete alias ':bold t'
* etc/themes/adwaita-theme.el (adwaita):
* etc/themes/manoj-dark-theme.el (manoj-dark):
* etc/themes/modus-themes.el (modus-themes-faces):
* lisp/gnus/gnus-srvr.el (gnus-server-agent, gnus-server-cloud)
(gnus-server-opened, gnus-server-denied, gnus-server-offline):
* lisp/gnus/gnus.el (gnus-group-news-1, gnus-group-news-2)
(gnus-group-news-3, gnus-group-news-4, gnus-group-news-5)
(gnus-group-news-6, gnus-group-news-low, gnus-group-mail-1)
(gnus-group-mail-2, gnus-group-mail-3, gnus-group-mail-low-empty)
(gnus-group-mail-low, gnus-summary-high-ticked)
(gnus-summary-high-ancient, gnus-summary-high-undownloaded)
(gnus-summary-high-unread, gnus-summary-high-read):
* lisp/gnus/message.el (message-header-to, message-header-cc)
(message-header-subject, message-header-newsgroups)
(message-header-other, message-header-name, message-header-xheader)
(message-separator, message-cited-text-1, message-cited-text-2)
(message-cited-text-3, message-cited-text-4, message-mml)
(message-signature-separator):
* lisp/mh-e/mh-e.el (mh-face-data, mh-folder-cur-msg-number)
(mh-speedbar-folder-with-unseen-messages)
(mh-speedbar-selected-folder-with-unseen-messages):
* lisp/net/dictionary.el (dictionary-button-face):
* lisp/org/org-faces.el (org-drawer, org-tag, org-list-dt, org-todo)
(org-done, org-headline-todo, org-formula, org-agenda-structure)
(org-scheduled, org-scheduled-today, org-scheduled-previously)
(org-upcoming-deadline):
* lisp/proced.el (proced-uninterruptible-sleep-status-code)
(proced-executable, proced-cpu, proced-user, proced-time-colon):
* lisp/progmodes/erts-mode.el (erts-mode-specification-name)
(erts-mode-specification-value):
* lisp/progmodes/prolog.el (prolog-font-lock-keywords):
* lisp/progmodes/verilog-mode.el (verilog-font-lock-p1800-face)
(verilog-font-lock-ams-face)
(verilog-font-lock-grouping-keywords-face):
* lisp/progmodes/vhdl-mode.el (vhdl-font-lock-prompt-face)
(vhdl-font-lock-attribute-face, vhdl-font-lock-enumvalue-face)
(vhdl-font-lock-function-face, vhdl-font-lock-directive-face)
(vhdl-font-lock-reserved-words-face): Prefer defface attribute
':weight bold' to its obsolete alias ':bold t'.  See also Bug#73552.
2025-01-21 09:29:09 +01:00
Gerd Möllmann
3ecb84ef0b Fix adding a right border glyph
* src/dispnew.c (build_frame_matrix_from_leaf_window):
Add a right border glyph also when copying from a current row.
2025-01-21 06:45:06 +01:00
Gerd Möllmann
44ae48421a Simplify matrix copying by using existing functions
* src/xdisp.c (deep_copy_glyph_row): Make externally visible.
* src/dispextern.h: Declare it.
* src/dispnew.c (copy_pool): Simplify.
(copy_row): Removed.
(copy_matrix): Take a frame parameter.
(copy_desired_row): Use adjust_glyph_matrix and deep_copy_glyph_row.
(copy_frame_desired_matrix): Use deep_copy_glyph_row.
(copy_pool_and_matrix): Take a frame parameter.
(make_terminal_matrices): Adjusted.
2025-01-21 06:45:06 +01:00
Gerd Möllmann
f126c8d927 Fix copying frame desired matrix
* src/dispnew.c (unwind_restore_matrices): Clear desired matrix.
2025-01-21 04:46:06 +01:00
João Távora
49f449bb5b Eglot: release version 1.18
* etc/EGLOT-NEWS: Update.

* lisp/progmodes/eglot.el (Version): Bump to 1.18
2025-01-20 21:44:45 +00:00
João Távora
aa94e1c56c Eglot: fix signature's of Eglot's ElDoc functions
These functions are specified to be passed at least one
argument, so our implementation must accept an arbitrary number
of arguments.

* lisp/progmodes/eglot.el (eglot-signature-eldoc-function)
(eglot-hover-eldoc-function): Fix signature.
2025-01-20 19:21:29 +00:00
João Távora
1143cf09a3 Eglot: add support for insertReplaceEdit (bug#73857)
* lisp/progmodes/eglot.el (eglot-server-programs): Mention zig-ts-mode.
(eglot--lsp-interface-alist): Describe 'InsertReplaceEdit'.
(eglot-client-capabilities): Advertise 'insertReplaceSupport'.
(eglot-completion-at-point): Consider 'InsertReplaceEdit'.
(eglot--apply-text-edits): Consider 'InsertReplaceEdit'.

* test/lisp/progmodes/eglot-tests.el
(eglot-test-zig-insert-replace-completion): New test.

Special thanks to kcbanner@gmail.com
2025-01-20 18:58:05 +00:00
João Távora
a1ce633ca9 Eglot: make eglot-test-javascript-basic more robust
* test/lisp/progmodes/eglot-tests.el
(eglot-test-javascript-basic): Mark test expensive and increase timeout.
2025-01-20 17:43:35 +00:00
João Távora
73f51f3a99 Eglot: try again to fix try-completion logic
Emacs partial completion simply doesn't make sense in LSP.
Attempts to make it make some sense end up failing for one
reason or another.

This commit restores the original intention of the
eglot--dumb-allc and eglot--dumb-tryc functions, which was to be
dumb and pop up a *Completions* buffer (or a company tooltip),
as soon as there is doubt over what the user wants to do.

It also fixes tests, including an expensive Rust test that had
been broken for a long time.

* lisp/progmodes/eglot.el (eglot--dumb-allc): Consider point.
(eglot--dumb-tryc): Make it suitably dumb again.

* test/lisp/progmodes/eglot-tests.el
(eglot--wait-for-rust-analyzer): Wait longer.
(eglot-test-common-prefix-completion): Delete this test.  It's not
the intended behavior.
(eglot--kill-completions-buffer): New helper.
(eglot-test-try-completion-nomatch): Rework test.
(eglot-test-try-completion-inside-symbol): Pops *Completions*
buffer because mustn't partial complete.
(eglot-test-try-completion-inside-symbol-2): Does complete.
(eglot-test-rust-completion-exit-function): Fix long-broken test.
2025-01-20 17:43:35 +00:00
Stefan Kangas
275df7420c Prefer defvar-keymap in bat-mode.el
* lisp/progmodes/bat-mode.el (bat-mode-map): Prefer defvar-keymap.
(bat-menu): Move to top level.
2025-01-20 18:32:33 +01:00
Gerd Möllmann
9d8cf7ec13 Remove a false #ifdef HAVE_WINDOW_SYSTEM 2025-01-20 18:18:09 +01:00