changeset 108157:852f6a14d31e

(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'.
author Sam Steingold <sds@gnu.org>
date Wed, 28 Apr 2010 12:14:41 -0400
parents 41f5a4a424d8
children 94e4a7a7cadf
files lisp/ChangeLog lisp/progmodes/bug-reference.el
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Apr 28 08:58:29 2010 -0700
+++ b/lisp/ChangeLog	Wed Apr 28 12:14:41 2010 -0400
@@ -1,3 +1,9 @@
+2010-04-28  Sam Steingold  <sds@gnu.org>
+
+	* 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  <cyd@stupidchicken.com>
 
 	* progmodes/bug-reference.el (bug-reference-url-format): Revert
--- a/lisp/progmodes/bug-reference.el	Wed Apr 28 08:58:29 2010 -0700
+++ b/lisp/progmodes/bug-reference.el	Wed Apr 28 12:14:41 2010 -0400
@@ -48,10 +48,18 @@
  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]+\\)"