diff options
author | Juri Linkov <juri@linkov.net> | 2022-12-02 09:54:22 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2022-12-02 09:54:22 +0200 |
commit | bf66b90b9aea61799c089e91ceec3ce237195f3a (patch) | |
tree | a054fa45556e011bfe43a03370ba122bb02b864d /lisp/emacs-lisp/icons.el | |
parent | 2e4960d63df27395f4d9a7b15a5f9c5b872f4b06 (diff) | |
download | emacs-bf66b90b9aea61799c089e91ceec3ce237195f3a.tar.gz emacs-bf66b90b9aea61799c089e91ceec3ce237195f3a.tar.bz2 emacs-bf66b90b9aea61799c089e91ceec3ce237195f3a.zip |
Fix the width of margins for icons in outline-minor-mode (bug#59719)
* doc/lispref/display.texi (Icons): Add :width spec.
* lisp/emacs-lisp/icons.el (icons--create): Handle :width as well.
* lisp/outline.el (outline--margin-width, outline-margin-width):
New variables.
(outline-open-in-margins, outline-close-in-margins)
(outline-close-rtl-in-margins): Don't inherit from parents.
Use `:width font' instead of `:height 10'.
(outline-minor-mode): Calculate the number of columns for margins
to fit the icons.
Diffstat (limited to 'lisp/emacs-lisp/icons.el')
-rw-r--r-- | lisp/emacs-lisp/icons.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index 86c44830308..8ba6d97ea00 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -202,6 +202,10 @@ present if the icon is represented by an image." (list :height (if (eq height 'line) (window-default-line-height) height))) + (if-let ((width (plist-get keywords :width))) + (list :width (if (eq width 'font) + (default-font-width) + width))) '(:scale 1) (if-let ((rotation (plist-get keywords :rotation))) (list :rotation rotation)) |