emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: theme and a question about creating them


From: Johan Bockgård
Subject: Re: theme and a question about creating them
Date: Sat, 08 Jan 2011 04:12:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> unsafep does not allow \`
>
> I can't think of a reason why backquote wouldn't be safe, so it sounds
> like it's just missing from the list of safe forms.  Or maybe it's the
> general handling of macros which is at stake, but in any case it
> shouldn't be unsolvable.

Something like


2011-01-07  Johan Bockgård  <address@hidden>

        * emacs-lisp/unsafep.el (unsafep): Handle backquoted forms.


diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el
index a62f8de..5dee2af 100644
--- a/lisp/emacs-lisp/unsafep.el
+++ b/lisp/emacs-lisp/unsafep.el
@@ -202,6 +202,9 @@ UNSAFEP-VARS is a list of symbols with local bindings."
              (dolist (x (nthcdr 3 form))
                (setq reason (unsafep-progn (cdr x)))
                (if reason (throw 'unsafep reason))))))
+       ((eq fun '\`)
+       ;; Backquoted form - safe if its expansion is.
+       (unsafep (cdr (backquote-process (cadr form)))))
        (t
        ;;First unsafep-function call above wasn't nil, no special case applies
        reason)))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]