unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Writing Gnu Emacs extension book - What occured to make-local-hook?
@ 2012-11-08 21:38 Yves Baumes
  2012-11-08 22:25 ` Doug Lewan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yves Baumes @ 2012-11-08 21:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hi everyone,

I am reading the Writing GNU Emacs extention book, and it refers to the
function 'make-local-hook. After some research, it appears to me that it has
been removed in some previous version of Emacs. Am I right?

I've downloaded the latest elisp reference book, and found no reference
to it in the whole PDF. (while 'make-local-variable still exits).

I've looked into the 'add-hook source code, and it appears to me that it
makes the job of turning the hook into a local variable, provided the
'local argument is non-nil.

  (if local (unless (local-variable-if-set-p hook)
	      (set (make-local-variable hook) (list t)))

Finally, am I right to consider I no londer needs to call 'make-local-hook
as long as I call 'add-hook with the correct parameter set?

Regards, to everyone
Yves.


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

* RE: Writing Gnu Emacs extension book - What occured to make-local-hook?
  2012-11-08 21:38 Writing Gnu Emacs extension book - What occured to make-local-hook? Yves Baumes
@ 2012-11-08 22:25 ` Doug Lewan
       [not found] ` <mailman.12575.1352413447.855.help-gnu-emacs@gnu.org>
  2012-11-09  3:33 ` Jambunathan K
  2 siblings, 0 replies; 4+ messages in thread
From: Doug Lewan @ 2012-11-08 22:25 UTC (permalink / raw)
  To: Yves Baumes, help-gnu-emacs@gnu.org

I don't find it in emacs 24 and the NEWS file mentions it as an "obsolete function or alias that has been removed." (Slight paraphrase for grammatical clarity.) That change was apparently made in 24.1.

,Doug

> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Yves Baumes
> Sent: Thursday, 2012 November 08 16:38
> To: help-gnu-emacs@gnu.org
> Subject: Writing Gnu Emacs extension book - What occured to make-local-
> hook?
> 
> Hi everyone,
> 
> I am reading the Writing GNU Emacs extention book, and it refers to the
> function 'make-local-hook. After some research, it appears to me that
> it has
> been removed in some previous version of Emacs. Am I right?
> 
> I've downloaded the latest elisp reference book, and found no reference
> to it in the whole PDF. (while 'make-local-variable still exits).
> 
> I've looked into the 'add-hook source code, and it appears to me that
> it
> makes the job of turning the hook into a local variable, provided the
> 'local argument is non-nil.
> 
>   (if local (unless (local-variable-if-set-p hook)
> 	      (set (make-local-variable hook) (list t)))
> 
> Finally, am I right to consider I no londer needs to call 'make-local-
> hook
> as long as I call 'add-hook with the correct parameter set?
> 
> Regards, to everyone
> Yves.



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

* Re: Writing Gnu Emacs extension book - What occured to make-local-hook?
       [not found] ` <mailman.12575.1352413447.855.help-gnu-emacs@gnu.org>
@ 2012-11-08 23:37   ` Peter
  0 siblings, 0 replies; 4+ messages in thread
From: Peter @ 2012-11-08 23:37 UTC (permalink / raw)
  To: gnu.emacs.help; +Cc: help-gnu-emacs@gnu.org, Yves Baumes

I am really reaching here because it was a while ago now! :-) 

I am a package author that used it and noticed its absence.

But from memory it basically became obsolete. Wait one, I'll check....

Yes, add-hook has an option to make a hook "local" - that is what I now use.

Regards
Peter



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

* Re: Writing Gnu Emacs extension book - What occured to make-local-hook?
  2012-11-08 21:38 Writing Gnu Emacs extension book - What occured to make-local-hook? Yves Baumes
  2012-11-08 22:25 ` Doug Lewan
       [not found] ` <mailman.12575.1352413447.855.help-gnu-emacs@gnu.org>
@ 2012-11-09  3:33 ` Jambunathan K
  2 siblings, 0 replies; 4+ messages in thread
From: Jambunathan K @ 2012-11-09  3:33 UTC (permalink / raw)
  To: Yves Baumes; +Cc: help-gnu-emacs

Yves Baumes <ybaumes@gmail.com> writes:

> Hi everyone,
>
> I am reading the Writing GNU Emacs extention book, and it refers to the
> function 'make-local-hook. After some research, it appears to me that it has
> been removed in some previous version of Emacs. Am I right?
>
> I've downloaded the latest elisp reference book, and found no reference
> to it in the whole PDF. (while 'make-local-variable still exits).
>
> I've looked into the 'add-hook source code, and it appears to me that it
> makes the job of turning the hook into a local variable, provided the
> 'local argument is non-nil.
>
>   (if local (unless (local-variable-if-set-p hook)
> 	      (set (make-local-variable hook) (list t)))
>
> Finally, am I right to consider I no londer needs to call 'make-local-hook
> as long as I call 'add-hook with the correct parameter set?

C-h n 
C-s make-local-hook

NEWS is the "RSS file" for Emacs releases.

> Regards, to everyone
> Yves.
>

-- 



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

end of thread, other threads:[~2012-11-09  3:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 21:38 Writing Gnu Emacs extension book - What occured to make-local-hook? Yves Baumes
2012-11-08 22:25 ` Doug Lewan
     [not found] ` <mailman.12575.1352413447.855.help-gnu-emacs@gnu.org>
2012-11-08 23:37   ` Peter
2012-11-09  3:33 ` Jambunathan K

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