all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Johan Bockgård" <bojohan@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: theme and a question about creating them
Date: Sat, 08 Jan 2011 04:12:22 +0100	[thread overview]
Message-ID: <87tyhk2ind.fsf@gnu.org> (raw)
In-Reply-To: <jwvfwt54ca9.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 06 Jan 2011 22:36:20 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> 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  <bojohan@gnu.org>

	* 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	other threads:[~2011-01-08  3:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31 15:52 theme and a question about creating them Dirk-Jan C. Binnema
2011-01-02 14:16 ` Chong Yidong
2011-01-02 17:38   ` Yavuz
2011-01-05 19:26   ` Dirk-Jan C. Binnema
2011-01-05 21:05   ` Stefan Monnier
2011-01-05 22:30     ` Johan Bockgård
2011-01-07  3:36       ` Stefan Monnier
2011-01-08  3:12         ` Johan Bockgård [this message]
2011-01-08  5:26           ` Stefan Monnier
2011-01-11 18:57             ` Johan Bockgård
2011-01-06  0:49     ` Chong Yidong
2011-01-08 19:28     ` Chong Yidong
2011-01-15  0:48       ` Johan Bockgård
2011-01-19 22:42         ` Johan Bockgård
2011-01-20  3:04           ` Chong Yidong
2011-01-20 15:46             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyhk2ind.fsf@gnu.org \
    --to=bojohan@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.