summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wl64
1 files changed, 42 insertions, 22 deletions
diff --git a/wl b/wl
index 49a001f..8db1e06 100644
--- a/wl
+++ b/wl
@@ -1,4 +1,5 @@
(setq frame-title-format '("" "Wanderlust"))
+(setq icon-title-format '("" "Wanderlust"))
(setq elmo-imap4-default-server "mail.universe-factory.net"
elmo-imap4-default-user "mschiffer@universe-factory.net"
@@ -32,46 +33,65 @@
(setq elmo-folder-update-threshold nil)
+(column-number-mode t)
+(show-paren-mode t)
+
(defadvice wl-summary-mode (after wl-summary-mode-nobidi)
(setq bidi-display-reordering nil))
(ad-activate 'wl-summary-mode)
-;; (defun wl-summary-update-persistent-mark (number)
-;; (wl-summary-rescan-message number)
-;; t)
-;; (defun wl-summary-persistent-mark-invalid-p () t)
+(defun extended-persistent-mark-string (status)
+ (let ((flags (elmo-message-status-flags status))
+ (cached (elmo-message-status-cached-p status)))
+ (concat
+ (cond ((memq 'killed flags) "X")
+ ((memq 'flag flags) "$")
+ ((memq 'new flags) "N")
+ ((memq 'unread flags) "u")
+ (t " "))
+ (if (memq 'answered flags) wl-summary-answered-cached-mark " ")
+ (if (memq 'forwarded flags) "f" " "))))
+(defun extended-persistent-mark ()
+ (extended-persistent-mark-string wl-status))
-;; (defun extended-persistent-mark ()
-;; (let ((flags (elmo-message-status-flags wl-status))
-;; (cached (elmo-message-status-cached-p wl-status)))
-;; (concat
-;; (cond ((memq 'killed flags) "X")
-;; ((memq 'flag flags) "$")
-;; ((memq 'new flags) "N")
-;; ((memq 'unread flags) "u")
-;; (t " "))
-;; (if (memq 'answered flags) wl-summary-answered-cached-mark " ")
-;; (if (memq 'forwarded flags) "f" " "))))
-(defun extended-persistent-mark () (or wl-persistent-mark " "))
-;;(defun extended-persistent-mark () " ")
+(defun wl-summary-update-persistent-mark (&optional number)
+ "Synch up persistent mark of current line with msgdb's.
+Return non-nil if the mark is updated"
+ (interactive)
+ (let ((status (wl-summary-message-status number)))
+ (prog1
+ (save-excursion
+ (move-to-column 9)
+ (let ((inhibit-read-only t)
+ (buffer-read-only nil)
+ (mark (buffer-substring (- (point) 3) (point)))
+ (new-mark (extended-persistent-mark-string status)))
+ (prog1
+ (unless (string= new-mark mark)
+ (delete-char -3)
+ (insert new-mark)
+ (wl-summary-set-message-modified)
+ t)
+ (wl-summary-validate-persistent-mark (point-at-bol)
+ (point-at-eol)))))
+ (when wl-summary-highlight
+ (wl-highlight-summary-current-line number status))
+ (set-buffer-modified-p nil))))
(add-to-list 'wl-summary-line-format-spec-alist '(?X (extended-persistent-mark)))
(setq wl-summary-line-format "%n%T%X %Y/%M/%D (%W) %h:%m %t%[%25(%c %f%) %] %s")
-(defadvice wl-message-buffer-display (before wl-message-buffer-display-unread)
+(defadvice wl-message-buffer-display (before wl-message-buffer-display-unread activate)
(setq unread t))
-(ad-activate 'wl-message-buffer-display)
-
(defadvice elmo-folder-unset-flag (before elmo-folder-unset-flag-nounread (folder numbers flag
&optional is-local))
(when (eq flag 'unread) (setq flag 'new)))
-(defadvice wl-summary-redisplay-internal (around wl-summary-redisplay-internal-unread)
+(defadvice wl-summary-redisplay-internal (around wl-summary-redisplay-internal-unread activate)
(unwind-protect
(progn
(ad-activate 'elmo-folder-unset-flag)
ad-do-it)
(ad-deactivate 'elmo-folder-unset-flag)))
-(ad-activate 'wl-summary-redisplay-internal)