]> git.eshelyaron.com Git - emacs.git/commit
Fix `string-pixel-width' with alternate text properties
authorDavid Ponce <da_vid@orange.fr>
Sun, 16 Mar 2025 10:31:21 +0000 (11:31 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 18:13:53 +0000 (19:13 +0100)
commitb830de9184549fae54b2ecaa5666277afd26bce5
treed2b169cbf324216c09623b7c237a0ee89465be6c
parentf89dae71970ee3785b860a5025f346177db2bcb6
Fix `string-pixel-width' with alternate text properties

Fix possible wrong result of `string-pixel-width' with alternate
and default properties.  Create new regression tests.
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Like for
`face-remapping-alist', use in work buffer the value of
`char-property-alias-alist' and `default-text-properties'
local to the passed buffer, to correctly compute pixel width.
(Bug#77042)

* test/lisp/misc-tests.el: Add tests for `string-pixel-width'.

(cherry picked from commit b1db48c0fcd438c903826fe0dba3bc28ffa73cc4)
lisp/emacs-lisp/subr-x.el
test/lisp/misc-tests.el