* Add hook by default
@ 2016-04-13 10:52 psachin
2016-04-13 13:01 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: psachin @ 2016-04-13 10:52 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
Hi all,
We can install extensions via package-list but some extensions may require
to add hook by-hand
For example
(add-hook 'find-file-hook 'some-extension)
Can we do this programatically? so that users don't have to do this after
installing an extension.
--
Sachin
psachin.github.io
[-- Attachment #2: Type: text/html, Size: 698 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Add hook by default
2016-04-13 10:52 Add hook by default psachin
@ 2016-04-13 13:01 ` Stefan Monnier
2016-04-13 14:49 ` psachin
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2016-04-13 13:01 UTC (permalink / raw)
To: emacs-devel
> Can we do this programatically? so that users don't have to do this after
> installing an extension.
Yes, you can run any code you want with:
;;;###autoload
(blabla)
or
;;;###autoload (blabla)
Both will cause "(blabla)" to be added to the <pkg>-autoloads.el file,
which is preloaded when you run `package-initialize`.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Add hook by default
2016-04-13 13:01 ` Stefan Monnier
@ 2016-04-13 14:49 ` psachin
0 siblings, 0 replies; 3+ messages in thread
From: psachin @ 2016-04-13 14:49 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
Thanx Stefan. That was really helpful. Appreciate your quick response :)
On Wed, Apr 13, 2016 at 6:31 PM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
> > Can we do this programatically? so that users don't have to do this after
> > installing an extension.
>
> Yes, you can run any code you want with:
>
> ;;;###autoload
> (blabla)
> or
> ;;;###autoload (blabla)
>
> Both will cause "(blabla)" to be added to the <pkg>-autoloads.el file,
> which is preloaded when you run `package-initialize`.
>
>
> Stefan
>
>
>
--
Sachin
psachin.github.io
[-- Attachment #2: Type: text/html, Size: 1290 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-13 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 10:52 Add hook by default psachin
2016-04-13 13:01 ` Stefan Monnier
2016-04-13 14:49 ` psachin
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).