Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d3221d7
Commit
7d3221d7
authored
Jun 10, 1993
by
Richard M. Stallman
Browse files
(hack-one-local-variable): Treat ...-hook(s) and ..-function(s)
like setting the `eval' variable.
parent
c2225d00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lisp/files.el
lisp/files.el
+8
-3
No files found.
lisp/files.el
View file @
7d3221d7
...
...
@@ -1011,7 +1011,9 @@ If `enable-local-variables' is nil, this function does not check for a
((
memq
var
ignored-local-variables
)
nil
)
;; "Setting" eval means either eval it or do nothing.
((
eq
var
'eval
)
;; Likewise for setting hook variables.
((
or
(
eq
var
'eval
)
(
string-match
"-hooks?$\\|-functions?$"
(
symbol-name
var
)))
(
if
(
and
(
not
(
string=
(
user-login-name
)
"root"
))
(
or
(
eq
enable-local-eval
t
)
(
and
enable-local-eval
...
...
@@ -1021,9 +1023,12 @@ If `enable-local-variables' is nil, this function does not check for a
(
beginning-of-line
)
(
set-window-start
(
selected-window
)
(
point
)))
(
setq
enable-local-eval
(
y-or-n-p
(
format
"Process `eval' local variable in file %s? "
(
y-or-n-p
(
format
"Process `eval'
or hook
local variable
s
in file %s? "
(
file-name-nondirectory
buffer-file-name
))))))))
(
save-excursion
(
eval
val
))
(
if
(
eq
var
'eval
)
(
save-excursion
(
eval
val
))
(
make-local-variable
var
)
(
set
var
val
))
(
message
"Ignoring `eval:' in file's local variables"
)))
;; Ordinary variable, really set it.
(
t
(
make-local-variable
var
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment