mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-13 04:10:29 +00:00
org-string-width: Reuse buffer when calculating string width
* lisp/org-macs.el (org-string-width): Use dedicated buffer instead of creating a new one every time. The idea is from `string-pixel-width'.
This commit is contained in:
parent
c730caf512
commit
3007511f3f
|
@ -1115,7 +1115,7 @@ Return width in pixels when PIXELS is non-nil."
|
|||
(push el result)))
|
||||
result)))
|
||||
(current-char-property-alias-alist char-property-alias-alist))
|
||||
(with-temp-buffer
|
||||
(with-current-buffer (get-buffer-create " *Org string width*")
|
||||
(setq-local display-line-numbers nil)
|
||||
(setq-local buffer-invisibility-spec
|
||||
(if (listp current-invisibility-spec)
|
||||
|
|
Loading…
Reference in a new issue