(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)
(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."
;; Handler of event from elmo-folder
(defun wl-summary-update-persistent-mark-on-event (buffer numbers)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(if wl-summary-lazy-update-mark
(let ((window-list (get-buffer-window-list (current-buffer) 'nomini t))
invalidate)
wl-summary-highlight
temp persistent)
(with-temp-buffer
+ (set-buffer-multibyte t)
(setq wl-summary-buffer-number-column column
wl-summary-buffer-line-formatter formatter
wl-summary-buffer-weekday-name-lang lang)
(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.
the-email)
(while (not (or (eq (setq char (read-char)) ?\r)
(eq char ?\n)
- (eq char ? )
+ (eq char (string-to-char " "))
(eq char ?e)
(eq char ?c)
(eq char ?d)))
((or (eq char ?e)
(eq char ?\n)
(eq char ?\r)
- (eq char ? ))
+ (eq char (string-to-char " ")))
;; Change Addresses
(wl-address-add-or-change
the-email
(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
(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")
(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)
(set-buffer-modified-p nil)
(while copy-variables
(set (car copy-variables)
- (save-excursion
- (set-buffer cur-buf)
+ (with-current-buffer cur-buf
(symbol-value (car copy-variables))))
(setq copy-variables (cdr copy-variables)))
(switch-to-buffer buf)
(setq buf (wl-summary-get-buffer-create (elmo-folder-name-internal folder)
sticky))
(setq reuse-buf
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(string= (elmo-folder-name-internal folder)
(wl-summary-buffer-folder-name))))
(unwind-protect
(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
(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
,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))
(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)))
(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
(wl-draft-body-goto-top)
(wl-draft-enclose-digest-region (point) (point-max)))
(goto-char start-point)
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks)))
(run-hooks 'wl-mail-setup-hook)))
(wl-draft-yank-original)
(setq mlist (cdr mlist)))
(goto-char start-point)
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks)))
(wl-draft-reply-position wl-draft-reply-default-position)
(run-hooks 'wl-mail-setup-hook))))
(erase-buffer)
(princ raw raw-buffer)
(toggle-read-only t)
- (beginning-of-buffer)
+ (goto-char (point-min))
(switch-to-buffer-other-window raw-buffer)
(define-key raw-mode-map "l" 'toggle-truncate-lines)
(define-key raw-mode-map "q" 'kill-buffer-and-window)
(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)
(as-binary-output-file
(write-region (point-min) (point-max)
filename nil 'no-msg))))
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks))
(if (file-exists-p filename)
(message "Saved as %s" filename)))