changeset 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 e9ea7c53ddc7
children 90d76f24753a
files lisp/mh-e/ChangeLog lisp/mh-e/mh-letter.el
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Tue Apr 25 08:18:01 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Tue Apr 25 21:41:13 2006 +0000
@@ -1,3 +1,9 @@
+2006-04-25  Bill Wohler  <wohler@newt.com>
+
+	* mh-letter.el (mh-folder-expand-at-point): Fix folder completion.
+	Folders returned by mh-folder-completion-function no longer need
+	adornment (closes SF #1476270).
+
 2006-04-21  Bill Wohler  <wohler@newt.com>
 
 	* mh-e.el (Version, mh-version): Add +cvs to version.
--- 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