]> git.eshelyaron.com Git - emacs.git/commitdiff
Support cons cell as value of ':line-width' box attribute
authorjohn muhl <jm@pub.pink>
Wed, 28 Jun 2023 17:58:27 +0000 (12:58 -0500)
committerEli Zaretskii <eliz@gnu.org>
Thu, 29 Jun 2023 18:18:30 +0000 (21:18 +0300)
* lisp/calculator.el (calculator-need-3-lines): Support
values of a face's ':line-width' box attribute that are
cons cells.  (Bug#64344)

Copyright-paperwork-exempt: yes

lisp/calculator.el

index 6a1d960c3e49410a4d645a09211676bef9c84f02..dbfba0b5bb7e136cf52a0207ebe5e02bb90be017 100644 (file)
@@ -746,7 +746,7 @@ See the documentation for `calculator-mode' for more information."
              ;; use 3 lines
              (let* ((bx (face-attribute 'mode-line :box))
                     (lh (plist-get bx :line-width)))
-               (and bx (or (not lh) (> lh 0))))
+               (and bx (or (not lh) (> (if (listp lh) (cdr lh) lh) 0))))
              ;; if the mode line has an overline, use 3 lines
              (not (memq (face-attribute 'mode-line :overline)
                         '(nil unspecified)))))))