Commit graph

174789 commits

Author SHA1 Message Date
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
Protesilaos Stavrou
3efb89ddb9
Update to modus-themes version 4.5.0
* doc/misc/modus-themes.org (COPYING): Update the version headers.
(Option to extend the palette): Document new user options.
(Full support for packages or face groups): Document more
packages that are explicitly supported by the themes.
(Acknowledgements): Update the list of people who have
contributed to the project in one way or another.

* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Update the
  palette of each theme and include the new user option to extend
  its palette.

* etc/themes/modus-themes.el: Cover more faces and include user
  option for common extension to all theme palettes.

Detailed release notes:
<https://protesilaos.com/codelog/2024-08-21-modus-themes-4-5-0/>.
2024-08-21 11:07:47 +03:00
Kévin Le Gouguec
53ea5f1df4 Restore vc-git helper function (bug#68183)
* lisp/vc/vc-git.el (vc-git--cmds-in-progress): Restore; it was removed
in a previous refactoring patch, but we may still find use for it.
(vc-git-dir--in-progress-headers): Use it.
2024-08-21 15:56:41 +08:00
Kévin Le Gouguec
88ac5d0358 Split vc-git-dir-extra-headers into more manageable chunks
The current code requires a lot of eyeballing back-and-forth
to:

- check where variables are actually used, what impact changing
them can have: in actuality, there are three distinct "groups"
of headers we compute, each with their own independent state;
- understand formatting details such as "who's in charge of the
newlines".

To solve both issues, split that function into smaller ones,
each handling a "group" of headers.

The only expected "functional" change is that, by propertizing
"\nHeader: " strings, the original code sometimes applied the
vc-dir-header face to the newline preceding a header; the new
code applies no faces to these newlines.

This change would be visible to users with themes adding an
:extended background to vc-dir-header.  In practice, no in-tree
theme is impacted.

For bug#68183.

* lisp/vc/vc-git.el (vc-git-dir--branch-headers): New function
to compute "Branch", "Tracking" and "Remote".
(vc-git--cmds-in-progress): Rename to...
(vc-git-dir--in-progress-headers): ... this, and compute
headers.
(vc-git-dir--stash-headers): New function to compute the
"Stash" header.
(vc-git-dir-extra-headers): Boil down to just setting
default-directory and assembling the headers from these new
helpers.
(vc-git--out-match): New function to call 'git' and capture
specific bits of output.
2024-08-21 03:41:18 +03:00
Kévin Le Gouguec
2f710af5bf Test more vc-dir scenarios with Git (bug#68183)
* test/lisp/vc/vc-git-tests.el
(vc-git-test-dir-track-local-branch): Remove in favor of new
test.
(vc-git-test--start-branch): New helper to get a repository
going.
(vc-git-test--dir-headers): New helper to get a list of headers
in the current vc-dir buffer.
(vc-git-test-dir-branch-headers): New test, exercising the
original bug recipe plus more common scenarios.
2024-08-21 03:41:18 +03:00
Andrea Corallo
391e6f99fc Update 'ldefs-boot.el' (don't merge)
* lisp/ldefs-boot.el: Update.
2024-08-20 22:48:16 +02:00
Andrea Corallo
8ccc165f95 * doc/man/emacsclient.1: Bump date. 2024-08-20 22:46:40 +02:00
Andrea Corallo
633cc24e4b Bump Emacs version to 30.0.90
* nt/README.W32: Update version.
* msdos/sed2v2.inp: Likewise.
* configure.ac: Likewise.
* README: Likewise.
2024-08-20 22:18:08 +02:00
Andrea Corallo
e18db9c6d2 Update Changelogs
* ChangeLog.4: Re-generate.
* ChangeLog.3: Fix some type and style.
2024-08-20 22:17:34 +02:00
Andrea Corallo
a0b65be8eb * admin/authors.el (authors-aliases, authors-ignored-files): Update. 2024-08-20 20:26:36 +02:00
Andrea Corallo
f9d229e925 Update AUTHORS
* etc/AUTHORS: Re-generate.
* admin/authors.el (authors-fixed-entries): Add entry.
2024-08-20 20:26:36 +02:00
Andrea Corallo
58088b36e8 * admin/authors.el: Pick-up version from emacs-29. 2024-08-20 20:26:36 +02:00
Stefan Kangas
9d7151c0ff Add missing :version tags in use-package
* lisp/use-package/use-package-core.el (use-package-keywords)
(use-package-deferring-keywords, use-package-ignore-unknown-keywords)
(use-package-use-theme, use-package-verbose)
(use-package-check-before-init, use-package-always-defer)
(use-package-always-demand, use-package-defaults)
(use-package-merge-key-alist, use-package-hook-name-suffix)
(use-package-minimum-reported-time, use-package-inject-hooks)
(use-package-expand-minimally, use-package-form-regexp-eval)
(use-package-enable-imenu-support, use-package-compute-statistics):
* lisp/use-package/use-package-ensure.el (use-package-always-ensure)
(use-package-always-pin, use-package-ensure-function): Add missing
:version tags.
2024-08-20 20:12:43 +02:00
Michael Albinus
3f019167b8 Suppress shallow cloning on emba
* test/infra/gitlab-ci.yml (variables): Set GIT_DEPTH to 0 in
order to avoid shallow cloning.
2024-08-20 19:23:48 +02:00
Po Lu
a268496727 Merge from savannah/emacs-30
3419e7ea52 Correct Android failure to open an old CJK font
45ae4de0e7 * lisp/help-fns.el (help-definition-prefixes): Don't dele...
fc7581ae2e ; Fix documentation of secure-hash functions
21be5cadaf ; * lisp/subr.el (sha1): Fix typo in docstring.
8715619d48 ; * etc/NEWS: Fix wording of last change.
023d387a7b Update to Org 9.7.10
b54e8b3741 ; * etc/NEWS: Announce 'shr-fill-text'.
acfd91bc0c ; * lisp/emacs-lisp/compat.el: Fix header style.
55337dc36a * test/infra/gitlab-ci.yml (.tree-sitter-template): Adapt...
d8e9eb73c2 Bump use-package version for Emacs 30.1
4d9d3fec1b * Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump.
502285e84a ; * admin/make-tarball.txt: Some clarifications.
2024-08-20 21:57:25 +08:00
Po Lu
e1ee82f738 ; Merge from savannah/emacs-30
The following commit was skipped:

9e7c2d3816 Avoid rare crashes due to clobbering of input events
2024-08-20 21:57:25 +08:00
Po Lu
4361649901 Merge from savannah/emacs-30
d6726e6dfc Further fix of reading and writing profiler data
30b2fae77b * Makefile.in (PREFERRED_BRANCH): Update to emacs-30.
5397808e5b ; Eliminate more C++ comments
1463434907 ; Eliminate C++ comments and typo
2024-08-20 21:57:25 +08:00
Po Lu
3419e7ea52 Correct Android failure to open an old CJK font
* src/sfnt.c (sfnt_read_cmap_format_2): Properly compute
subtable count, and append the empty table at position 0.
(sfnt_lookup_glyph_2): Update commentary.
2024-08-20 21:56:41 +08:00
Stefan Monnier
45ae4de0e7 * lisp/help-fns.el (help-definition-prefixes): Don't delete the hashtable
Fixes bug#72511.
2024-08-20 08:09:54 -04:00
Stefan Kangas
5e940a353e ; Fix :version tags 2024-08-20 01:59:55 +02:00
Stefan Kangas
8f4ad4d726 Delete defgroup use-package-ensure
* lisp/use-package/use-package-core.el (use-package-ensure):
Delete defgroup.
(use-package-always-ensure, use-package-always-pin)
(use-package-ensure-function): Move defcustoms from above deleted
defgroup to the 'use-package' defgroup.
2024-08-20 01:57:12 +02:00
Stefan Kangas
644d2a8331 Fix early use of use-package-always-ensure
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-delight.el:
* lisp/use-package/use-package-diminish.el:
* lisp/use-package/use-package-ensure.el: Move add-to-list for
'use-package-keywords' and 'use-package-defaults' from here...
* lisp/use-package/use-package-core.el (use-package-ensure)
(use-package-keywords): ...to the default definition here.

* lisp/use-package/use-package-ensure.el
(use-package-ensure): Move this defgroup...
(use-package-always-ensure)
(use-package-always-pin, use-package-ensure-function): ...and
these defcustoms from here...
* lisp/use-package/use-package-core.el (use-package-ensure)
(use-package-always-ensure, use-package-always-pin)
(use-package-ensure-function): ...to here.  (Bug#72453)
2024-08-20 01:56:40 +02:00
Stefan Kangas
bcfab1e88b Mark tex-dvi-view-command as :risky
* lisp/textmodes/tex-mode.el (tex-dvi-view-command): Mark as
:risky.
2024-08-20 01:40:50 +02:00
Paul Eggert
845d22652d Remove stray obsolete comment about ‘volatile’
* src/lisp.h: Remove comment about ‘volatile’ that was mistakenly
left behind when 2013-10-03T04:58:56!monnier@iro.umontreal.ca
(adf2aa6140) removed all the volatile
members of struct handler.
2024-08-19 11:55:20 -07:00
Juri Linkov
60da504cf7 * lisp/tab-bar.el: Improve tab-bar-auto-width-predicate-default (bug#71883).
(tab-bar--auto-width-faces-default): New variable with the
value from the default value of tab-bar-auto-width-faces.
(tab-bar-auto-width-faces): Set the default value to
tab-bar--auto-width-faces-default.
(tab-bar-auto-width-predicate-default): For backwards-compatibility
use the old logic of checking tab-bar-auto-width-faces when its value
was changed.  Otherwise, check for a symbol, but remove "current-group"
from the list of symbols.
2024-08-19 19:56:31 +03:00
Joseph Turner
9ed761a793 Add abnormal hook to determine which tabs to auto-widen
* lisp/tab-bar.el (tab-bar-auto-width-predicate-default):  Default value
for tab-bar-auto-width-functions.
(tab-bar-auto-width-functions): New abnormal hook.
(tab-bar-auto-width): Run new abnormal hook until success instead of
comparing text properties.
2024-08-19 19:50:02 +03:00
Eli Zaretskii
fc7581ae2e ; Fix documentation of secure-hash functions
* src/fns.c (Fsecure_hash):
* doc/lispref/text.texi (Checksum/Hash):
* lisp/subr.el (sha1): Fix documentation wrt to the number of
bytes 'secure-hash' and its variants return when BINARY is
non-nil.  Reported by Pip Cet <pipcet@protonmail.com>.
2024-08-19 17:51:50 +03:00
Ulrich Müller
21be5cadaf ; * lisp/subr.el (sha1): Fix typo in docstring. 2024-08-19 15:49:47 +02:00
Michael Albinus
8715619d48 ; * etc/NEWS: Fix wording of last change. 2024-08-19 09:37:55 +02:00
Kyle Meyer
023d387a7b Update to Org 9.7.10 2024-08-18 20:54:39 -04:00
Jim Porter
a876c4d7a1 Improve SHR/EWW support for 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--apply-to-line): Use
'add-display-text-property' so we don't clobber other display
properties.
(visual-wrap--content-prefix): Remove special-case for spaces-only
indent prefix; this was an attempt to be helpful for variable-pitch
fonts, but in practice just interferes with matters.  This case now
falls back to the one immediately following it (return the string of
spaces).  Use 'string-pixel-width' instead of 'string-width'.

* lisp/net/shr.el (shr-indent): Set 'shr-prefix-length' here to help
keep track of the prefixes of nestedly-indented elements.  Set the
specified space width in terms of the default width of the current face.
* lisp/net/shr.el (shr-adaptive-fill-function): Use 'shr-prefix-length'
as set above to return a fill prefix.

* lisp/net/eww.el (eww-render): Enable 'visual-wrap-prefix-mode'
alongside of 'visual-line-mode'.
(eww-mode): Set 'adaptive-fill-function' to
'shr-adaptive-fill-function'.

* etc/NEWS: Announce this change (bug#72485).
2024-08-18 15:53:26 -07:00
Jim Porter
b54e8b3741 ; * etc/NEWS: Announce 'shr-fill-text'. 2024-08-18 14:33:43 -07:00