summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMike Kupfer <mkupfer@alum.berkeley.edu>2021-11-15 22:03:54 -0800
committerStephen Gildea <stepheng+emacs@gildea.com>2021-11-15 22:03:54 -0800
commitd89d5e0f9466b9823fe31d02a374d654163594e4 (patch)
tree6d012f22b9c0b4ef20e24f2a215401609e6e3116 /lisp
parentcb0aa89bcfb801ec2737e9b1a534bb87d3363dd9 (diff)
downloademacs-d89d5e0f9466b9823fe31d02a374d654163594e4.tar.gz
emacs-d89d5e0f9466b9823fe31d02a374d654163594e4.tar.bz2
emacs-d89d5e0f9466b9823fe31d02a374d654163594e4.zip
Fix handling of folder "+/" in MH-E
* lisp/mh-e/mh-utils.el (mh-sub-folders): Fix handling of "+/". * test/lisp/mh-e/mh-utils-tests.el (mh-folder-completion-function-08-plus-slash) (mh-folder-completion-function-09-plus-slash-tmp): Fix errors made importing tests from mh-unit.el; remove declaration that these tests are expected to fail.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mh-e/mh-utils.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index feebf6416fe..1c322b80340 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -531,7 +531,12 @@ results of the actual folders call.
If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a
slash is added to each of the sub-folder names that may have
nested folders within them."
- (let* ((folder (mh-normalize-folder-name folder nil nil t))
+ ;; In most cases we want to remove a trailing slash. We keep the
+ ;; slash for "+/", because it refers to folders in the system root
+ ;; directory, whereas "+" refers to the user's top-level folders.
+ (let* ((folder (mh-normalize-folder-name folder nil
+ (string= folder "+/")
+ t))
(match (gethash folder mh-sub-folders-cache 'no-result))
(sub-folders (cond ((eq match 'no-result)
(setf (gethash folder mh-sub-folders-cache)