* wl-vars.el (wl-message-body-button-alist): Set 4th element as the max match
authorteranisi <teranisi>
Mon, 29 Oct 2001 15:17:24 +0000 (15:17 +0000)
committerteranisi <teranisi>
Mon, 29 Oct 2001 15:17:24 +0000 (15:17 +0000)
length. (Pointed out by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>.)

* wl-message.el (wl-message-add-buttons-to-body): Use 3rd element value
for the max match length; Use 4th element value for the button string regexp
group.

* wl-acap.el (wl-acap-find-acap-service): If multiple ACAP server candidate
exists, prompt to select.

wl/ChangeLog
wl/wl-acap.el
wl/wl-message.el
wl/wl-vars.el

index cbbb483..3422d88 100644 (file)
@@ -1,3 +1,16 @@
+2001-10-29  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-vars.el (wl-message-body-button-alist): Set 4th element as the
+       max match length.
+       (Pointed out by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>.)
+
+       * wl-message.el (wl-message-add-buttons-to-body): Use 3rd element value
+       for the max match length;
+       Use 4th element value for the button string regexp group.
+
+       * wl-acap.el (wl-acap-find-acap-service): If multiple ACAP server
+       candidate exists, prompt to select.
+
 2001-10-15  NAKAJIMA Mikio  <minakaji@osaka.email.ne.jp>
 
        * wl-summary.el (wl-summary-jump-to-msg): Search before
index e251ba7..aa05598 100644 (file)
@@ -188,10 +188,43 @@ If nil, default acap port is used."
        (message "Searching ACAP server...")
        (prog1 (let ((response (condition-case nil
                                   (slp-findsrvs "acap")
-                                (error))))
+                                (error)))
+                    selected)
                 (when response
-                  ;; Only the first service entry is used.
-                  (setq response (car (slp-response-body response)))
+                  (if (> (length (slp-response-body response)) 1)
+                      (progn
+                        (setq selected
+                              (completing-read
+                               "Select ACAP server: "
+                               (mapcar (lambda (body)
+                                         (list
+                                          (concat
+                                           (slp-response-srv-url-host
+                                            body)
+                                           (when (slp-response-srv-url-port
+                                                  body)
+                                             (concat
+                                              ":"
+                                              (slp-response-srv-url-port
+                                               body))))))
+                                       (slp-response-body response)))
+                              response
+                              (catch 'done
+                                (dolist (entry (slp-response-body response))
+                                  (when (string=
+                                         (concat
+                                          (slp-response-srv-url-host
+                                           entry)
+                                          (when
+                                              (slp-response-srv-url-port
+                                               entry)
+                                            (concat
+                                             ":"
+                                             (slp-response-srv-url-port
+                                              entry))))
+                                         selected)
+                                    (throw 'done entry))))))
+                    (setq response (car (slp-response-body response))))
                   (cons (slp-response-srv-url-host response)
                         (slp-response-srv-url-port response))))
          (message "Searching ACAP server...done")))
index b003f36..eec9b89 100644 (file)
@@ -376,13 +376,13 @@ Returns non-nil if bottom of message."
          (setq entry (car alist)
                alist (cdr alist))
          (goto-char (point-min))
-         (while (re-search-forward (car entry) nil t)
+         (while (re-search-forward (car entry) (+ (point) (nth 3 entry)) t)
            (unless (get-text-property (point) 'keymap)
              (wl-message-add-button
               (match-beginning (nth 1 entry))
               (match-end (nth 1 entry))
               (nth 2 entry)
-              (match-string (nth 3 entry))))))))))
+              (match-string (nth 4 entry))))))))))
   
 (defun wl-message-add-buttons-to-header (start end)
   (save-excursion
index ce28358..a84d3ae 100644 (file)
@@ -1227,13 +1227,14 @@ Each elements are regexp of field-name."
   :group 'wl-pref)
 
 (defcustom wl-message-body-button-alist
-  '(("<mailto:[^>]+>" 0 'ignore 0)
-    ("<[^>]+@[^>]+>" 0 wl-message-button-refer-article 0))
+  '(("<mailto:[^>]+>" 0 'ignore 1024 0)
+    ("<[^>]+@[^>]+>" 0 wl-message-button-refer-article 1024 0))
   "Alist of regexps to match buttons in message body."
   :type '(repeat
          (list regexp
                (integer :tag "Button")
                (function :tag "Callback")
+               (integer :tag "Max Length")
                (repeat :tag "Data"
                        :inline t
                        (integer :tag "Regexp group"))))