unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* the ...-unload-hook convention doesn't work
@ 2004-01-05 18:24 Luc Teirlinck
  2004-01-06 14:33 ` Dave Love
  0 siblings, 1 reply; 17+ messages in thread
From: Luc Teirlinck @ 2004-01-05 18:24 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dave Love wrote:

    I'm confused by this, since I'm sure it worked when I implemented it,
    but the installed code never seems to have been right since it's
    calling a function as if it were a hook list.

It now is supposed to be a normal hook.  From (elisp)Unloading:

     If `FEATURE-unload-hook' is defined, it is run as a normal hook
     before restoring the previous definitions, _instead of_ the usual
     hook-removing actions.

But how could this have broken things?  `run-hooks' is supposed to be
able to handle a single function instead of a list, so there should be
no problems with compatibility in as far as line 143 is concerned.
Are there concrete examples of problems arising from either defining
FEATURE-unload-hook as a function (even though, according to the Elisp
manual, this is now considered obsolete) or defining it as a normal
hook?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 17+ messages in thread
* the ...-unload-hook convention doesn't work
@ 2004-01-05 15:01 Dave Love
  0 siblings, 0 replies; 17+ messages in thread
From: Dave Love @ 2004-01-05 15:01 UTC (permalink / raw)


I'm confused by this, since I'm sure it worked when I implemented it,
but the installed code never seems to have been right since it's
calling a function as if it were a hook list.

*** loadhist.el.~1.26.~	Mon Oct  6 11:55:29 2003
--- loadhist.el	Wed Dec  3 20:23:43 2003
***************
*** 140,146 ****
      ;; First off, provide a clean way for package `foo' to arrange
      ;; this by defining `foo-unload-hook'.
      (if unload-hook
!         (run-hooks unload-hook)
        ;; Otherwise, do our best.  Look through the obarray for symbols
        ;; which seem to be hook variables or special hook functions and
        ;; remove anything from them which matches the feature-symbols
--- 140,146 ----
      ;; First off, provide a clean way for package `foo' to arrange
      ;; this by defining `foo-unload-hook'.
      (if unload-hook
!         (funcall unload-hook)
        ;; Otherwise, do our best.  Look through the obarray for symbols
        ;; which seem to be hook variables or special hook functions and
        ;; remove anything from them which matches the feature-symbols

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

end of thread, other threads:[~2004-01-17  2:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-05 18:24 the ...-unload-hook convention doesn't work Luc Teirlinck
2004-01-06 14:33 ` Dave Love
2004-01-07 15:05   ` Richard Stallman
2004-01-09 14:39     ` Dave Love
2004-01-09 17:08       ` Luc Teirlinck
2004-01-11 19:37         ` Richard Stallman
2004-01-12 19:35           ` Kevin Rodgers
2004-01-16  0:23           ` Dave Love
     [not found]           ` <mailman.744.1074223463.928.bug-gnu-emacs@gnu.org>
2004-01-16  6:21             ` Simon Josefsson
2004-01-16 19:54               ` Richard Stallman
2004-01-17  2:22                 ` Simon Josefsson
2004-01-17  0:21               ` Dave Love
2004-01-12 15:23         ` Dave Love
2004-01-11 19:36       ` Richard Stallman
2004-01-16  0:18         ` Dave Love
2004-01-16 19:54           ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2004-01-05 15:01 Dave Love

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