* 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.
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'.
(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)
"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))
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)
(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)
,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))