]> git.eshelyaron.com Git - emacs.git/commitdiff
(mh-folder-list): Don't replace "/*$" with "/" since that causes an
authorBill Wohler <wohler@newt.com>
Thu, 9 Feb 2006 19:53:44 +0000 (19:53 +0000)
committerBill Wohler <wohler@newt.com>
Thu, 9 Feb 2006 19:53:44 +0000 (19:53 +0000)
infinite loop on XEmacs.

lisp/mh-e/ChangeLog
lisp/mh-e/mh-utils.el

index b89a4fc3d1f1ddc152149cbb7ce98eaff89874c6..19cffeabacb03cf3e3684b44a06152eba72aa786 100644 (file)
@@ -1,5 +1,8 @@
 2006-02-09  Bill Wohler  <wohler@newt.com>
 
+       * mh-utils.el (mh-folder-list): Don't replace "/*$" with "/" since
+       that causes an infinite loop on XEmacs.
+
        * mh-compat.el(mh-replace-regexp-in-string): Add missing regexp
        argument.
 
index 42f113762620df2b0f382d1705a70e5a4ebdd32b..dc86d19ae77ad105475d864349a01582c76e6a75 100644 (file)
@@ -516,13 +516,15 @@ value of `mh-recursive-folders-flag'. If this flag is nil, and
 the sub-folders have not been explicitly viewed, then they will
 not be returned."
   (let ((folder-list))
-    ;; Normalize folder. Strip leading +. Add trailing slash. If no
-    ;; folder is specified, ensure it is nil to ensure we get the
-    ;; top-level folders; otherwise mh-sub-folders returns all the
-    ;; files in / if given an empty string or +.
+    ;; Normalize folder. Strip leading +. Add trailing slash (done in
+    ;; two steps to avoid infinite loops when replacing "/*$" with "/"
+    ;; in XEmacs). If no folder is specified, ensure it is nil to
+    ;; ensure we get the top-level folders; otherwise mh-sub-folders
+    ;; returns all the files in / if given an empty string or +.
     (when folder
       (setq folder (mh-replace-regexp-in-string "^\+" "" folder))
-      (setq folder (mh-replace-regexp-in-string "/*$" "/" folder))
+      (setq folder (mh-replace-regexp-in-string "/+$" "" folder))
+      (setq folder (concat folder "/"))
       (if (equal folder "")
         (setq folder nil)))
     (loop for f in (mh-sub-folders folder) do