diff options
| author | Chong Yidong | 2008-08-05 20:46:42 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-08-05 20:46:42 +0000 |
| commit | 9b3e808682234b2ed17b90a76b2dd2ae880459db (patch) | |
| tree | ac0f7799b2c70220bf7225b24ac19386e467a102 | |
| parent | 910ff80b55057dceef65c430cad4ae2b0593bbfa (diff) | |
| download | emacs-9b3e808682234b2ed17b90a76b2dd2ae880459db.tar.gz emacs-9b3e808682234b2ed17b90a76b2dd2ae880459db.zip | |
(hack-one-local-variable-eval-safep): Handle lisp-indent-function and
scheme-indent-function in addition to the deprecated lisp-indent-hook.
| -rw-r--r-- | lisp/files.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el index ee9f6bb43bc..6e2bcf4486c 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2995,11 +2995,15 @@ It is dangerous if either of these conditions are met: | |||
| 2995 | (and (eq (car exp) 'put) | 2995 | (and (eq (car exp) 'put) |
| 2996 | (hack-one-local-variable-quotep (nth 1 exp)) | 2996 | (hack-one-local-variable-quotep (nth 1 exp)) |
| 2997 | (hack-one-local-variable-quotep (nth 2 exp)) | 2997 | (hack-one-local-variable-quotep (nth 2 exp)) |
| 2998 | (let ((prop (nth 1 (nth 2 exp))) (val (nth 3 exp))) | 2998 | (let ((prop (nth 1 (nth 2 exp))) |
| 2999 | (cond ((eq prop 'lisp-indent-hook) | 2999 | (val (nth 3 exp))) |
| 3000 | ;; Only allow safe values of lisp-indent-hook; | 3000 | (cond ((memq prop '(lisp-indent-hook |
| 3001 | ;; not functions. | 3001 | lisp-indent-function |
| 3002 | (or (numberp val) (equal val ''defun))) | 3002 | scheme-indent-function)) |
| 3003 | ;; Only allow safe values (not functions). | ||
| 3004 | (or (numberp val) | ||
| 3005 | (and (hack-one-local-variable-quotep val) | ||
| 3006 | (eq (nth 1 val) 'defun)))) | ||
| 3003 | ((eq prop 'edebug-form-spec) | 3007 | ((eq prop 'edebug-form-spec) |
| 3004 | ;; Only allow indirect form specs. | 3008 | ;; Only allow indirect form specs. |
| 3005 | ;; During bootstrapping, edebug-basic-spec might not be | 3009 | ;; During bootstrapping, edebug-basic-spec might not be |