aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorBill Wohler2006-02-09 19:53:44 +0000
committerBill Wohler2006-02-09 19:53:44 +0000
commitda01a066b9a9f5a487ae4dc67767bef7b62346bc (patch)
tree25e11520dbbeb53ca09cca0b13fd7bfde457a8a8 /lisp
parentfcfc4732e0d93a6ad6ce11b79ddd372cf8ae738b (diff)
downloademacs-da01a066b9a9f5a487ae4dc67767bef7b62346bc.tar.gz
emacs-da01a066b9a9f5a487ae4dc67767bef7b62346bc.zip
(mh-folder-list): Don't replace "/*$" with "/" since that causes an
infinite loop on XEmacs.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mh-e/ChangeLog3
-rw-r--r--lisp/mh-e/mh-utils.el12
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index b89a4fc3d1f..19cffeabacb 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,5 +1,8 @@
12006-02-09 Bill Wohler <wohler@newt.com> 12006-02-09 Bill Wohler <wohler@newt.com>
2 2
3 * mh-utils.el (mh-folder-list): Don't replace "/*$" with "/" since
4 that causes an infinite loop on XEmacs.
5
3 * mh-compat.el(mh-replace-regexp-in-string): Add missing regexp 6 * mh-compat.el(mh-replace-regexp-in-string): Add missing regexp
4 argument. 7 argument.
5 8
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 42f11376262..dc86d19ae77 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -516,13 +516,15 @@ value of `mh-recursive-folders-flag'. If this flag is nil, and
516the sub-folders have not been explicitly viewed, then they will 516the sub-folders have not been explicitly viewed, then they will
517not be returned." 517not be returned."
518 (let ((folder-list)) 518 (let ((folder-list))
519 ;; Normalize folder. Strip leading +. Add trailing slash. If no 519 ;; Normalize folder. Strip leading +. Add trailing slash (done in
520 ;; folder is specified, ensure it is nil to ensure we get the 520 ;; two steps to avoid infinite loops when replacing "/*$" with "/"
521 ;; top-level folders; otherwise mh-sub-folders returns all the 521 ;; in XEmacs). If no folder is specified, ensure it is nil to
522 ;; files in / if given an empty string or +. 522 ;; ensure we get the top-level folders; otherwise mh-sub-folders
523 ;; returns all the files in / if given an empty string or +.
523 (when folder 524 (when folder
524 (setq folder (mh-replace-regexp-in-string "^\+" "" folder)) 525 (setq folder (mh-replace-regexp-in-string "^\+" "" folder))
525 (setq folder (mh-replace-regexp-in-string "/*$" "/" folder)) 526 (setq folder (mh-replace-regexp-in-string "/+$" "" folder))
527 (setq folder (concat folder "/"))
526 (if (equal folder "") 528 (if (equal folder "")
527 (setq folder nil))) 529 (setq folder nil)))
528 (loop for f in (mh-sub-folders folder) do 530 (loop for f in (mh-sub-folders folder) do