emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100074: (bug-reference-url-format):


From: Sam Steingold
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100074: (bug-reference-url-format): Mark as `safe-local-variable' if the value
Date: Wed, 28 Apr 2010 12:14:41 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100074
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Wed 2010-04-28 12:14:41 -0400
message:
  (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'.
modified:
  lisp/ChangeLog
  lisp/progmodes/bug-reference.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-04-28 15:45:45 +0000
+++ b/lisp/ChangeLog    2010-04-28 16:14:41 +0000
@@ -1,3 +1,9 @@
+2010-04-28  Sam Steingold  <address@hidden>
+
+       * 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  <address@hidden>
 
        * progmodes/bug-reference.el (bug-reference-url-format): Revert

=== modified file 'lisp/progmodes/bug-reference.el'
--- a/lisp/progmodes/bug-reference.el   2010-04-28 15:45:45 +0000
+++ b/lisp/progmodes/bug-reference.el   2010-04-28 16:14:41 +0000
@@ -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]+\\)"


reply via email to

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