* elmo-archive.el (elmo-archive-field-condition-match)
[elisp/wanderlust.git] / utils / wl-addrbook.el
index 36f80fd..952dc84 100644 (file)
@@ -100,8 +100,8 @@ If nil,  the old 'user' entry remains.")
 
 ;; hash table for wl-addrbook-alist
 (defmacro wl-addrbook-hashtb ()
-  (` (or wl-addrbook-hashtb
-        (setq wl-addrbook-hashtb (elmo-make-hash 1021)))))
+  '(or wl-addrbook-hashtb
+       (setq wl-addrbook-hashtb (elmo-make-hash 1021))))
 
 (defsubst wl-addrbook-get-record-by-addr (addr &optional alist)
   (elmo-get-hash-val (downcase addr) (wl-addrbook-hashtb)))
@@ -137,7 +137,7 @@ If nil,  the old 'user' entry remains.")
   (setq wl-address-init-function 'wl-addrbook-init)
   ;;
   (when wl-summary-use-addrbook-from-func
-    (setq wl-summary-from-function 'wl-summary-addrbook-from))
+    (setq wl-summary-get-petname-function 'wl-addrbook-get-nickname))
   (define-key wl-summary-mode-map "\C-c\C-a" 'wl-summary-addrbook-add)
   (define-key wl-draft-mode-map "\C-i"     'wl-draft-addrbook-header-comp-or-tab)
   (define-key wl-draft-mode-map "\e\t"     'wl-draft-addrbook-expand)
@@ -180,10 +180,10 @@ If nil,  the old 'user' entry remains.")
 ;;
 
 (defmacro wl-alias-get (key)
-  (` (wl-addrbook-alias-get (, key) wl-addrbook-alist)))
+  `(wl-addrbook-alias-get ,key wl-addrbook-alist))
 
 (defmacro wl-alias-next (key)
-  (` (wl-addrbook-alias-next (, key) wl-addrbook-alist)))
+  `(wl-addrbook-alias-next ,key wl-addrbook-alist))
 
 (defalias 'wl-addrbook-alias-hit 'wl-addrbook-get-record-by-alias)
 
@@ -310,7 +310,7 @@ If addresses is a string, expands it recursively."
     (while (re-search-forward ",[ \t]*$" nil t)
       (end-of-line)
       (forward-char 1)
-      (delete-backward-char 1)
+      (delete-char -1)
       (delete-horizontal-space))
     ;; unquote, replace white spaces to "\0".
     (if unquote
@@ -319,11 +319,11 @@ If addresses is a string, expands it recursively."
          (while (re-search-forward "[\"']" nil t)
            (setq qchar (char-before (point)))
            ;; (point) is for backward compatibility
-           (backward-delete-char 1) ;; delete quote
+           (delete-char -1)            ; delete quote
            (setq beg (point))
            (if (not (re-search-forward (char-to-string qchar) nil t))
                (throw 'quote nil) ;; error
-             (backward-delete-char 1) ;; delete quote
+             (delete-char -1)     ; delete quote
              (save-restriction
                (narrow-to-region beg (point))
                (goto-char (point-min))
@@ -400,8 +400,7 @@ it will add an alias."
   (wl-summary-redisplay)
   (let ((buf wl-message-buffer)
        from shortname address addrs name)
-    (save-excursion
-      (set-buffer buf)
+    (with-current-buffer buf
       (setq address (std11-field-body "From"))
       (if (wl-address-user-mail-address-p address)
          (setq address (std11-field-body "To")))