[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8613: "mode:" for minor-mode breaks set-visited-file-name

From: Stefan Monnier
Subject: bug#8613: "mode:" for minor-mode breaks set-visited-file-name
Date: Wed, 04 May 2011 09:52:42 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> The fact that "mode:" is allowed to indicate both major and minor modes
>>> in file local variables is problematic. Things would be much simpler if
>>> a different convention were used for minor modes.
> So; shall we try to come up with a new convention for enabling
> minor-modes via file-local variables, and deprecate using mode: for that?

Yes, please.

> All "mode:" does is funcall FOO-mode [1], which is nothing that can't be
> done with :eval, except the latter will prompt for confirmation.  Rather
> than adding eg "minor-mode:", maybe safe-local-eval-forms could be
> extended with a regexp element matching something like "([a-z]+-mode)".

Not a bad idea, tho I'd much rather add
a (run-hook-with-args-until-success 'safe-local-eval-functions) instead
rather than rely on regexps.

Another option is to let define-minor-mode place
a `safe-local-eval-function' property on the minor-mode's symbol.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]