Mercurial > emacs
changeset 97292:b2e505761049
(hack-one-local-variable-eval-safep): Handle lisp-indent-function and
scheme-indent-function in addition to the deprecated lisp-indent-hook.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 05 Aug 2008 20:46:42 +0000 |
parents | 872de13efa4d |
children | bfe6068912b0 |
files | lisp/files.el |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Tue Aug 05 20:46:27 2008 +0000 +++ b/lisp/files.el Tue Aug 05 20:46:42 2008 +0000 @@ -2995,11 +2995,15 @@ (and (eq (car exp) 'put) (hack-one-local-variable-quotep (nth 1 exp)) (hack-one-local-variable-quotep (nth 2 exp)) - (let ((prop (nth 1 (nth 2 exp))) (val (nth 3 exp))) - (cond ((eq prop 'lisp-indent-hook) - ;; Only allow safe values of lisp-indent-hook; - ;; not functions. - (or (numberp val) (equal val ''defun))) + (let ((prop (nth 1 (nth 2 exp))) + (val (nth 3 exp))) + (cond ((memq prop '(lisp-indent-hook + lisp-indent-function + scheme-indent-function)) + ;; Only allow safe values (not functions). + (or (numberp val) + (and (hack-one-local-variable-quotep val) + (eq (nth 1 val) 'defun)))) ((eq prop 'edebug-form-spec) ;; Only allow indirect form specs. ;; During bootstrapping, edebug-basic-spec might not be