From c47cd4adf92ff49a3a4df31f165a1884077a8e87 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Mon, 21 Apr 2008 16:33:54 +0000 Subject: [PATCH] (nnir-compose-result): Use `gnus-replace-in-string' instead of `substitute' to avoid using cl at runtime. --- contrib/ChangeLog | 5 +++++ contrib/nnir.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 0473e3146..44ccc3e17 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,8 @@ +2008-04-21 Justus Piater + + * nnir.el (nnir-compose-result): Use `gnus-replace-in-string' instead + of `substitute' to avoid using cl at runtime. + 2008-04-19 Reiner Steib * nnir.el: Don't require edmacro anymore. Remove bogus Emacs 19 diff --git a/contrib/nnir.el b/contrib/nnir.el index 1751dfc08..f090a3e99 100644 --- a/contrib/nnir.el +++ b/contrib/nnir.el @@ -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:") -- 2.25.1