+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
(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")))
(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
: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"))))