]> git.eshelyaron.com Git - emacs.git/commit
Add support for variable-pitch fonts in 'visual-wrap-prefix-mode'
authorJim Porter <jporterbugs@gmail.com>
Sun, 28 Jul 2024 03:48:38 +0000 (20:48 -0700)
committerEshel Yaron <me@eshelyaron.com>
Tue, 6 Aug 2024 09:55:13 +0000 (11:55 +0200)
commit3f6b33b089bd93ca577a3843c3b4dca723bbe94a
tree68aa9f43b801447b747919df764caad4db6467cd
parentadb67612c95d9903b069bc8bd22724beeacc1139
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'.

* etc/NEWS: Announce this change.

(cherry picked from commit f70a6ea0ea86ef461e40d20664a75a92d02679ea)
doc/lispref/display.texi
etc/NEWS
lisp/emacs-lisp/subr-x.el
lisp/visual-wrap.el