* 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.
Kévin Le Gouguec [Wed, 21 Aug 2024 06:45:00 +0000 (08:45 +0200)]
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.
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.
* 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.
Po Lu [Tue, 20 Aug 2024 13:56:41 +0000 (21:56 +0800)]
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.
Paul Eggert [Mon, 19 Aug 2024 18:44:44 +0000 (11:44 -0700)]
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
(adf2aa61404305e58e71cde0193bb650aff2c4b3) removed all the volatile
members of struct handler.
(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.
Joseph Turner [Tue, 16 Jul 2024 04:55:35 +0000 (21:55 -0700)]
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.
Eli Zaretskii [Mon, 19 Aug 2024 14:51:50 +0000 (17:51 +0300)]
; 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>.
Jim Porter [Mon, 5 Aug 2024 02:37:00 +0000 (19:37 -0700)]
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'.
Eli Zaretskii [Sun, 18 Aug 2024 08:59:28 +0000 (11:59 +0300)]
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".
Paul Eggert [Sat, 17 Aug 2024 18:09:17 +0000 (11:09 -0700)]
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
Spencer Baugh [Tue, 6 Aug 2024 16:39:37 +0000 (12:39 -0400)]
Stop subprocesses from using inherited or default PAGER
At startup, set PAGER to "cat" so that any inherited or
default value of PAGER does not affect subprocesses of
Emacs. Pagers generally won't work when a subprocess
runs under Emacs.
Users can use 'comint-pager' (or other customizations)
to tell subprocesses to use a different specific pager.
* lisp/startup.el (normal-top-level): Set PAGER to 'cat',
if 'cat' is available. (Bug#72426)
Delete matching of whitespace in ispell's LaTeX env names
* lisp/textmodes/ispell.el (ispell-begin-tex-skip-regexp): Remove
matching of arbitrary whitespaces in LaTeX environment names when
wrapping them inside \begin{}. (bug#72262)
Paul Eggert [Sat, 17 Aug 2024 00:20:58 +0000 (17:20 -0700)]
Don’t ignore -Wclobbered in keyboard.c
This fixes Emacs bug#71744.
* src/keyboard.c: Do not ignore -Wclobbered.
(read_char): Fix violation of the C standard, where setjmp
clobbered c. Fix suggested by Pip Cet in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71744#38>
Paul Eggert [Sat, 17 Aug 2024 00:19:12 +0000 (17:19 -0700)]
Don’t ignore -Wclobbered in image.c
This fix is also prompted by Emacs bug#71744.
* src/image.c: Do not ignore -Wclobbered.
(png_load_body): Fix violations of the C standard, where setjmp
clobbered c. Move mask_img decl to pacify GCC.
(jpeg_load_body): Don’t make fp volatile; solve that problem in a
better way, via a new fp_volatile local. Fix violations of the C
standard, where setjmp clobbered mgr, img, and ximg. If __GNUC__
&& !__clang__, add useless assignments to pacify GCC.
Paul Eggert [Sat, 17 Aug 2024 00:08:36 +0000 (17:08 -0700)]
Don’t ignore -Wclobbered in eval.c
This fix is also prompted by Emacs bug#71744.
* src/eval.c (CACHEABLE): Remove. All uses removed.
Do not ignore -Wclobbered.
(internal_lisp_condition_case): Fix violations of the C standard,
where setjmp clobbered oldhandlerlist, var, and clauses.
Rewrite to pacify GCC, by using a sentinel rather than a count,
which GCC incorrectly complained about, and by coalescing some
duplicate code. If GCC_LINT && __GNUC__ && !__clang__ add a useless
assignment to pacify GCC.
Paul Eggert [Fri, 16 Aug 2024 23:59:08 +0000 (16:59 -0700)]
Don’t ignore -Wclobbered in emacs-module.c
This fix is also prompted by Emacs bug#71744.
* src/emacs-module.c: Do not ignore -Wclobbered.
(MODULE_HANDLE_NONLOCAL_EXIT): Fix violations of the C standard,
where setjmp clobbered env and internal_cleanup.
(module_extract_big_integer) [GCC_LINT && __GNUC__ && !__clang__]:
Work around GCC -Wclobbered false positive for ‘sign’.
Paul Eggert [Fri, 16 Aug 2024 23:29:51 +0000 (16:29 -0700)]
Don’t ignore -Wclobbered in bytecode.c
This fix is prompted by Emacs bug#71744.
The working hypothesis is that there are some bugs in Emacs,
and some in GCC’s diagnostics, and that this patch
fixes the Emacs bugs and works around the GCC diagnostic bugs.
The hypothesis is that GCC diagnostic bugs occur when GCC
coalesces variables or temporaries and some variables
are clobbered by setjmp and some vars/temps are not.
Part of this hypothesis involves GCC diagnosing the wrong variables.
Instead of ignoring the diagnostics, which the hypothesis suggests
indicate either problems in Emacs or in GCC, fix the Emacs bugs
and pacify the GCC false positives, with comments about the GCC bugs.
GCC’s true positives are helpful enough in squashing obscure bugs like
Emacs bug#71744, that it’s worth going to some effort to pacify
-Wclobbered instead of ignoring it.
* src/bytecode.c: Do not ignore -Wclobbered.
(exec_byte_code): Fix violations of the C standard, where setjmp
clobbered quitcounter and bc. If GCC_LINT && __GNUC__ && !__clang__,
work around GCC -Wclobbered warnings for bytestr_data and vectorp.
Eli Zaretskii [Thu, 15 Aug 2024 08:30:48 +0000 (11:30 +0300)]
Improve documentation of ERT
* doc/misc/ert.texi (Running Tests Interactively)
(Test Selectors):
* lisp/emacs-lisp/ert.el (ert-select-tests)
(ert-run-tests-interactively, ert-run-tests-batch): Improve and
clarify the documentation of the main ERT functions.
Eli Zaretskii [Wed, 14 Aug 2024 08:35:48 +0000 (11:35 +0300)]
Improve documentation of time-parsing functions
* doc/lispref/os.texi (Time Parsing):
* lisp/calendar/iso8601.el (iso8601-parse):
* lisp/calendar/parse-time.el (parse-time-string): Document that
these functions don't care about the distinction between local
time and UTC. (Bug#72570)
Po Lu [Fri, 16 Aug 2024 13:01:22 +0000 (21:01 +0800)]
Remove Hangul character from `han' representative character list
* lisp/international/fontset.el (script-representative-chars):
U+3200 is a Hangul character that is predictably absent from CJK
fonts, such as are provided by Xiaomi devices.
Paul Eggert [Fri, 16 Aug 2024 03:10:53 +0000 (20:10 -0700)]
Port better to NFS unlink
I found this problem while looking into Bug#72641.
* lib-src/etags.c (do_move_file):
* lib-src/update-game-score.c (unlock_file):
* src/androidvfs.c (android_hack_asset_fd_fallback):
* src/filelock.c (current_lock_owner):
Treat unlink as successful if it fails because the file wasn’t there.
This can happen with some NFS implementations, due to its
retrying over the network to get at-least-once semantics.
Although most of Emacs’s calls to unlink were already doing this,
a few instances were not.
Paul Eggert [Thu, 15 Aug 2024 20:30:23 +0000 (13:30 -0700)]
Remove empty (& invalid) lock files
* src/filelock.c (current_lock_owner):
Remove empty lock files, as they are necessarily invalid
and can be caused by buggy file systems.
Problem reported by Michal Nazarewicz (bug#72641).
Paul Eggert [Thu, 15 Aug 2024 18:29:16 +0000 (11:29 -0700)]
Fix unlikely lock file integer overflow
* src/filelock.c (within_one_second): Accept intmax_t first arg.
Avoid undefined behavior on integer overflow.
(current_lock_owner): Simplify based on within_one_second change.
Spencer Baugh [Fri, 2 Aug 2024 16:15:58 +0000 (12:15 -0400)]
Fix 'partial-completion' for candidates containing newlines
'partial-completion' tries to match a pattern containing wildcards
(such as `any' or `prefix') against completion candidates.
Wildcards are supposed to match any sequence of characters, but
'completion-pcm--pattern->regex' transformed the wildcards into
".*", which won't match sequences containing newlines. Fix this to
properly match anything by using "[^z-a]*" instead.
(That's (rx (* anything)).)
* lisp/minibuffer.el (completion-pcm--pattern->regex): Fix
regex. (Bug#72425)
Ulrich Müller [Wed, 14 Aug 2024 11:57:16 +0000 (13:57 +0200)]
Drop fallback code in date-to-time, update documentation
* lisp/calendar/time-date.el (date-to-time): Drop fallback code.
Document that the default timezone is local time, rather than GMT.
* test/lisp/calendar/time-date-tests.el (test-date-to-time):
Add more test cases.
* doc/lispref/os.texi (Time Parsing): Document that 'date-to-time'
defaults to local time.
* etc/NEWS: Announce the change. (Bug#72570)
Po Lu [Mon, 12 Aug 2024 12:44:27 +0000 (20:44 +0800)]
Remove extraneous entries for `han' from script-representative-chars
* lisp/international/fontset.el (script-representative-chars):
Remove characters that are either Kana, obsolete, or radicals,
which interferes with the discovery of real Chinese fonts, and
does not impact font resolution on free systems with Fontconfig.
Po Lu [Mon, 12 Aug 2024 00:10:36 +0000 (08:10 +0800)]
; Grammar fixes
* doc/misc/erc.texi (Connecting):
* lisp/erc/erc.el (erc-compute-server, erc-compute-nick)
(erc-compute-full-name, erc-compute-port): Replace "a number of
increasingly more" with an alternative more grammatical.