diff lisp/mh-e/mh-letter.el @ 70214:da7bc97733d6

(mh-folder-expand-at-point): Fix folder completion. Folders returned by mh-folder-completion-function no longer need adornment (closes SF #1476270).
author Bill Wohler <wohler@newt.com>
date Tue, 25 Apr 2006 21:41:13 +0000
parents 10be49d855c4
children e3694f1cb928
line wrap: on
line diff
--- a/lisp/mh-e/mh-letter.el	Tue Apr 25 08:18:01 2006 +0000
+++ b/lisp/mh-e/mh-letter.el	Tue Apr 25 21:41:13 2006 +0000
@@ -866,15 +866,12 @@
   "Do folder name completion in Fcc header field."
   (let* ((end (point))
          (beg (mh-beginning-of-word))
-         (folder (buffer-substring beg end))
+         (folder (buffer-substring-no-properties beg end))
          (leading-plus (and (> (length folder) 0) (equal (aref folder 0) ?+)))
-         (last-slash (mh-search-from-end ?/ folder))
-         (prefix (and last-slash (substring folder 0 last-slash)))
-         (choices (mapcar #'(lambda (x)
-                              (list (cond (prefix (format "%s/%s" prefix x))
-                                          (leading-plus (format "+%s" x))
-                                          (t x))))
+         (choices (mapcar (lambda (x) (list x))
                           (mh-folder-completion-function folder nil t))))
+    (unless leading-plus
+      (setq folder (concat "+" folder)))
     (mh-complete-word folder choices beg end)))
 
 ;;;###mh-autoload