From: Sam Steingold Date: Wed, 28 Apr 2010 16:14:41 +0000 (-0400) Subject: (bug-reference-url-format): Mark as `safe-local-variable' if the value X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~350 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95c6cc3eff959dd8b107f1c54c1e3507fb4bb24e;p=emacs.git (bug-reference-url-format): Mark as `safe-local-variable' if the value is a string or a symbol with the property `bug-reference-url-format'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a97a6e9cc7d..3eba70f40af 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-04-28 Sam Steingold + + * progmodes/bug-reference.el (bug-reference-url-format): Mark as + `safe-local-variable' if the value is a string or a symbol with + the property `bug-reference-url-format'. + 2010-04-28 Chong Yidong * progmodes/bug-reference.el (bug-reference-url-format): Revert diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 462f978ab78..4897581252f 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -48,10 +48,18 @@ It can use `match-string' to get parts matched against 1. issue kind (bug, patch, rfe &c) 2. issue number. -There is no default setting for this, it must be set per file.") +There is no default setting for this, it must be set per file. +If you set it to a symbol in the file Local Variables section, +you need to add a `bug-reference-url-format' property to it: +\(put 'my-bug-reference-url-format 'bug-reference-url-format t) +so that it is considered safe, see `enable-local-variables'.") ;;;###autoload -(put 'bug-reference-url-format 'safe-local-variable 'stringp) +(put 'bug-reference-url-format 'safe-local-variable + (lambda (s) + (or (stringp s) + (and (symbolp s) + (get s 'bug-reference-url-format))))) (defconst bug-reference-bug-regexp "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\)"