1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

174569 commits

Author SHA1 Message Date
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
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
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
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
Andrea Corallo
acfd91bc0c ; * lisp/emacs-lisp/compat.el: Fix header style. 2024-08-18 11:47:38 +02:00
Michael Albinus
55337dc36a * test/infra/gitlab-ci.yml (.tree-sitter-template): Adapt changes. 2024-08-18 11:29:05 +02:00
Stefan Kangas
d8e9eb73c2 Bump use-package version for Emacs 30.1
* lisp/use-package/use-package.el: Bump version to 2.4.6.
2024-08-18 11:18:04 +02:00
Eli Zaretskii
754d83d981 Fix finding tags by 'etags' in Java source code
* lib-src/etags.c (C_entries): A comma is not special inside class
parameters <..>.  (Bug#72402)
(hash, in_word_set): Regenerated after adding "@SuppressWarnings"
to wordlist[].  This avoids missing tags preceded by
"@SuppressWarnings".
2024-08-18 11:59:28 +03:00
Andrea Corallo
4d9d3fec1b * Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump. 2024-08-18 10:25:08 +02:00
Eli Zaretskii
502285e84a ; * admin/make-tarball.txt: Some clarifications. 2024-08-18 07:56:57 +03:00
Jim Porter
135da3556b Be more careful about aligning prefix lines in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--apply-to-line): Ensure we don't
apply the 'min-width' property across multiple lines (bug#72681).
2024-08-17 13:51:21 -07:00
Eli Zaretskii
9e7c2d3816 Avoid rare crashes due to clobbering of input events
* src/keyboard.c (read_char): Declare C 'volatile', to prevent
clobbering it by setjmp/longjmp.  Do not merge to master.
(Bug#71744)
2024-08-17 21:35:08 +03:00
Paul Eggert
4f1987cf77 Pacify GCC 14 on recent read_char change
* src/keyboard.c (read_char): Initialize c_volatile before
calling setjmp.  Although not necessary for correctness,
and not needed for gcc 14.2.1 20240801 (Red Hat 14.2.1-1)
on x86-64 when built with --enable-gcc-warnings,
some GCC 14 x86-64 configurations issue a false positive
without this change.
Problem reported by Andrea Corallo in:
https://lists.gnu.org/r/emacs-devel/2024-08/msg00620.html
and fix suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2024-08/msg00627.html
2024-08-17 11:10:20 -07:00
Stefan Monnier
d6726e6dfc Further fix of reading and writing profiler data
* lisp/profiler.el (profiler-report-make-entry-part): Print
strings as-is.  (Bug#72559)
2024-08-17 20:48:05 +03:00
Andrea Corallo
30b2fae77b * Makefile.in (PREFERRED_BRANCH): Update to emacs-30. 2024-08-17 18:27:42 +02:00
Po Lu
5397808e5b ; Eliminate more C++ comments
* lib-src/movemail.c:

* nt/preprep.c (main):

* src/unexw32.c (unexec): Convert C++-style comments to C.
2024-08-17 22:04:01 +08:00
Po Lu
1463434907 ; Eliminate C++ comments and typo
* lib-src/etags.c (Rust_entries): Eliminate C++ comments and
typo.
2024-08-17 22:01:09 +08:00
Po Lu
c4beb9a4bd ; Merge from savannah/emacs-30
The following commit was skipped:

8d5f88d326 Backport ed305c4b98 to emac...
2024-08-17 21:53:50 +08:00
Po Lu
142e5c66f3 Merge from savannah/emacs-30
6a512ab032 Fix a typo in Eglot manual
7b752a93a4 Fix dumping of Lisp profiles
bfe07eca59 Fix 'apropos-library' for 'define-symbol-props'
5c1bd99139 Fix 'forward-comment' in 'toml-ts-mode'
e966dd5ee2 Document spell-checking of multiple languages
8a072d1f05 Apply --display kluge for PGTK too
2024-08-17 21:53:50 +08:00
Po Lu
8d5f88d326 Backport ed305c4b98 to emacs-30
* src/xterm.c (x_construct_mouse_click): `||' → `|'.
Typo found by clang 18.1.6 -Wbool-operation.  Do not
merge to master.
2024-08-17 21:53:30 +08:00
Eli Zaretskii
6a512ab032 Fix a typo in Eglot manual
* doc/misc/eglot.texi (Eglot and Buffers): Fix typo.  Patch by
david edmonds <edmonds.david.a@gmail.com>.  (Bug#72634)
2024-08-17 13:07:56 +03:00
Stefan Monnier
7b752a93a4 Fix dumping of Lisp profiles
* lisp/profiler.el (profiler-fixup-entry): New function.
(profiler-fixup-backtrace): Use it.  (Bug#72559)
2024-08-17 12:50:26 +03:00
Stefan Monnier
bfe07eca59 Fix 'apropos-library' for 'define-symbol-props'
* lisp/apropos.el (apropos-library): Sanitize data to avoid
signaling errors when 'define-symbol-props' is seen.  (Bug#72616)
2024-08-17 12:43:33 +03:00
Eli Zaretskii
5c1bd99139 Fix 'forward-comment' in 'toml-ts-mode'
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode--syntax-table): Fix
syntax of newline.  Patch from Jostein Kjønigsen
<jostein@secure.kjonigsen.net>.  (Bug#72489)
2024-08-17 12:29:31 +03:00