From: kaoru Date: Sat, 2 Jan 2010 08:13:35 +0000 (+0000) Subject: * wl-expire.el (wl-expire-make-sortable-date): Macro to inline-function. X-Git-Tag: elmo-imap4-compliance-root~49 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3b08e7abf8b5157f72ba891ff17e64dac4499e49;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 4da3987..df0377b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,14 @@ 2010-01-02 TAKAHASHI Kaoru + * 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'. diff --git a/wl/wl-expire.el b/wl/wl-expire.el index 13bd2f0..031ab8a 100644 --- a/wl/wl-expire.el +++ b/wl/wl-expire.el @@ -72,11 +72,11 @@ (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) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 7edd76c..5912b89 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -224,14 +224,14 @@ "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)) diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 0476c58..c2fd339 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -811,14 +811,14 @@ 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) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 8dceb86..fd034bb 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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) @@ -197,8 +197,8 @@ (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))