Permalink
Browse files

=Deduplicate `sr-rainbow' definition.

  • Loading branch information...
1 parent c4c2ce1 commit 76e6598a017bb644d9b7faf26e03e73deb48db96 @stepnem stepnem committed Nov 20, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 sunrise-commander.el
View
@@ -3988,8 +3988,9 @@ with advice matching REGEXP."
(defmacro sr-rainbow (symbol spec regexp)
`(progn
(defface ,symbol '((t ,spec)) "Sunrise rainbow face" :group 'sunrise)
- (font-lock-add-keywords 'sr-mode '((,regexp 1 (quote ,symbol))))
- (font-lock-add-keywords 'sr-virtual-mode '((,regexp 1 (quote ,symbol))))))
+ ,@(mapcar (lambda (m)
+ `(font-lock-add-keywords ',m '((,regexp 1 ',symbol))))
+ '(sr-mode sr-virtual-mode))))
(sr-rainbow sr-html-face (:foreground "DarkOliveGreen") "\\(^..[^d].*\\.x?html?$\\)")
(sr-rainbow sr-xml-face (:foreground "DarkGreen") "\\(^..[^d].*\\.\\(xml\\|xsd\\|xslt?\\|wsdl\\)$\\)")

0 comments on commit 76e6598

Please sign in to comment.