* wl-folder.el (wl-folder-get-entity-from-buffer): Macro to function.
authorkaoru <kaoru>
Sat, 2 Jan 2010 12:03:42 +0000 (12:03 +0000)
committerkaoru <kaoru>
Sat, 2 Jan 2010 12:03:42 +0000 (12:03 +0000)
* wl-util.el (wl-match-string, wl-match-buffer):  Macro to function.
* wl-summary.el (wl-summary-message-status): Macro to inline-function.
* wl.el (wl-plugged-string): Macro to function.

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

index 0dc565b..0f907f9 100644 (file)
@@ -8,6 +8,11 @@
        inline-function.
        * wl-folder.el (wl-folder-unread-regex, wl-folder-buffer-group-p):
        Macro to function.
+       (wl-folder-get-entity-from-buffer): Macro to function.
+       * wl-util.el (wl-match-string, wl-match-buffer):  Macro to function.
+       * wl-summary.el (wl-summary-message-status): Macro to inline-function.
+       * wl.el (wl-plugged-string): 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):
index 5912b89..ddce576 100644 (file)
 (defmacro wl-folder-get-entity-id (entity)
   `(get-text-property 0 'wl-folder-entity-id ,entity))
 
-(defmacro wl-folder-get-entity-from-buffer (&optional getid)
-  `(let ((id (get-text-property (point)
-                               'wl-folder-entity-id)))
-     (if ,getid
-        id
-       (wl-folder-get-folder-name-by-id id))))
+(defun wl-folder-get-entity-from-buffer (&optional getid)
+  (let ((id (get-text-property (point)
+                              'wl-folder-entity-id)))
+    (if getid
+       id
+      (wl-folder-get-folder-name-by-id id))))
 
 (defmacro wl-folder-entity-exists-p (entity &optional hashtb)
   `(let ((sym (intern-soft ,entity (or ,hashtb wl-folder-entity-hashtb))))
index fd034bb..5c89489 100644 (file)
@@ -605,9 +605,9 @@ See also variable `wl-use-petname'."
       (setq wl-summary-buffer-message-ring
            (cdr wl-summary-buffer-message-ring)))))
 
-(defmacro wl-summary-message-status (&optional number)
-  `(elmo-message-status wl-summary-buffer-elmo-folder
-                       (or ,number (wl-summary-message-number))))
+(defsubst wl-summary-message-status (&optional number)
+  (elmo-message-status wl-summary-buffer-elmo-folder
+                      (or number (wl-summary-message-number))))
 
 (defun wl-summary-update-mark-and-highlight-window (&optional win beg)
   "A function to be called as window-scroll-functions."
index d87afc4..5267d84 100644 (file)
@@ -241,14 +241,14 @@ even when invalid character is contained."
        (setq alist (cdr alist)))
       value)))
 
-(defmacro wl-match-string (pos string)
+(defun wl-match-string (pos string)
   "Substring POSth matched STRING."
-  `(substring ,string (match-beginning ,pos) (match-end ,pos)))
+  (substring string (match-beginning pos) (match-end pos)))
 
-(defmacro wl-match-buffer (pos)
+(defun wl-match-buffer (pos)
   "Substring POSth matched from the current buffer."
-  `(buffer-substring-no-properties
-    (match-beginning ,pos) (match-end ,pos)))
+  (buffer-substring-no-properties
+   (match-beginning pos) (match-end pos)))
 
 (put 'wl-as-coding-system 'lisp-indent-function 1)
 (put 'wl-as-mime-charset 'lisp-indent-function 1)
index a25bce4..250c80c 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -215,11 +215,12 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
   (setq buffer-read-only t)
   (run-hooks 'wl-plugged-mode-hook))
 
-(defmacro wl-plugged-string (plugged &optional time)
-  `(if ,time wl-plugged-auto-off
-     (if ,plugged
-        wl-plugged-plug-on
-       wl-plugged-plug-off)))
+(defun wl-plugged-string (plugged &optional time)
+  (if time
+      wl-plugged-auto-off
+    (if plugged
+       wl-plugged-plug-on
+      wl-plugged-plug-off)))
 
 (defun wl-plugged-server-indent ()
   (make-string wl-plugged-server-indent (string-to-char " ")))