unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Creating custom hooks?
@ 2003-01-22  9:19 merik
  2003-01-22 10:11 ` Klaus Berndl
  0 siblings, 1 reply; 6+ messages in thread
From: merik @ 2003-01-22  9:19 UTC (permalink / raw)


I was wondering if it is possible to create a custom hook. In particular 
I would like a hook that is triggered whenever any sort of saving is 
attempted, whether it be autosaving, (save-buffer) or 
(save-buffer-kill-emacs).

thanks,

-- 
serendipity
merik
nirmal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating custom hooks?
  2003-01-22  9:19 Creating custom hooks? merik
@ 2003-01-22 10:11 ` Klaus Berndl
  2003-01-22 11:15   ` David Kastrup
  0 siblings, 1 reply; 6+ messages in thread
From: Klaus Berndl @ 2003-01-22 10:11 UTC (permalink / raw)


On 22 Jan 2003, merik@cc.gatech.edu wrote:

after-save-hook is called after every saving...a before-save-hook does not
exist...

Klaus

>  I was wondering if it is possible to create a custom hook. In particular 
>  I would like a hook that is triggered whenever any sort of saving is 
>  attempted, whether it be autosaving, (save-buffer) or 
>  (save-buffer-kill-emacs).
>  
>  thanks,

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating custom hooks?
  2003-01-22 10:11 ` Klaus Berndl
@ 2003-01-22 11:15   ` David Kastrup
  2003-01-22 14:19     ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 6+ messages in thread
From: David Kastrup @ 2003-01-22 11:15 UTC (permalink / raw)


Klaus Berndl <klaus.berndl@sdm.de> writes:

> On 22 Jan 2003, merik@cc.gatech.edu wrote:
> 
> after-save-hook is called after every saving...a before-save-hook does not
> exist...

write-file-functions
write-contents-functions

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating custom hooks?
  2003-01-22 11:15   ` David Kastrup
@ 2003-01-22 14:19     ` Stefan Monnier <foo@acm.com>
  2003-01-22 16:02       ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2003-01-22 14:19 UTC (permalink / raw)


> write-file-functions
> write-contents-functions

For those of you not lucky enough to use the CVS trunk of Emacs development,
those hooks were (incorrectly) called write-file-hooks and
write-content-hooks up until Emacs-21.3.


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating custom hooks?
  2003-01-22 14:19     ` Stefan Monnier <foo@acm.com>
@ 2003-01-22 16:02       ` Kai Großjohann
  2003-01-22 19:49         ` Stefan Monnier <foo@acm.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-01-22 16:02 UTC (permalink / raw)


"Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:

>> write-file-functions
>> write-contents-functions
>
> For those of you not lucky enough to use the CVS trunk of Emacs development,
> those hooks were (incorrectly) called write-file-hooks and
> write-content-hooks up until Emacs-21.3.

You mean those non-hooks ;-)  Otherwise, why would it be incorrect to
call them hooks...
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating custom hooks?
  2003-01-22 16:02       ` Kai Großjohann
@ 2003-01-22 19:49         ` Stefan Monnier <foo@acm.com>
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2003-01-22 19:49 UTC (permalink / raw)


>>> write-file-functions
>>> write-contents-functions
>> 
>> For those of you not lucky enough to use the CVS trunk of Emacs development,
>> those hooks were (incorrectly) called write-file-hooks and
>> write-content-hooks up until Emacs-21.3.
> You mean those non-hooks ;-)  Otherwise, why would it be incorrect to
> call them hooks...

No, they're hooks, but *a* hook shouldn't be called bla-bla-hooks,
obviously ;-)


        Stefan


PS: Next week, we'll look at why they can be called bla-bla-functions.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-22 19:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-22  9:19 Creating custom hooks? merik
2003-01-22 10:11 ` Klaus Berndl
2003-01-22 11:15   ` David Kastrup
2003-01-22 14:19     ` Stefan Monnier <foo@acm.com>
2003-01-22 16:02       ` Kai Großjohann
2003-01-22 19:49         ` Stefan Monnier <foo@acm.com>

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).