From: Eli Zaretskii <eliz@gnu.org>
To: john muhl <jm@pub.pink>
Cc: 64344@debbugs.gnu.org
Subject: bug#64344: [PATCH] Make calculator work with customized mode-line
Date: Thu, 29 Jun 2023 10:49:38 +0300 [thread overview]
Message-ID: <83jzvmu2r1.fsf@gnu.org> (raw)
In-Reply-To: <87jzvn4f4e.fsf@pub.pink> (bug-gnu-emacs@gnu.org)
> Date: Wed, 28 Jun 2023 13:23:45 -0500
> From: john muhl via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> calculator.el doesn’t work after customizing the mode-line. It assumes
> the line-width is always an integer but after using customize it is a
> dotted list.
>
> - emacs -Q
> - M-x customize-apropos-faces RET mode-line RET
> - Ensure ‘mode-line-face’ has a box property with vertical and
> horizontal widths. The default config includes these already.
> - Set for current session
> - M-x calculator RET
> => calculator: Wrong type argument: number-or-marker-p, (1 . -1)
Thanks.
> diff --git a/lisp/calculator.el b/lisp/calculator.el
> index bf2ac9b6215..6af6464d2f4 100644
> --- a/lisp/calculator.el
> +++ b/lisp/calculator.el
> @@ -746,7 +746,7 @@ calculator-need-3-lines
> ;; 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))))
^^^^^
Shouldn't that be 'consp' instead? 'listp' returns non-nil for nil
argument.
next prev parent reply other threads:[~2023-06-29 7:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 18:23 bug#64344: [PATCH] Make calculator work with customized mode-line john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-29 7:49 ` Eli Zaretskii [this message]
2023-06-29 8:22 ` Andreas Schwab
2023-06-29 9:28 ` Eli Zaretskii
2023-06-29 9:31 ` Andreas Schwab
2023-06-29 9:38 ` Eli Zaretskii
2023-06-29 9:43 ` Andreas Schwab
2023-06-29 8:46 ` Stephen Berman
2023-06-29 9:26 ` Eli Zaretskii
2023-06-29 10:17 ` Stephen Berman
2023-06-29 15:12 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-29 18:22 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83jzvmu2r1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64344@debbugs.gnu.org \
--cc=jm@pub.pink \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).