all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Marc Fargas <telenieko@telenieko.com>, John Wiegley <johnw@gnu.org>
Cc: 72818@debbugs.gnu.org
Subject: bug#72818: 29.4; Cannot hook with use-package if variable is not `-hook'$
Date: Mon, 26 Aug 2024 14:34:31 +0300	[thread overview]
Message-ID: <86h6b7jz5k.fsf@gnu.org> (raw)
In-Reply-To: <87seurh7xe.fsf@telenieko.com> (message from Marc Fargas on Mon,  26 Aug 2024 12:53:17 +0200)

> From: Marc Fargas <telenieko@telenieko.com>
> Date: Mon, 26 Aug 2024 12:53:17 +0200
> 
> In the Emacs LISP Manual you see:
> 
>     -- Variable: after-make-frame-functions
>          An abnormal hook run by ‘make-frame’ after it created the frame.
>          Each function in ‘after-make-frame-functions’ receives one
>          argument, the frame just created.
> 
> This hook cannot be configured with `use-package' :hook keyword as it
> does not end in `-hook'.
> 
> The following example will result in `after-make-frame-functions-hook'
> being created instead of adding the function to `after-make-frame-functions':
> 
>     (use-package fontaine			; Fonts!
>       :ensure t
>       :hook ((after-make-frame-functions .   ; Apply fontaine to new frames
>                                          (lambda(frame)
>                                            (with-selected-frame frame
>                                              (fontaine-apply-current-preset)))))
>       ; :custom removed for brevity.
>       :config
>       (when (display-graphic-p)
>         (if (> (frame-monitor-attribute 'scale-factor) 1.0)
>             (fontaine-set-preset 'large)
>           (fontaine-set-preset 'regular))))

Maybe I'm missing something, but how can use-package configure
abnormal hooks?  It doesn't know which arguments to pass to them,
right?

John, am I missing something?





  parent reply	other threads:[~2024-08-26 11:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 10:53 bug#72818: 29.4; Cannot hook with use-package if variable is not `-hook'$ Marc Fargas
2024-08-26 11:15 ` Rudolf Schlatte
2024-08-26 11:34 ` Eli Zaretskii [this message]
2024-08-26 18:47   ` John Wiegley
2024-08-31 10:08     ` Eli Zaretskii
2024-09-10  8:27       ` Marc Fargas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h6b7jz5k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72818@debbugs.gnu.org \
    --cc=johnw@gnu.org \
    --cc=telenieko@telenieko.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.