]> code.delx.au - gnu-emacs/commitdiff
(hack-one-local-variable-eval-safep): Recognize `edebug-form-spec' for `put',
authorEli Zaretskii <eliz@gnu.org>
Thu, 13 Apr 2006 10:54:38 +0000 (10:54 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 13 Apr 2006 10:54:38 +0000 (10:54 +0000)
but only if it passes `edebug-basic-spec'.  Generalize `put' handling.

lisp/files.el

index ca03ee8726bd0e51d6d3532bf5b6c5d0189fabaf..cd474e868d02ed405e9bbab8d0af6450134d3147 100644 (file)
@@ -2689,12 +2689,14 @@ 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))
-          (memq (nth 1 (nth 2 exp))
-                '(lisp-indent-hook))
-          ;; Only allow safe values of lisp-indent-hook;
-          ;; not functions.
-          (or (numberp (nth 3 exp))
-              (equal (nth 3 exp) ''defun)))
+          (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)))
+                  ((eq prop 'edebug-form-spec)
+                   ;; Only allow indirect form specs.
+                   (edebug-basic-spec val)))))
       ;; Allow expressions that the user requested.
       (member exp safe-local-eval-forms)
       ;; Certain functions can be allowed with safe arguments