diff options
| author | Glenn Morris | 2011-05-09 19:31:42 -0700 |
|---|---|---|
| committer | Glenn Morris | 2011-05-09 19:31:42 -0700 |
| commit | b8f82dc15fc7370329930323082d9faf2a5fc7ad (patch) | |
| tree | 6d8c9e61daee68c5d443165b2d18ec7af864df84 /doc | |
| parent | 4f99f44b34c11935e00eb7acd3d464abd903ab53 (diff) | |
| download | emacs-b8f82dc15fc7370329930323082d9faf2a5fc7ad.tar.gz emacs-b8f82dc15fc7370329930323082d9faf2a5fc7ad.zip | |
Deprecate using "mode:" to enable minor modes (bug#8613)
* lisp/files.el (hack-one-local-variable-eval-safep):
Consider "eval: (foo-mode)" to be safe.
* doc/emacs/custom.texi (Specifying File Variables):
Deprecate using mode: for minor modes.
* etc/NEWS: Mention this.
* lisp/doc-view.el, lisp/net/soap-client.el:
Change "mode:" minor-mode file local variables to use "eval:".
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b417e806245..d3521dcd524 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-05-10 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * custom.texi (Specifying File Variables): | ||
| 4 | Deprecate using mode: for minor modes. | ||
| 5 | |||
| 1 | 2011-05-07 Glenn Morris <rgm@gnu.org> | 6 | 2011-05-07 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * cal-xtra.texi (Sexp Diary Entries): Mention diary-hebrew-birthday. | 8 | * cal-xtra.texi (Sexp Diary Entries): Mention diary-hebrew-birthday. |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 7a696df319b..d7a99d49d60 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -1085,9 +1085,8 @@ first line: | |||
| 1085 | You can specify any number of variable/value pairs in this way, each | 1085 | You can specify any number of variable/value pairs in this way, each |
| 1086 | pair with a colon and semicolon as shown above. The special | 1086 | pair with a colon and semicolon as shown above. The special |
| 1087 | variable/value pair @code{mode: @var{modename};}, if present, | 1087 | variable/value pair @code{mode: @var{modename};}, if present, |
| 1088 | specifies a major or minor mode; if you use this to specify a major | 1088 | specifies a major mode, and should come first in the line. The |
| 1089 | mode, it should come first in the line. The @var{value}s are used | 1089 | @var{value}s are used literally, and not evaluated. |
| 1090 | literally, and not evaluated. | ||
| 1091 | 1090 | ||
| 1092 | @findex add-file-local-variable-prop-line | 1091 | @findex add-file-local-variable-prop-line |
| 1093 | @findex delete-file-local-variable-prop-line | 1092 | @findex delete-file-local-variable-prop-line |
| @@ -1186,7 +1185,7 @@ list: | |||
| 1186 | 1185 | ||
| 1187 | @itemize | 1186 | @itemize |
| 1188 | @item | 1187 | @item |
| 1189 | @code{mode} enables the specified major or minor mode. | 1188 | @code{mode} enables the specified major mode. |
| 1190 | 1189 | ||
| 1191 | @item | 1190 | @item |
| 1192 | @code{eval} evaluates the specified Lisp expression (the value | 1191 | @code{eval} evaluates the specified Lisp expression (the value |
| @@ -1213,10 +1212,11 @@ variables as part of their initialization. | |||
| 1213 | You can use the @code{mode} ``variable'' to enable minor modes as | 1212 | You can use the @code{mode} ``variable'' to enable minor modes as |
| 1214 | well as the major modes; in fact, you can use it more than once, first | 1213 | well as the major modes; in fact, you can use it more than once, first |
| 1215 | to set the major mode and then to enable minor modes which are | 1214 | to set the major mode and then to enable minor modes which are |
| 1216 | specific to particular buffers. | 1215 | specific to particular buffers. Using @code{mode} for minor modes |
| 1216 | is deprecated, though---instead, use @code{eval: (minor-mode)}. | ||
| 1217 | 1217 | ||
| 1218 | Often, however, it is a mistake to enable minor modes this way. | 1218 | Often, however, it is a mistake to enable minor modes in file local |
| 1219 | Most minor modes, like Auto Fill mode, represent individual user | 1219 | variables. Most minor modes, like Auto Fill mode, represent individual user |
| 1220 | preferences. If you want to use a minor mode, it is better to set up | 1220 | preferences. If you want to use a minor mode, it is better to set up |
| 1221 | major mode hooks with your init file to turn that minor mode on for | 1221 | major mode hooks with your init file to turn that minor mode on for |
| 1222 | yourself alone (@pxref{Init File}), instead of using a local variable | 1222 | yourself alone (@pxref{Init File}), instead of using a local variable |