From: Sam Steingold <sds@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: /srv/bzr/emacs/trunk r100059: (bug-reference-url-format): Mark as `safe-local-variable' if the value
Date: Tue, 27 Apr 2010 19:10:59 -0400 [thread overview]
Message-ID: <w2l1f77704b1004271610je3670990y4c724c25f0266f5@mail.gmail.com> (raw)
In-Reply-To: <87sk6go6v8.fsf@stupidchicken.com>
On 4/27/10, Chong Yidong <cyd@stupidchicken.com> wrote:
> Sam Steingold <sds@gnu.org> writes:
>
> > this means that I cannot really set bug-reference-url-format in the
> > "Local Variables:"
> > section together with "mode: bug-reference" if I also set
> > enable-local-variables to :safe.
> >
>
> > For your reference, I set bug-reference-url-format to
> > clisp-bug-reference-url-format:
> >
> > (defun clisp-bug-reference-url-format ()
> > (concat "http://sourceforge.net/tracker/index.php?func=detail&aid="
> > (match-string-no-properties 2)
> > "&group_id=1355&atid="
> > (let ((kind (match-string-no-properties 1)))
> > (cond ((string-match "[Bb]ug" kind) "101355")
> > ((string-match "[Pp]atch" kind) "301355")
> > ((string-match "RFE" kind) "351355")
> > (t (error "unknown bug kind [%s]" kind))))))
>
>
> Where do you define clisp-bug-reference-url-format? In your init file?
no, it is a part of the clisp distribution (and cvs tree)
> If so, you could probably add
>
> (put 'bug-reference-url-format 'safe-local-variable
> (lambda (s) (or (stringp s)
> (eq s 'clisp-bug-reference-url-format))))
>
> at the same place.
>
brilliant!
actually, I think the right way is
(put 'bug-reference-url-format 'safe-local-variable
(let ((f (get 'bug-reference-url-format 'safe-local-variable)))
(lambda (s) (or (funcall f s) (eq s 'clisp-bug-reference-url-format)))))
so that if others do that too, I will not override them.
in fact, maybe the above should be a standard function
(add-safe-value variable symbol)
--
Sam Steingold <http://sds.podval.org>
next prev parent reply other threads:[~2010-04-27 23:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1O6mXN-0006ds-3k@internal.in.savannah.gnu.org>
2010-04-27 21:32 ` /srv/bzr/emacs/trunk r100059: (bug-reference-url-format): Mark as `safe-local-variable' if the value Glenn Morris
2010-04-27 21:46 ` Chong Yidong
2010-04-27 22:09 ` Sam Steingold
2010-04-27 22:39 ` Lennart Borgman
2010-04-27 22:42 ` Chong Yidong
2010-04-27 23:10 ` Sam Steingold [this message]
2010-04-28 15:32 ` Davis Herring
2010-04-28 15:51 ` Chong Yidong
2010-04-28 16:25 ` Davis Herring
2010-04-28 17:21 ` Chong Yidong
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=w2l1f77704b1004271610je3670990y4c724c25f0266f5@mail.gmail.com \
--to=sds@gnu.org \
--cc=cyd@stupidchicken.com \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).