(setq trusted t)))
trusted)))))))
-;; This is an odd variable IMO.
-;; You might wonder why it is needed, when we could just do:
-;; (setq-local enable-local-variables nil)
-;; These two are not precisely the same.
-;; Setting this variable does not cause -*- mode settings to be
-;; ignored, whereas setting enable-local-variables does.
-;; Only three places in Emacs use this variable: tar and arc modes,
-;; and rmail. The first two don't need it. They already use
-;; inhibit-local-variables-regexps, which is probably enough, and
-;; could also just set enable-local-variables locally to nil.
-;; Them setting it has the side-effect that dir-locals cannot apply to
-;; eg tar files (?). FIXME Is this appropriate?
-;; AFAICS, rmail is the only thing that needs this, and the only
-;; reason it uses it is for BABYL files (which are obsolete).
-;; These contain "-*- rmail -*-" in the first line, which rmail wants
-;; to respect, so that find-file on a BABYL file will switch to
-;; rmail-mode automatically (this is nice, but hardly essential,
-;; since most people are used to explicitly running a command to
-;; access their mail; M-x gnus etc). Rmail files may happen to
-;; contain Local Variables sections in messages, which Rmail wants to
-;; ignore. So AFAICS the only reason this variable exists is for a
-;; minor convenience feature for handling of an obsolete Rmail file format.
-(defvar local-enable-local-variables t
- "Like `enable-local-variables', except for major mode in a -*- line.
-The meaningful values are nil and non-nil. The default is non-nil.
-It should be set in a buffer-local fashion.
-
-Setting this to nil has the same effect as setting `enable-local-variables'
-to nil, except that it does not ignore any mode: setting in a -*- line.
-Unless this difference matters to you, you should set `enable-local-variables'
-instead of this variable.")
-
(defcustom enable-local-eval nil
"Control processing of the \"variable\" `eval' in a file's local variables.
The value can be t, nil or something else.
This function is called automatically from `find-file'. In that case,
we may set up the file-specified mode and local variables,
depending on the value of `enable-local-variables'.
-In addition, if `local-enable-local-variables' is nil, we do
-not set local variables (though we do notice a mode specified with -*-.)
`enable-local-variables' is ignored if you run `normal-mode' interactively,
or from Lisp without specifying the optional argument FIND-FILE;
If `enable-local-variables' is nil, or if the file name matches
`inhibit-local-variables-regexps', this function does not check
-for any mode: tag anywhere in the file. If `local-enable-local-variables'
-is nil, then the only mode: tag that can be relevant is a -*- one.
+for any mode: tag anywhere in the file.
If the optional argument KEEP-MODE-IF-SAME is non-nil, then we
set the major mode only if that would change it. In other words
(save-excursion
(goto-char (point-min))
(skip-chars-forward " \t\n")
- ;; Note by design local-enable-local-variables does not matter here.
(and enable-local-variables
try-locals
(setq end (set-auto-mode-1))
If one is found, set point to the beginning and return the position
of the end. Otherwise, return nil; may change point.
The variable `inhibit-local-variables-regexps' can cause a -*- spec to
-be ignored; but `enable-local-variables' and `local-enable-local-variables'
-have no effect."
+be ignored; but `enable-local-variables' has no effect."
(let (beg end)
(and
;; Don't look for -*- if this file name matches any
Uses `hack-local-variables-apply' and `hack-dir-local-variables'
to apply the variables.
-If `enable-local-variables' or `local-enable-local-variables' is
-nil, or INHIBIT-LOCALS is non-nil, this function disregards all
-normal local variables. If `inhibit-local-variables-regexps'
-applies to the file in question, the file is not scanned for
-local variables, but directory-local variables may still be
-applied.
+If `enable-local-variables' is nil, or if INHIBIT-LOCALS is non-nil,
+this function disregards all normal local variables. If
+`inhibit-local-variables-regexps' applies to the file in question, the
+file is not scanned for local variables, but directory-local variables
+may still be applied.
Variables present in `permanently-enabled-local-variables' will
still be evaluated, even if local variables are otherwise
;; variable sections, but there is no reason dir-locals cannot apply
;; to them. The real meaning of inhibit-local-variables-p is "do
;; not scan this file for local variables".
- (let ((enable-local-variables
- (and (not inhibit-locals)
- local-enable-local-variables enable-local-variables)))
+ (let ((enable-local-variables (not inhibit-locals)))
(if (eq handle-mode t)
;; We're looking just for the major mode setting.
(and enable-local-variables