changeset 70004:e70b5899f72c

(hack-one-local-variable-eval-safep): Recognize `edebug-form-spec' for `put', but only if it passes `edebug-basic-spec'. Generalize `put' handling.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 13 Apr 2006 10:54:38 +0000
parents 5fd1441a60f9
children 6b2e69b964c8
files lisp/files.el
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Apr 13 10:51:17 2006 +0000
+++ b/lisp/files.el	Thu Apr 13 10:54:38 2006 +0000
@@ -2689,12 +2689,14 @@
       (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