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.
Eshel Yaron [Thu, 8 Aug 2024 11:55:34 +0000 (13:55 +0200)]
Xref: support lexical variables in Emacs Lisp
* lisp/emacs-lisp/scope.el
* test/lisp/emacs-lisp/scope-tests.el: New files.
* lisp/progmodes/elisp-mode.el (xref-backend-definitions)
Use new 'scope' function to find bindings of lexical vars.
(xref-backend-references): Implement method.
* lisp/progmodes/xref.el (xref-location-line): Implement for
'xref-buffer-location' locations.
Yuan Fu [Mon, 5 Aug 2024 03:46:45 +0000 (20:46 -0700)]
Fix c-ts-common filling
* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Exclude the last line from filling if
it only has non-word characters like *=-.
* test/lisp/progmodes/c-ts-mode-resources/filling.erts: Fir the
multi-line test and add a single line test.
Jim Porter [Sun, 28 Jul 2024 03:48:38 +0000 (20:48 -0700)]
Add support for variable-pitch fonts in 'visual-wrap-prefix-mode'
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Allow passing BUFFER
to use the face remappings from that buffer when calculating the width.
* lisp/visual-wrap.el (visual-wrap--prefix): Rename to...
(visual-wrap--adjust-prefix): ... this, and support PREFIX as a number.
(visual-wrap-fill-context-prefix): Make obsolete in favor of...
(visual-wrap--content-prefix): ... this.
(visual-wrap-prefix-function): Extract inside of loop into...
(visual-wrap--apply-to-line): ... this.
* doc/lispref/display.texi (Size of Displayed Text): Update
documentation for 'string-pixel-width'.
* lisp/emacs-lisp/pcase.el (pcase-lambda): Copy notice from
'pcase-let', indicating that pcase-lambda won't pattern match
like 'pcase', but just try to destruct with uncertain side
effects if this fails. (Bug#71503)
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Use `copy-directory-create-symlink'.
* lisp/net/tramp.el (tramp-skeleton-write-region): Use `lock-file' and
`unlock-file'..
(tramp-handle-make-lock-file-name): Use `remote-file-name-inhibit-locks'.
(tramp-handle-unlock-file): Use `remote-file-name-inhibit-locks'
and `userlock--handle-unlock-error'.
(tramp-handle-shell-command): Use `shell-command-buffer-name-async'
and `shell-command-buffer-name'.
(tramp-read-passwd): Remove workaround.
Eli Zaretskii [Sat, 3 Aug 2024 15:11:57 +0000 (18:11 +0300)]
Improve font search and handling on MS-Windows
* src/w32font.c: Add commentary about font search on MS-Windows.
(w32font_coverage_ok, add_font_entity_to_list)
(font_supported_scripts): Consider the coverage OK if a font has
only the SIP bit set, but also sets relevant codepage bits in the
CSB bits.
(font_supported_scripts): Fix script for USB bit 99.
* src/font.c (font_parse_fcname, font_parse_family_registry)
[HAVE_NTGUI]: Don't consider hyphenated suffixes of some Windows
fonts as not belonging to the family name.
* src/w32uniscribe.c (uniscribe_check_otf_1): Increase tags[]
array size, to avoid the E_OUTOFMEMORY error for some fonts.
* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34. Reported by Pip
Cet <pipcet@protonmail.com>.