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.
Pip Cet [Sat, 10 Aug 2024 17:01:44 +0000 (17:01 +0000)]
Fix coordinate transformations in sfnt.c
* src/sfnt.c (sfnt_transform_coordinates):
(sfnt_transform_f26dot6): Fix calculation of transformed coordinates in
the very rare case of arbitrary transformation matrices.
Kien Nguyen [Wed, 7 Aug 2024 17:39:38 +0000 (10:39 -0700)]
Use SetHandleInformation to set NOINHERIT in UCRT64
* src/w32.c (init_ntproc) [_UCRT]: Use SetHandleInformation to
prevent standard handles from being inherited, instead of relying
on MSVCRT-only behavior. For the details of the problem, see
https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg01129.html.
Gerd Möllmann [Thu, 8 Aug 2024 06:19:56 +0000 (08:19 +0200)]
NS: Fix scroll-bar setting code (bug#72331)
* src/nsterm.m (ns_set_vertical_scroll_bar): Use
WINDOW_SCROLL_AREA_WIDTH instead of NS_SCROLL_BAR_WIDTH.
(ns_set_horizontal_scroll_bar): Use WINDOW_SCROLL_AREA_HEIGHT
instead of NS_SCROLL_BAR_HEIGHT. Clear area differently if vertical
scroll bars are present.
* src/nsterm.h (NS_SCROLL_BAR_WIDTH, NS_SCROLL_BAR_HEIGHT): Remove.
Paul Eggert [Thu, 8 Aug 2024 06:05:52 +0000 (23:05 -0700)]
Port zoneinfo-world-style-list to Debian testing
Problem reported by Gijs Hillenius <gijs@hillenius.net> in:
https://lists.gnu.org/r/emacs-devel/2024-08/msg00279.html
* lisp/time.el (zoneinfo-style-world-list): Use Asia/Kolkata
instead of Asia/Calcutta. The main name was changed in tzdata
2008b every practical system has it now. Some systems do
not include backward-compatibility names, so it is better
to use the standard time now.
Yuan Fu [Wed, 7 Aug 2024 04:54:20 +0000 (21:54 -0700)]
; Minor change in c-ts-common--fill-block-comment
* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Add check for end-mask-done. This
doesn't affect correctness, but makes the code easier to read.
Eli Zaretskii [Tue, 6 Aug 2024 18:19:49 +0000 (21:19 +0300)]
Avoid crashes in very large buffers with long lines
* src/xdisp.c (get_large_narrowing_begv, get_large_narrowing_zv)
(get_medium_narrowing_begv, get_medium_narrowing_zv): Use
'ptrdiff_t' instead of 'int', to prevent integer overflow in
large buffers. (Bug#72497)
Ulrich Müller [Tue, 6 Aug 2024 16:04:46 +0000 (18:04 +0200)]
Update description of string comparison functions
* doc/lispref/strings.texi (Text Comparison): Swap descriptions of
'string-equal' (the function) and 'string=' (its alias). Same for
'string-lessp' and 'string<'. Document 'string>'. (Bug#72486)
* doc/lispref/sequences.texi (Sequence Functions): Update cross
reference to 'string-lessp'.
This fixes bugs that crashed Emacs when the Lisp interpreter was fed
bad code.
* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Hoist symbol-with-pos elimination and type checks to a
dominating position for efficiency. This also plugs at least two typing
holes. (Mea culpa.)
* test/src/eval-tests.el (eval-bad-specbind): New regression test.