emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New packages: boxy, boxy-headlines


From: Stefan Monnier
Subject: Re: [ELPA] New packages: boxy, boxy-headlines
Date: Tue, 05 Oct 2021 08:30:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> That's what I've gathered to, so to get around that is why I'm using
> face-spec-set. The behavior I want is this: update the face if a user
> has not independently customized it already. If I simply changed the
> defface, only new users would get the new theme. Existing users would
> have to re-apply the standard definition or restart emacs.

What you want is not specific to your theme, so it's best to
fix it at its source rather than work around it with non-standard code.
I suggest you `M-x report-emacs-bug` and request this behavior.

> (boxy--inherited boxy--padding-y :padding-y boxy--default-padding-y)
>
> But this results in
> Warning: Unknown slot ‘:padding-y’
> Warning: Unknown slot ‘:parent’

You don't have any slot named `:parent` nor `:padding-y`.
You're confusing the slots's names with the slots's initargs.

You want:

    (slot-boundp box 'parent)

rather than

    (slot-boundp box :parent)

BTW, while I don't like `defclass` (preferring `cl-defstruct`), one of
its neat features is the ability to override `slot-unbound`, which
should let you implement in a kind of "transparent" way the kind of
fallback mechanism that you're trying to implement with
`boxy--inherited`.

> I have two more questions about the patch. First, just to make sure,
> would you like to contribute those three diffs and did you sign the FSF
> Copyright paperwork?

;-)
Yes, I did.

>> +  (let ((inhibit-message t))     ;FIXME: Please report the message as an 
>> error.
>>      (setq indent-tabs-mode nil)
>>      (cursor-sensor-mode t)
>>      (toggle-truncate-lines t)))
>
> This doesn't even do what I want. I don't want 'Truncate long lines
> enabled' to be printed to the minibuffer when entering boxy mode, but it
> shows regardless. What exactly does the FIXME mean here and how do I
> stop that message?

The FIXME means that `toggle-truncate-lines` should not emit the message
at all in this case, just like `cursor-sensor-mode` doesn't emit
a message when called as above.
IOW, you should `M-x report-emacs-bug` and complain about it.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]