summaryrefslogtreecommitdiff
path: root/pcr/emacs-color-theme/gnus-bug.diff
blob: 9d227df562e157bc927d4f7fdda0ab49c3ebb25a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -Naur color-theme-6.6.0.orig/color-theme.el color-theme-6.6.0.new/color-theme.el
--- color-theme-6.6.0.orig/color-theme.el	2011-11-18 01:17:29.000000000 +0100
+++ color-theme-6.6.0.new/color-theme.el	2011-11-18 01:24:07.000000000 +0100
@@ -73,9 +73,10 @@
   "Non-nil if running XEmacs.")
 
 ;; Add this since it appears to miss in emacs-2x
-(or (fboundp 'replace-in-string)
-    (defun replace-in-string (target old new)
-      (replace-regexp-in-string old new  target)))
+(if (fboundp 'replace-in-string)
+    (defalias 'color-theme-replace-in-string 'replace-in-string)
+  (defsubst color-theme-replace-in-string (target old new &optional literal)
+    (replace-regexp-in-string old new target nil literal)))
 
 ;; face-attr-construct has a problem in Emacs 20.7 and older when
 ;; dealing with inverse-video faces.  Here is a short test to check
@@ -1626,8 +1627,8 @@
        (add-to-list 'color-themes
                     (list ',n
                           (upcase-initials
-                           (replace-in-string
-                            (replace-in-string 
+                           (color-theme-replace-in-string
+                            (color-theme-replace-in-string 
                              (symbol-name ',n) "^color-theme-" "") "-" " "))
                           ,author))
        (defun ,n ()