1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00
Commit Graph

174620 Commits

Author SHA1 Message Date
Eli Zaretskii
d4bd5a3cba Merge from origin/emacs-30
9b299dd79c Revert a recent change that caused redisplay slowdown
4eaab54896 ; * doc/lispref/display.texi (Low-Level Font): Fix wordin...
0a50019308 Indent ERT failure explanations rigidly
713069dd7a [Eglot] Stricter "expand common" behavior
096730510c eglot-tests.el: New tests for existing completion behavior
969498c25d Remove dangerous HTML edit from admin.el

# Conflicts:
#	etc/EGLOT-NEWS
2024-08-25 14:54:03 -04:00
Eli Zaretskii
22c228bba3 ; Merge from origin/emacs-30
The following commit was skipped:

52829bcee6 ; Fix bad references to other manuals
2024-08-25 14:53:04 -04:00
Eli Zaretskii
99f2354696 Merge from origin/emacs-30
8c251a4c41 ; Mention in PROBLEMS issues with long popup menus
0a626a64c7 * etc/emacs_lldb.py (Lisp_Object): PVEC_COMPILED -> PVEC_...
2024-08-25 14:53:04 -04:00
Eli Zaretskii
9b299dd79c Revert a recent change that caused redisplay slowdown
* src/xfaces.c (recompute_basic_faces): Revert the change which
caused recalculation of all the faces, as it made cursor motion
too slow.  Reported by Juri Linkov <juri@linkov.net> (bug#72692).
2024-08-25 21:43:59 +03:00
Eli Zaretskii
4eaab54896 ; * doc/lispref/display.texi (Low-Level Font): Fix wording (bug#72771). 2024-08-25 20:47:51 +03:00
Jim Porter
55aad592e1 Improve computation of indent depth in SHR and 'visual-wrap-prefix-mode'
Now, we get the average-width of the current font using
'string-pixel-width' and a specified space display spec, which doesn't
require the buffer to be displayed in a window (bug#72771).

* lisp/net/shr.el (shr-indent):
* lisp/visual-wrap.el (visual-wrap--content-prefix): Fix getting the
font when the buffer isn't displayed in a window.
(visual-wrap-fill-context-prefix): Fix indentation.
2024-08-25 10:05:37 -07:00
F. Jason Park
0a50019308 Indent ERT failure explanations rigidly
This also affects the listing of `should' forms produced by hitting
the L key on a test button in an ERT buffer.

* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Indent the pretty-printed result to match the caller's current column
as a reference indentation.
* test/lisp/emacs-lisp/ert-tests.el
(ert--pp-with-indentation-and-newline): New test.  (Bug#72561)
2024-08-25 09:01:02 -07:00
Dmitry Gutov
713069dd7a [Eglot] Stricter "expand common" behavior
* lisp/progmodes/eglot.el (eglot--dumb-tryc): Check that the
expanded string matches every completion strictly (bug#72705).
And in the fallback case, check whether the table matches the
original prefix at all.  Return nil otherwise.

* test/lisp/progmodes/eglot-tests.el
(eglot-test-stop-completion-on-nonprefix)
(eglot-test-try-completion-nomatch): Corresponding tests.

* etc/EGLOT-NEWS: New entry.
2024-08-25 18:23:51 +03:00
Dmitry Gutov
096730510c eglot-tests.el: New tests for existing completion behavior
* test/lisp/progmodes/eglot-tests.el
(eglot-test-common-prefix-completion)
(eglot-test-try-completion-inside-symbol)
(eglot-test-rust-completion-exit-function): New tests.
(eglot--wait-for-rust-analyzer): New function.
2024-08-25 18:05:28 +03:00
Eli Zaretskii
969498c25d Remove dangerous HTML edit from admin.el
* admin/admin.el (manual-html-fix-index-2): Avoid lax matches with
"<ul>" which could mistakenly edit unrelated parts of HTML.
(Bug#72761)
2024-08-25 15:46:05 +03:00
Mattias Engdegård
3a8222e700 Faster region-beginning and region-end for rectangle selections
* lisp/rect.el (rectangle--region-beginning, rectangle--region-end):
Make these run in O(1), not linear, time and space.
2024-08-25 13:47:40 +02:00
Eli Zaretskii
52829bcee6 ; Fix bad references to other manuals
* doc/misc/bovine.texi (top, Optional Lambda Expression)
(Starting Rules, Bovine Grammar Rules, How Lexical Tokens Match):
* doc/misc/eudc.texi (Overview, Creating BBDB Records)
(Inline Query Expansion):
* doc/misc/dbus.texi (Top):
* doc/misc/efaq.texi (Top):
* doc/misc/wisent.texi (Wisent Semantic, Wisent Lex): Fix
cross-references to other manuals.  Remove redundant pointers from
Top node.  (Bug#72761)

(cherry picked from commit 7319f5e078)
2024-08-25 13:59:22 +03:00
Eli Zaretskii
7319f5e078 ; Fix bad references to other manuals
* doc/misc/bovine.texi (top, Optional Lambda Expression)
(Starting Rules, Bovine Grammar Rules, How Lexical Tokens Match):
* doc/misc/eudc.texi (Overview, Creating BBDB Records)
(Inline Query Expansion):
* doc/misc/dbus.texi (Top):
* doc/misc/efaq.texi (Top):
* doc/misc/wisent.texi (Wisent Semantic, Wisent Lex): Fix
cross-references to other manuals.  Remove redundant pointers from
Top node.
2024-08-25 13:55:35 +03:00
Michael Albinus
1f4da7fe3e ; Still fighting with emba.gnu.org config
* test/infra/gitlab-ci.yml (variables): Remove GIT_DEPTH.
(.job-template): Set cache:policy to pull-push, as before.  Check
behavior of docker export.
(.build-template): Remove needs and cache.
(.test-template): Remove cache.  Adapt artifacts:paths.
2024-08-25 12:18:01 +02:00
Eli Zaretskii
71505b723c Fix handling of 'min-width' display property
* src/xdisp.c (get_display_property, display_min_width): Rename
BUFPOS to CHARPOS, to avoid confusion (it is not necessarily a
buffer position).  Suggested by Jim Porter <jporterbugs@gmail.com>.
(get_display_property): Call 'Fget_char_property' to support
'min-width' properties of overlays as well.
(display_min_width): Handle the buffer and string cases more
accurately, without relying only on the values of positions.
(handle_display_prop, handle_single_display_spec): Pass correct
position to 'display_min_width', when iterating over a string.
(handle_display_prop): When OBJECT is a window, pass it to
display_min_width.
(set_iterator_to_next): Call 'display_min_width' when at end of a
display or overlay string.  (Bug#72721)

* etc/NEWS: Announce the support for overlays.
2024-08-25 10:24:35 +03:00
Eli Zaretskii
8c251a4c41 ; Mention in PROBLEMS issues with long popup menus
* etc/PROBLEMS: Problems with very long popup menus on Lucid
builds.  (Bug#72791)
2024-08-25 09:04:21 +03:00
Eli Zaretskii
8a94cee3b5 ; * src/treesit.c (Ftreesit_parse_string): Fix comment and punctuation. 2024-08-25 08:48:23 +03:00
Yuan Fu
f322905f6a
Fix Ftreesit_parser_create
* src/treesit.c (Ftreesit_parser_create): We recently changed something
such that base buffer and indirect buffer appears to use separate
parser-lists.  Therefore, creating a parser in one of the buffer
shouldn't reuse the parser in another buffer.
2024-08-24 15:25:48 -07:00
Yuan Fu
ac98ff18f4
Fix tree-sitter test for indirect parser list
* test/src/treesit-tests.el (treesit-indirect-buffer): Now the base
buffer shouldn't contain indirect buffer's parsers.
2024-08-24 15:15:27 -07:00
Yuan Fu
4339e70a94
Make sure treesit-parse-string gc its temp buffer (bug#71012)
* doc/lispref/parsing.texi (Using Parser): Add notice.
* lisp/treesit.el (treesit-parse-string): Remove function.
* src/treesit.c (make_treesit_parser): Init the new filed.
(treesit_delete_parser): Collect the temp buffer.
(Ftreesit_parse_string): New function.
* src/treesit.h (Lisp_TS_Parser): New field.
2024-08-24 15:15:23 -07:00
Björn Bidar
32afdcca88 Forward user to auth-source inside url-basic-auth
* lisp/url/url-auth.el (url-basic-auth): Forward the user if
provided by the url or found by 'auth-source' when searching
for secrets.  Supplying 'auth-source' with the user when
matching secrets allows for more accurate retrieval and fixes
instances where the user enters an url that already contains
the user such as "user@host.de".  (Bug#72526)
2024-08-24 15:49:42 +03:00
Mattias Engdegård
0a626a64c7 * etc/emacs_lldb.py (Lisp_Object): PVEC_COMPILED -> PVEC_CLOSURE 2024-08-24 14:41:41 +02:00
Michael Albinus
f41614ad54 ; * etc/NEWS: Fix typos. 2024-08-24 12:49:48 +02:00
Michael Albinus
16cb27d1d9 Optimize Tramp's copy-directory
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Don't check existence of DIRNAME, this is done in
`tramp-skeleton-copy-directory' already.

* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
Apply `tramp-do-copy-or-rename-file-directly' if possible.
2024-08-24 12:49:32 +02:00
Eli Zaretskii
1e528f38b5 Merge from origin/emacs-30
4211d85eec Fix rare segfaults due to freed fontsets
44c26140b6 ; Fix infloop in checkdoc-next-docstring
25f5372166 Avoid putting a dead buffer in the minibuffer window (Bug...
2024-08-24 06:04:51 -04:00
Eli Zaretskii
1d8ff948d7 ; Merge from origin/emacs-30
The following commit was skipped:

cfcba7ddc4 Eglot: bump version to 1.17.30 and update EGLOT-NEWS
2024-08-24 06:04:51 -04:00
Eli Zaretskii
a1bb92a13a Merge from origin/emacs-30
7e9d05e6d9 ; * admin/authors.el (authors-aliases): Escape periods.
2024-08-24 06:04:51 -04:00
Eli Zaretskii
8dced50f5f ; Merge from origin/emacs-30
The following commit was skipped:

391e6f99fc Update 'ldefs-boot.el' (don't merge)
2024-08-24 06:04:50 -04:00
Eli Zaretskii
3109383f6b Merge from origin/emacs-30
8ccc165f95 * doc/man/emacsclient.1: Bump date.
2024-08-24 06:04:50 -04:00
Eli Zaretskii
57bec35c8c ; Merge from origin/emacs-30
The following commits were skipped:

633cc24e4b Bump Emacs version to 30.0.90
e18db9c6d2 Update Changelogs
f9d229e925 Update AUTHORS
2024-08-24 06:04:50 -04:00
Eli Zaretskii
fe5548f48c Merge from origin/emacs-30
a0b65be8eb * admin/authors.el (authors-aliases, authors-ignored-file...
58088b36e8 * admin/authors.el: Pick-up version from emacs-29.
9d7151c0ff Add missing :version tags in use-package
3f019167b8 Suppress shallow cloning on emba

# Conflicts:
#	lisp/use-package/use-package-core.el
#	lisp/use-package/use-package-ensure.el
2024-08-24 06:04:47 -04:00
Spencer Baugh
69ec333eab Allow customizing partial-completion to be more like substring
The substring completion style completes "foo-bar" as "*foo-bar*".  The
partial-completion completion style completes "foo-bar" as "foo*bar*".

Previously, it was not possible to get completion of "foo-bar" to act as
"*foo*bar*", e.g. combining the partial-completion and substring styles.
This would be especially useful for things like project-find-file.

Now it is possible by customizing the completion-pcm-leading-wildcard variable
to a non-nil value.

Furthermore, it's convenient to be able to run
regular (completion-pcm-leading-wildcard=t, non-substring)
partial-completion before running completion-pcm-leading-wildcard=nil
partial-completion, since the former provides more narrowly targeted
completions.

It's possible to do this by customizing completion-styles.  Just add
'(partial-completion ((completion-pcm-leading-wildcard t))) and
'(partial-completion ((completion-pcm-leading-wildcard nil))) in that
order.  Then the completion machinery will first run partial-completion
with completion-pcm-leading-wildcard=t, and if that returns no
completions, run partial-completion with
completion-pcm-leading-wildcard=nil.

* lisp/minibuffer.el (completion--nth-completion): Allow an element of
completion-styles to contain a list of bindings.
(completion-styles): Document that.
(completion-pcm-leading-wildcard): Add.
(completion-pcm--string->pattern): Check completion-pcm-leading-wildcard.
(bug#70217)
2024-08-24 12:20:56 +03:00
Eli Zaretskii
4211d85eec Fix rare segfaults due to freed fontsets
* src/xfaces.c (recompute_basic_faces): Force complete
recalculation of all the faces.  (Bug#72692)
2024-08-24 12:07:02 +03:00
Björn Bidar
a7a22e7c22 Fix secret search with basic auth with a port in URL
* lisp/url/url-auth.el (url-basic-auth): Fix retrieving of
secrets when the URL contains a port.  Amending the port to
server breaks 'auth-source-search' matching for :host which
is redundant as it already specified in :port.  (Bug#72526)
2024-08-24 11:57:24 +03:00
Gautier Ponsinet
632cc76fb5 Allow using pulse.el with a single color without pulsation
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Add
the start color to the list of colors used for the pulsation
effect, to allow its use when 'pulse-iterations' is 1.
(Bug#72636)
2024-08-24 11:37:48 +03:00
Eli Zaretskii
c1181975ef Fix 'next-line' in batch mode.
* lisp/simple.el (line-move-finish): Don't use 'vertical-motion'
in batch mode.  Reported by john muhl <jm@pub.pink>.  (Bug#72420)
2024-08-24 11:02:01 +03:00
Eshel Yaron
44c26140b6
; Fix infloop in checkdoc-next-docstring
* lisp/emacs-lisp/checkdoc.el (checkdoc-next-docstring): Use
'beginning-of-defun-raw' instead of 'beginning-of-defun', as the latter
always moves back to beginning of line and thus is not guaranteed to
advance point when 'open-paren-in-column-0-is-defun-start' is non-nil.
(Bug#72759)
2024-08-23 17:18:32 +02:00
Robert Pluim
88b51c1c6b ; * Makefile.in (actual-all): Fix previous change. 2024-08-23 14:22:33 +02:00
Robert Pluim
7f97cf31dc Create blessmail at build time instead of install time
blessmail is built via the install target, which means it ends up owned
by the user doing the install.  It's not installed, so build it at build
time instead.

Reported by Michael Heerdegen <michael_heerdegen@web.de> in
<https://lists.gnu.org/archive/html/help-gnu-emacs/2024-08/msg00270.html>

* Makefile.in (install): Move blessmail target from install to actual-all.
2024-08-23 13:22:03 +02:00
Martin Rudalics
25f5372166 Avoid putting a dead buffer in the minibuffer window (Bug#72487)
* src/minibuf.c (minibuffer_unwind): Make sure that the buffer
referenced by the first element of the list of previous buffers
of the minibuffer window is live before assigning it to the
minibuffer window (Bug#72487).
* src/window.c (set_window_buffer): Assert that BUFFER is live.
2024-08-23 10:27:12 +02:00
Philip Kaludercic
f8d42e29a5
Add command to copy contents in a diff-mode buffer
* lisp/vc/diff-mode.el (diff-mode-shared-map): Bind 'diff-kill-ring-save'.
(diff-mode-map): Ensure the "w" binding does not get prefixed.
(diff-kill-ring-save): Add the command.
* etc/NEWS: Mention 'diff-kill-ring-save'.  (Bug#65380)
2024-08-22 20:58:39 +02:00
João Távora
cfcba7ddc4 Eglot: bump version to 1.17.30 and update EGLOT-NEWS
This is a change specific to emacs-30.  Don't merge to master.

* lisp/progmodes/eglot.el (Version): Mark it 1.17.30.

* etc/EGLOT-NEWS (1.17.30): Fill in section.
2024-08-22 17:28:11 +01:00
Eli Zaretskii
44e3eceeb0 Fix C-n/C-p under both 'line-prefix' and 'visual-line-mode'
* lisp/simple.el (line-move-finish): Use
'truncated-partial-width-window-p' to query whether partial-width
lines are actually truncated on display.  (Bug#72420)
2024-08-22 17:29:46 +03:00
Eli Zaretskii
7e9d05e6d9 ; * admin/authors.el (authors-aliases): Escape periods. 2024-08-22 14:09:11 +03:00
Paul Eggert
3d1d4f109e GCC bug 58416 is fixed in GCC 15
* configure.ac (emacs_cv_gcc_bug_58416_CFLAGS):
No need for a workaround in GCC 15.

2024-08-19  Paul Eggert  <eggert@cs.ucla.edu>

Remove obsolete comment about ‘volatile’
2024-08-21 23:37:04 -07:00
Stefan Kangas
7c8e28607b Prefer static_assert to verify
Although static_assert is C11-specific, and Emacs remains on C99, it
has been backported to older compilers by Gnulib.  Gnulib has already
changed to prefer static_assert, and we can do the same.

* lib-src/asset-directory-tool.c (main_2):
* src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc)
(vectorlike_nbytes, allocate_pseudovector):
* src/android.c (android_globalize_reference, android_set_dashes):
* src/android.h:
* src/androidfont.c (androidfont_draw, androidfont_text_extents):
* src/androidvfs.c:
* src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT, bidi_find_bracket_pairs):
* src/buffer.c (init_buffer_once):
* src/casefiddle.c (do_casify_multibyte_string):
* src/dispnew.c (scrolling_window, scrolling):
* src/editfns.c (styled_format):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Fdo_auto_save):
* src/fns.c (next_almost_prime, hash_string):
* src/fringe.c (init_fringe):
* src/keyboard.h (kbd_buffer_store_event_hold):
* src/keymap.c:
* src/lisp.h (memclear, reduce_emacs_uint_to_hash_hash, modiff_incr):
* src/lread.c (skip_lazy_string):
* src/pdumper.c (dump_bignum, Fdump_emacs_portable)
(dump_do_dump_relocation, pdumper_load):
* src/process.c (make_process, Fmake_process, connect_network_socket):
* src/regex-emacs.c:
* src/sort.c (tim_sort):
* src/sysdep.c (init_random, SSIZE_MAX):
* src/thread.c:
* src/timefns.c (trillion_factor):
* src/unexelf.c:
* src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib
verify.  Remove import of verify.h, except when used for other reasons.
2024-08-22 00:51:55 +02:00
Mattias Engdegård
46f3452b30 Simplify and speed up make-hash-table argument parsing
* src/fns.c (get_key_arg): Remove.
(Fmake_hash_table): Traverse argument list once only.  Don't allocate a
helper array.  Use faster comparisons.
2024-08-21 14:14:39 +02:00
Eshel Yaron
5d0e5f0865
; Inhibit completion preview in read-only buffers
* lisp/completion-preview.el
(completion-preview--post-command): Avoid showing completion
preview if buffer is read-only.
2024-08-21 11:27:45 +02:00
Martin Rudalics
bd647f3614 Fix two issues with 'window-deletable-p'
* lisp/window.el (window-deletable-functions): Clarify
doc-string.
(window-deletable-p): Handle check whether WINDOW's frame can be
deleted via new function 'frame-deletable-p' (a comparison with
the frame returned by 'next-frame' fails in too many cases).  Do
not try to run 'window-deletable-functions' in WINDOW's buffer
when WINDOW is internal.
* lisp/frame.el (frame-deletable-p): New function.
* doc/lispref/frames.texi (Deleting Frames): Describe new
function 'frame-deletable-p'.
* etc/NEWS: Mention 'frame-deletable-p'.
2024-08-21 10:54:53 +02:00
Michael Albinus
0b7f649614 Fix a Tramp bug when running several asynchronous processes
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-file-name-handler): Flush connection
properties "process-name" and "process-buffer".

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Skip when underlying
TEST has taken too much time.
(tramp--test-with-proper-process-name-and-buffer): Remove.
(tramp-test45-asynchronous-requests): Remove callees.
2024-08-21 10:46:20 +02:00