> I still do not understand exactly what a nil argument for MODE in > font-lock-{add,remove}-keywords is supposed to accomplish.
It adds the keywords for the current buffer only. > When used from a Lisp program (such as a minor mode), it is recommended to > use nil for mode (and place the call on a hook) to avoid subtle problems > due to details of the implementation. > Which subtle problems? Can't remember. IIRC there were problems where adding keywords to comint-mode didn't add them to all derivatives. And the implementation of the non-nil case is sufficiently horrendous to make you confident that there will be other subtle problems. > It seems to me that a _global_ minor mode _should_ use a non-nil MODE > argument when adding or removing a keyword. I'm not sure what you mean by a "global minor mode" (do you mean define-minor-mode :global, or define-global-minor-mode). But in any case your statement doesn't make much sense to me: if the minor mode is global, to *which* MODE should it add keywords? > Do the "subtle problems" refer to problems that occur when trying to make > font-lock-keywords-alist buffer local, as a buffer local minor mode might > be tempted to do? No, I've never seen anyone try to make font-lock-keywords-alist buffer-local (thank god). Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel