* wl-addrmgr.el (wl-addrmgr-replace-field): Use `point-at-bol'.
[elisp/wanderlust.git] / wl / wl-summary.el
index fd034bb..a11dd16 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."
@@ -1431,16 +1431,16 @@ This function is defined by `wl-summary-define-sort-command'." sort-by)
       (setq fields (cdr fields)))
     (setq candidates (elmo-uniq-list candidates))
     (elmo-with-enable-multibyte
-      (mapcar (function
-              (lambda (x)
-                (setq components (std11-extract-address-components x))
-                (cons (nth 1 components)
-                      (and (car components)
-                           (eword-decode-string
-                            (decode-mime-charset-string
-                             (car components)
-                             mime-charset))))))
-             candidates))))
+      (mapcar
+       (lambda (x)
+        (setq components (std11-extract-address-components x))
+        (cons (nth 1 components)
+              (and (car components)
+                   (eword-decode-string
+                    (decode-mime-charset-string
+                     (car components)
+                     mime-charset)))))
+       candidates))))
 
 (defun wl-summary-edit-addresses-subr (the-email name-in-addr)
   ;; returns nil if there's no change.
@@ -1509,7 +1509,7 @@ Optional argument ADDR-STR is used as a target address if specified."
                  (completing-read
                   (format "Target address (%s): " address)
                   (mapcar
-                   (function (lambda (x) (cons (car x) (car x))))
+                   (lambda (x) (cons (car x) (car x)))
                    candidates)
                   nil nil nil nil address))))
        (when address
@@ -1627,12 +1627,12 @@ If ARG is non-nil, checking is omitted."
   (narrow-to-region
    (save-excursion
      (goto-char beg)
-     (beginning-of-line)
-     (point))
+     (point-at-bol))
    (save-excursion
      (goto-char end)
-     (if (eq (current-column) 0) (beginning-of-line) (end-of-line))
-     (point))))
+     (if (= (current-column) 0)
+        (point-at-bol)
+       (point-at-eol)))))
 
 (defun wl-summary-prefetch-region-no-mark (beg end &optional prefetch-marks)
   (interactive "r")
@@ -2127,7 +2127,7 @@ This function is defined for `window-scroll-functions'"
   (when number
     (let ((pos (point))
          regexp)
-      (setq regexp (concat "\r" (int-to-string number) "[^0-9]"))
+      (setq regexp (concat "\r" (number-to-string number) "[^0-9]"))
       (if (and beg end (or (< pos beg) (< end pos)))
          (progn
            (goto-char beg)
@@ -2588,8 +2588,7 @@ If ARG, without confirm."
   (if wl-use-highlight-mouse-line
       ;; remove 'mouse-face of current line.
       (put-text-property
-       (save-excursion (beginning-of-line)(point))
-       (save-excursion (end-of-line)(point))
+       (point-at-bol) (point-at-eol)
        'mouse-face nil))
   (insert line "\n")
   (save-excursion
@@ -2601,8 +2600,7 @@ If ARG, without confirm."
   (if wl-use-highlight-mouse-line
       ;; remove 'mouse-face of current line.
       (put-text-property
-       (save-excursion (beginning-of-line)(point))
-       (save-excursion (end-of-line)(point))
+       (point-at-bol) (point-at-eol)
        'mouse-face nil))
   (elmo-progress-notify 'wl-summary-insert-line)
   (ignore-errors
@@ -2681,10 +2679,9 @@ If ARG, without confirm."
          (message "Creating subject cache...")
          (wl-summary-insert-headers
           folder
-          (function
-           (lambda (x)
-             (funcall wl-summary-subject-filter-function
-                      (elmo-message-entity-field x 'subject)))))
+          (lambda (x)
+            (funcall wl-summary-subject-filter-function
+                     (elmo-message-entity-field x 'subject))))
          (message "Creating subject cache...done"))
        (setq match (funcall wl-summary-subject-filter-function
                             (elmo-message-entity-field entity 'subject)))
@@ -3753,7 +3750,7 @@ Return non-nil if the mark is updated"
     (setq range
          (completing-read (format "Range (%s): " default)
                           (mapcar
-                           (function (lambda (x) (cons x x)))
+                           (lambda (x) (cons x x))
                            input-range-list)))
     (if (string= range "")
        default
@@ -4779,7 +4776,7 @@ If ARG is numeric number, decode message as following:
     (if num
        (save-excursion
          (setq filename (expand-file-name
-                         (concat (int-to-string num)
+                         (concat (number-to-string num)
                                  wl-summary-save-file-suffix)
                          wl-save-dir))
          (when (or (null arg)