Subject: Re: bug#5327: 23.1; unload-feature-special-hooks add fill-nobreak-predicate

From: Kevin Ryde <[email-masked]>
Date: Sat, 09 Jan 2010 08:28:10 +1100

Juanma Barranquero <[email-masked]> writes:
>
> The question is
> whether there are many variables called -functions which are not
> really hooks.

That'd be the dangerous bit.  I've got a defconst called -functions in
some of my code, but it wouldn't be hurt.

Those with a custom-type of 'hook or '(repeat function) could be likely.
In fact any var with that custom-type might be ok to act on.  A grep
finds me three called -functions (code below)

    find-directory-functions
    auto-coding-functions
    compile-command-default-functions

of which auto-coding-functions may be the only important one not
presently in unload-feature-special-hooks.

(pp (let (ret)
      (mapatoms (lambda (sym)
                  (and (boundp sym)
                       (get sym 'custom-type)
                       (not (memq sym unload-feature-special-hooks))
                       (string-match "-functions\\'" (symbol-name sym))
                       (push (list sym (get sym 'custom-type)) ret))))
      ret)
    (current-buffer))