* wl-summary.el (wl-summary-update-mark-and-highlight-window):
authoryoichi <yoichi>
Sat, 19 Jun 2004 09:40:52 +0000 (09:40 +0000)
committeryoichi <yoichi>
Sat, 19 Jun 2004 09:40:52 +0000 (09:40 +0000)
Respect value of `wl-summary-highlight'.

* wl.el (wl-save-status): Remove unused variable.

* wl-folder.el (wl-folder-save-and-exec-marks): New function.
(wl-folder-mode-map): Bind it to "x".

wl/ChangeLog
wl/wl-address.el
wl/wl-folder.el
wl/wl-summary.el
wl/wl.el

index 62feb08..0caff63 100644 (file)
@@ -1,3 +1,13 @@
+2004-06-19  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-summary.el (wl-summary-update-mark-and-highlight-window):
+       Respect value of `wl-summary-highlight'.
+
+       * wl.el (wl-save-status): Remove unused variable.
+
+       * wl-folder.el (wl-folder-save-and-exec-marks): New function.
+       (wl-folder-mode-map): Bind it to "x".
+
 2004-06-18  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-summary.el (wl-summary-sync-update): Utilize lazy-highlight.
index 439b737..6026ad6 100644 (file)
@@ -87,7 +87,7 @@ If level 3 is required for uniqness with other candidates,
 (defconst wl-ldap-alias-sep "/")
 
 (defconst wl-ldap-search-attribute-type-list
-  '("sn" "cn" "mail" "email"))
+  '("sn" "cn" "mail" "email" "displayName" "gecos"))
 
 (defun wl-ldap-get-value (type entry)
   ""
@@ -207,7 +207,7 @@ Matched address lists are append to CL."
        (ldap-default-base (or wl-ldap-base ldap-default-base))
        (dnhash (elmo-make-hash))
        cache len sym tmpl regexp entries ent values dn dnstr alias
-       result cn mails)
+       result fullname mails)
     ;; check cache
     (mapatoms (lambda (atom)
                (if (and (string-match
@@ -244,7 +244,9 @@ Matched address lists are append to CL."
                    ent)
            mails (or (wl-ldap-get-value-list "mail" ent)
                      (wl-ldap-get-value-list "email" ent))
-           cn (wl-ldap-get-value "cn" ent)
+           fullname (or (wl-ldap-get-value "displayName" ent)
+                        (wl-ldap-get-value "gecos" ent)
+                        (wl-ldap-get-value "cn" ent))
            dn (car (car entries))
            dnstr (elmo-get-hash-val (upcase dn) dnhash))
       ;; make alias list generated from LDAP data.
@@ -259,7 +261,7 @@ Matched address lists are append to CL."
        (when (not (boundp sym))
          (set sym alias)
          (setq result (cons (cons alias
-                                  (concat cn " <" (car mails) ">"))
+                                  (concat fullname " <" (car mails) ">"))
                             result)))
        (setq values (cdr values)))
       ;; make mail addrses list
@@ -268,7 +270,7 @@ Matched address lists are append to CL."
            ;; (string-match regexp (car mails))
            ;; add mail address itself to completion list
            (setq result (cons (cons (car mails)
-                                    (concat cn " <" (car mails) ">"))
+                                    (concat fullname " <" (car mails) ">"))
                               result)))
        (setq mails (cdr mails)))
       (setq entries (cdr entries)))
index 3c2f6b6..2a16631 100644 (file)
   (define-key wl-folder-mode-map "?"    'wl-folder-pick)
   (define-key wl-folder-mode-map "q"    'wl-exit)
   (define-key wl-folder-mode-map "z"    'wl-folder-suspend)
+  (define-key wl-folder-mode-map "x"    'wl-folder-save-and-exec-marks)
   (define-key wl-folder-mode-map "\M-t" 'wl-toggle-plugged)
   (define-key wl-folder-mode-map "\C-t" 'wl-plugged-change)
   (define-key wl-folder-mode-map "<"    'beginning-of-buffer)
@@ -2287,6 +2288,10 @@ Use `wl-subscribed-mailing-list'."
                                  (wl-folder-get-elmo-folder fld-name))
                                 nil sticky t)))
 
+(defun wl-folder-save-and-exec-marks ()
+  (interactive)
+  (wl-save 'exec-marks))
+
 (defun wl-folder-suspend ()
   (interactive)
   (run-hooks 'wl-folder-suspend-hook)
index c3b5408..6db22c0 100644 (file)
@@ -586,8 +586,7 @@ See also variable `wl-use-petname'."
            (end (condition-case nil
                     (window-end win t) ; old emacsen doesn't support 2nd arg.
                   (error (window-end win))))
-           number flags
-           wl-summary-highlight)
+           number flags)
        (save-excursion
          (goto-char beg)
          (while (and (< (point) end) (not (eobp)))
@@ -595,10 +594,10 @@ See also variable `wl-use-petname'."
              (setq number (wl-summary-message-number)
                    flags (elmo-message-flags wl-summary-buffer-elmo-folder
                                              number))
-             (setq wl-summary-highlight nil)
-             (wl-summary-update-persistent-mark number flags)
-             (setq wl-summary-highlight t)
-             (wl-highlight-summary-current-line number flags))
+             (let (wl-summary-highlight)
+               (wl-summary-update-persistent-mark number flags))
+             (if wl-summary-highlight
+                 (wl-highlight-summary-current-line number flags)))
            (forward-line 1)))))
     (set-buffer-modified-p nil)))
 
index 42665e3..1cc8a26 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -634,18 +634,17 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
 
 (defun wl-save-status (&optional keep-summary leave-marks)
   (message "Saving summary and folder status...")
-  (let (summary-buf)
-    (save-excursion
-      (let ((summaries (wl-collect-summary)))
-       (while summaries
-         (with-current-buffer (car summaries)
-           (unless leave-marks
-             (wl-summary-cleanup-temp-marks keep-summary))
-           (wl-summary-save-view)
-           (elmo-folder-commit wl-summary-buffer-elmo-folder)
-           (unless keep-summary
-             (kill-buffer (car summaries))))
-         (setq summaries (cdr summaries))))))
+  (save-excursion
+    (let ((summaries (wl-collect-summary)))
+      (while summaries
+       (with-current-buffer (car summaries)
+         (unless leave-marks
+           (wl-summary-cleanup-temp-marks keep-summary))
+         (wl-summary-save-view)
+         (elmo-folder-commit wl-summary-buffer-elmo-folder)
+         (unless keep-summary
+           (kill-buffer (car summaries))))
+       (setq summaries (cdr summaries)))))
   (wl-refile-alist-save)
   (wl-folder-info-save)
   (and (featurep 'wl-fldmgr) (wl-fldmgr-exit))