From: teranisi Date: Mon, 29 Oct 2001 15:17:24 +0000 (+0000) Subject: * wl-vars.el (wl-message-body-button-alist): Set 4th element as the max match X-Git-Tag: wl-2_7_6~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aae41ea477db43a54fda033b31088780720494e;p=elisp%2Fwanderlust.git * wl-vars.el (wl-message-body-button-alist): Set 4th element as the max match length. (Pointed out by Akihiro MOTOKI .) * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index cbbb483..3422d88 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,16 @@ +2001-10-29 Yuuichi Teranishi + + * wl-vars.el (wl-message-body-button-alist): Set 4th element as the + max match length. + (Pointed out by Akihiro MOTOKI .) + + * 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 * wl-summary.el (wl-summary-jump-to-msg): Search before diff --git a/wl/wl-acap.el b/wl/wl-acap.el index e251ba7..aa05598 100644 --- a/wl/wl-acap.el +++ b/wl/wl-acap.el @@ -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"))) diff --git a/wl/wl-message.el b/wl/wl-message.el index b003f36..eec9b89 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -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 diff --git a/wl/wl-vars.el b/wl/wl-vars.el index ce28358..a84d3ae 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1227,13 +1227,14 @@ Each elements are regexp of field-name." :group 'wl-pref) (defcustom wl-message-body-button-alist - '(("]+>" 0 'ignore 0) - ("<[^>]+@[^>]+>" 0 wl-message-button-refer-article 0)) + '(("]+>" 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"))))