]> git.eshelyaron.com Git - emacs.git/commitdiff
(hack-one-local-variable-eval-safep): Handle lisp-indent-function and
authorChong Yidong <cyd@stupidchicken.com>
Tue, 5 Aug 2008 20:46:42 +0000 (20:46 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 5 Aug 2008 20:46:42 +0000 (20:46 +0000)
scheme-indent-function in addition to the deprecated lisp-indent-hook.

lisp/files.el

index ee9f6bb43bc6e5d3ffbd28f734d4a6e30a99c936..6e2bcf4486ce302cfb85ad32626793cbbf6ecd95 100644 (file)
@@ -2995,11 +2995,15 @@ It is dangerous if either of these conditions are met:
       (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