Stefan Monnier wrote: > ! @strong{Warning:} Only use a [EMAIL PROTECTED] @var{mode} argument when > ! you use @code{font-lock-add-keywords} or > ! @code{font-lock-remove-keywords} in your @file{.emacs} file. When you > ! use these functions from a Lisp program (such as a minor mode), we > ! recommend that you use @code{nil} for @var{mode} (and place the call > ! on a hook) to avoid subtle problems due to the details of the > ! implementation.
The intention with the above text was to make a non-nil argument semi-obsolete, That may be what the above text _intends_ to say, but it definitely is not what it says. It even says to always use a non-nil argument when used from .emacs, probably the most important use. The text is very vague, for instance, it says to add them to "a hook" whereas there are only two hooks for which it will work properly (for compliant major modes), the major mode hook and after-change-major-mode-hook (if you want to get a "permanent local" type behavior). The misleading text in question made me loose a lot of time. Getting rid of it will prevent other people from loosing a lot of time. In my replacement text, I document the actual situation: a non-nil argument does not apply to derived modes, a nil one must be added to a major mode hook and if used this way, it will apply to derived modes _if_ the major modes in question follow the conventions. Sincerely, Luc. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel