(nnir-compose-result): Use `gnus-replace-in-string' instead of `substitute' to
authorReiner Steib <Reiner.Steib@gmx.de>
Mon, 21 Apr 2008 16:33:54 +0000 (16:33 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Mon, 21 Apr 2008 16:33:54 +0000 (16:33 +0000)
avoid using cl at runtime.

contrib/ChangeLog
contrib/nnir.el

index 0473e31..44ccc3e 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-21  Justus Piater  <Justus-bulk@Piater.name>
+
+       * nnir.el (nnir-compose-result): Use `gnus-replace-in-string' instead
+       of `substitute' to avoid using cl at runtime.
+
 2008-04-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * nnir.el: Don't require edmacro anymore.  Remove bogus Emacs 19
index 1751dfc..f090a3e 100644 (file)
@@ -880,10 +880,11 @@ ready to be added to the list of search results."
     (setq dirnam
          (substring dirnam 0 (if (string= server "nnmaildir:") -5 -1)))
 
-    ;; eliminate all ".", "/", "\" from beginning. Always matches.
-    (string-match "^[./\\]*\\(.*\\)$" dirnam)
-    (setq group (substitute ?. ?/ (match-string 1 dirnam))) ;; "/" -> "."
-    (setq group (substitute ?. ?\\ group)) ;; "\\" -> "."
+    ;; Set group to dirnam without any leading dots or slashes,
+    ;; and with all subsequent slashes replaced by dots
+    (setq group (gnus-replace-in-string
+                 (gnus-replace-in-string dirnam "^[./\\]" "" t)
+                 "[/\\]" "." t))
 
     (vector (nnir-group-full-name group server)
            (if (string= server "nnmaildir:")