From a239186ddb65a69cbcc0d8fbd3f1be932f201fdb Mon Sep 17 00:00:00 2001 From: kaoru Date: Thu, 26 Aug 2010 13:19:21 +0000 Subject: [PATCH] * wl-e21.el (wl-draft-insert-signature): Fix comment style. (wl-highlight-folder-current-line): Ditto. * wl-xmas.el (wl-draft-insert-signature): Ditto. (wl-highlight-folder-current-line): Ditto. --- wl/ChangeLog | 7 +++++++ wl/wl-e21.el | 50 +++++++++++++++++++++++++++----------------------- wl/wl-xmas.el | 29 ++++++++++++++++------------- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 0121fb1..a9460c8 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2010-08-26 TAKAHASHI Kaoru + + * wl-e21.el (wl-draft-insert-signature): Fix comment style. + (wl-highlight-folder-current-line): Ditto. + * wl-xmas.el (wl-draft-insert-signature): Ditto. + (wl-highlight-folder-current-line): Ditto. + 2010-08-24 TAKAHASHI Kaoru * wl-address.el (wl-address-make-alist-from-alias-file): Use diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 05e49ba..89bdaa7 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -153,7 +153,7 @@ ) "The Message buffer toolbar.") -(defalias 'wl-draft-insert-signature 'insert-signature);; for draft toolbar. +(defalias 'wl-draft-insert-signature 'insert-signature) ; for draft toolbar. (defvar wl-draft-toolbar '([wl-draft-send-from-toolbar @@ -318,8 +318,8 @@ (beginning-of-line) (let (fld-name start end) (cond - (;; opened folder group - (and (wl-folder-buffer-group-p) + ;; opened folder group + ((and (wl-folder-buffer-group-p) (looking-at wl-highlight-folder-opened-regexp)) (setq start (match-beginning 1) end (match-end 1)) @@ -329,8 +329,8 @@ (wl-e21-highlight-folder-by-numbers start end 'wl-highlight-folder-opened-face numbers)) - (;; closed folder group - (and (wl-folder-buffer-group-p) + ;; closed folder group + ((and (wl-folder-buffer-group-p) (looking-at wl-highlight-folder-closed-regexp)) (setq start (match-beginning 1) end (match-end 1)) @@ -340,8 +340,8 @@ (wl-e21-highlight-folder-by-numbers start end 'wl-highlight-folder-closed-face numbers)) - (;; basic folder - (and (setq fld-name (wl-folder-get-folder-name-by-id + ;; basic folder + ((and (setq fld-name (wl-folder-get-folder-name-by-id (get-text-property (point) 'wl-folder-entity-id))) (looking-at "[[:blank:]]+\\([^[:blank:]\n]+\\)")) (setq start (match-beginning 1) @@ -360,22 +360,26 @@ (unless (get (caar wl-folder-internal-icon-list) 'image) (wl-folder-init-icons)) (setq image - (cond ((string= fld-name wl-trash-folder);; trash folder - (let ((num (nth 2 numbers)));; number of messages - (get (if (or (not num) (zerop num)) - 'wl-folder-trash-empty-image - 'wl-folder-trash-image) - 'image))) - ((string= fld-name wl-draft-folder);; draft folder - (get 'wl-folder-draft-image 'image)) - ((string= fld-name wl-queue-folder);; queue folder - (get 'wl-folder-queue-image 'image)) - (;; and one of many other folders - (setq type (or (elmo-folder-type fld-name) - (elmo-folder-type-internal - (elmo-make-folder fld-name)))) - (get (intern (format "wl-folder-%s-image" type)) - 'image))))) + (cond + ;; trash folder + ((string= fld-name wl-trash-folder) + (let ((num (nth 2 numbers))) ; number of messages + (get (if (or (not num) (zerop num)) + 'wl-folder-trash-empty-image + 'wl-folder-trash-image) + 'image))) + ;; draft folder + ((string= fld-name wl-draft-folder) + (get 'wl-folder-draft-image 'image)) + ;; queue folder + ((string= fld-name wl-queue-folder) + (get 'wl-folder-queue-image 'image)) + ;; and one of many other folders + ((setq type (or (elmo-folder-type fld-name) + (elmo-folder-type-internal + (elmo-make-folder fld-name)))) + (get (intern (format "wl-folder-%s-image" type)) + 'image))))) (overlay-put overlay 'before-string (propertize " " 'display image 'invisible t)))) diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index 3e62300..8bd5086 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -123,7 +123,7 @@ ) "The Message buffer toolbar.") -(defalias 'wl-draft-insert-signature 'insert-signature);; for draft toolbar. +(defalias 'wl-draft-insert-signature 'insert-signature) ; for draft toolbar. (defvar wl-draft-toolbar '([wl-draft-send-from-toolbar @@ -252,20 +252,20 @@ (beginning-of-line) (let (fld-name) (cond - (;; opened folder group - (and (wl-folder-buffer-group-p) + ;; opened folder group + ((and (wl-folder-buffer-group-p) (looking-at wl-highlight-folder-opened-regexp)) (wl-xmas-highlight-folder-group-line 'wl-folder-opened-glyph 'wl-highlight-folder-opened-face numbers)) - (;; closed folder group - (and (wl-folder-buffer-group-p) + ;; closed folder group + ((and (wl-folder-buffer-group-p) (looking-at wl-highlight-folder-closed-regexp)) (wl-xmas-highlight-folder-group-line 'wl-folder-closed-glyph 'wl-highlight-folder-closed-face numbers)) - (;; basic folder - (and (setq fld-name (wl-folder-get-folder-name-by-id + ;; basic folder + ((and (setq fld-name (wl-folder-get-folder-name-by-id (get-text-property (point) 'wl-folder-entity-id))) (looking-at "[ \t]+\\([^ \t]+\\)")) (let ((start (match-beginning 1))) @@ -280,18 +280,21 @@ (set-extent-begin-glyph extent (cond - ((string= fld-name wl-trash-folder);; trash folder - (let ((num (nth 2 numbers)));; number of messages + ;; trash folder + ((string= fld-name wl-trash-folder) + (let ((num (nth 2 numbers))) ; number of messages (get (if (or (not num) (zerop num)) 'wl-folder-trash-empty-glyph 'wl-folder-trash-glyph) 'glyph))) - ((string= fld-name wl-draft-folder);; draft folder + ;; draft folder + ((string= fld-name wl-draft-folder) (get 'wl-folder-draft-glyph 'glyph)) - ((string= fld-name wl-queue-folder);; queue folder + ;; queue folder + ((string= fld-name wl-queue-folder) (get 'wl-folder-queue-glyph 'glyph)) - (;; and one of many other folders - (setq type (or (elmo-folder-type fld-name) + ;; and one of many other folders + ((setq type (or (elmo-folder-type fld-name) (elmo-folder-type-internal (elmo-make-folder fld-name)))) (get (intern (format "wl-folder-%s-glyph" type)) 'glyph)))))) -- 1.7.10.4