* wl-expire.el (wl-expire-make-sortable-date): Macro to inline-function.
authorkaoru <kaoru>
Sat, 2 Jan 2010 08:13:35 +0000 (08:13 +0000)
committerkaoru <kaoru>
Sat, 2 Jan 2010 08:13:35 +0000 (08:13 +0000)
* wl-folder.el (wl-folder-unread-regex, wl-folder-buffer-group-p): Macro to function.
* wl-highlight.el (wl-delete-all-overlays):  Macro to function.
* wl-summary.el (wl-summary-get-alike): Macro to inline-function.
(wl-summary-buffer-folder-name, wl-summary-sticky-buffer-name): Macro to function.

wl/ChangeLog
wl/wl-expire.el
wl/wl-folder.el
wl/wl-highlight.el
wl/wl-summary.el

index 4da3987..df0377b 100644 (file)
@@ -1,5 +1,14 @@
 2010-01-02  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
+       * wl-expire.el (wl-expire-make-sortable-date): Macro to
+       inline-function.
+       * wl-folder.el (wl-folder-unread-regex, wl-folder-buffer-group-p):
+       Macro to function.
+       * wl-highlight.el (wl-delete-all-overlays):  Macro to function.
+       * wl-summary.el (wl-summary-get-alike): Macro to inline-function.
+       (wl-summary-buffer-folder-name, wl-summary-sticky-buffer-name):
+       Macro to function.
+
        * wl-thread.el (wl-thread-open, wl-thread-close): Use
        `point-at-bol', `point-at-eol'.
 
index 13bd2f0..031ab8a 100644 (file)
        (t
         (error "Invalid marks: %s" wl-summary-expire-reserve-marks))))
 
-(defmacro wl-expire-make-sortable-date (date)
-  `(timezone-make-sortable-date
-    (aref ,date 0) (aref ,date 1) (aref ,date 2)
-    (timezone-make-time-string
-     (aref ,date 3) (aref ,date 4) (aref ,date 5))))
+(defsubst wl-expire-make-sortable-date (date)
+  (timezone-make-sortable-date
+   (aref date 0) (aref date 1) (aref date 2)
+   (timezone-make-time-string
+    (aref date 3) (aref date 4) (aref date 5))))
 
 ;; New functions to avoid accessing to the msgdb directly.
 (defsubst wl-expire-message-p (folder number)
index 7edd76c..5912b89 100644 (file)
    "Menu used in Folder mode."
    wl-folder-mode-menu-spec))
 
-(defmacro wl-folder-unread-regex (group)
-  `(concat "^[ ]*.+:[0-9\\*-]+/[^0\\*][0-9]*/[0-9\\*-]+$"
-          (if ,group
-              "\\|^[ ]*\\[[+-]\\]"
-            "")))
-
-(defmacro wl-folder-buffer-group-p ()
-  '(get-text-property (point) 'wl-folder-is-group))
+(defun wl-folder-unread-regex (group)
+  (concat "^[ ]*.+:[0-9\\*-]+/[^0\\*][0-9]*/[0-9\\*-]+$"
+         (if group
+             "\\|^[ ]*\\[[+-]\\]"
+           "")))
+
+(defun wl-folder-buffer-group-p ()
+  (get-text-property (point) 'wl-folder-is-group))
 
 (defun wl-folder-buffer-search-group (group)
   (let ((prev-point (point))
index 0476c58..c2fd339 100644 (file)
     wl-highlight-message-cited-text-9
     wl-highlight-message-cited-text-10))
 
-(defmacro wl-delete-all-overlays ()
+(defun wl-delete-all-overlays ()
   "Delete all momentary overlays."
-  '(let ((overlays (overlays-in (point-min) (point-max)))
-        overlay)
-     (while (setq overlay (car overlays))
-       (if (overlay-get overlay 'wl-momentary-overlay)
-          (delete-overlay overlay))
-       (setq overlays (cdr overlays)))))
+  (let ((overlays (overlays-in (point-min) (point-max)))
+       overlay)
+    (while (setq overlay (car overlays))
+      (if (overlay-get overlay 'wl-momentary-overlay)
+         (delete-overlay overlay))
+      (setq overlays (cdr overlays)))))
 
 (defun wl-highlight-summary-displaying ()
   (interactive)
index 8dceb86..fd034bb 100644 (file)
@@ -69,9 +69,9 @@
 
 (defvar wl-summary-buffer-elmo-folder nil)
 
-(defmacro wl-summary-buffer-folder-name ()
-  `(and wl-summary-buffer-elmo-folder
-       (elmo-folder-name-internal wl-summary-buffer-elmo-folder)))
+(defun wl-summary-buffer-folder-name ()
+  (and wl-summary-buffer-elmo-folder
+       (elmo-folder-name-internal wl-summary-buffer-elmo-folder)))
 
 (defvar wl-summary-buffer-disp-msg    nil)
 (defvar wl-summary-buffer-disp-folder nil)
 (defvar wl-temp-mark)
 (defvar wl-persistent-mark)
 
-(defmacro wl-summary-sticky-buffer-name (name)
-  `(concat wl-summary-buffer-name ":" ,name))
+(defun wl-summary-sticky-buffer-name (name)
+  (concat wl-summary-buffer-name ":" name))
 
 (defun wl-summary-default-subject (subject-string)
   (if (string-match "^[ \t]*\\[[^:]+[,: ][0-9]+\\][ \t]*" subject-string)
@@ -2636,9 +2636,9 @@ If ARG, without confirm."
                      ,alike
                      wl-summary-alike-hashtb))
 
-(defmacro wl-summary-get-alike ()
-  `(elmo-get-hash-val (format "#%d" (wl-count-lines))
-                     wl-summary-alike-hashtb))
+(defsubst wl-summary-get-alike ()
+  (elmo-get-hash-val (format "#%d" (wl-count-lines))
+                    wl-summary-alike-hashtb))
 
 (defun wl-summary-insert-headers (folder func &optional mime-decode)
   (let ((numbers (elmo-folder-list-messages folder 'visible t))