--- gnus-art.el~ 2007-08-24 10:22:10 +0000 +++ gnus-art.el 2007-09-18 11:43:14 +0000 @@ -7357,9 +7357,24 @@ (setq regexp (eval (car entry))) (goto-char beg) (while (re-search-forward regexp nil t) - (let* ((start (and entry (match-beginning (nth 1 entry)))) - (end (and entry (match-end (nth 1 entry)))) + (let* ((start (match-beginning (nth 1 entry))) + (end (match-end (nth 1 entry))) (from (match-beginning 0))) + (when (eq (car entry) 'gnus-button-url-regexp) + (let ((to (match-end 0))) + (goto-char end) + (when (or (looking-at "[\t\n ]*>") + (progn + (goto-char start) + (and (or (eq (char-before) ?<) + (and (search-backward "<" nil t) + (string-match + "url:[\t\n ]*" + (buffer-substring (match-end 0) + start)))) + (re-search-forward "[\t\n ]*>" nil t)))) + (setq end (match-beginning 0))) + (goto-char to))) (when (and (or (eq t (nth 2 entry)) (eval (nth 2 entry))) (not (gnus-button-in-region-p @@ -7450,6 +7465,27 @@ (if (looking-at (eval (car entry))) (setq alist nil) (setq entry nil))) + (when (and entry + (eq (car entry) 'gnus-button-url-regexp)) + (let ((start (point)) + end md) + (goto-char (match-end (nth 1 entry))) + (when (save-match-data + (when (or (looking-at "[\t\n ]*>") + (progn + (goto-char start) + (and (or (eq (char-before) ?<) + (and (search-backward "<" nil t) + (string-match + "url:[\t\n ]*" + (buffer-substring (match-end 0) + start)))) + (re-search-forward "[\t\n ]*>" nil t)))) + (setq end (match-beginning 0)))) + (setq md (match-data)) + (setcar (nthcdr (1+ (* (nth 1 entry) 2)) md) end) + (set-match-data md)) + (goto-char start))) entry)) (defun gnus-button-push (marker) @@ -7460,7 +7496,9 @@ (inhibit-point-motion-hooks t) (fun (nth 3 entry)) (args (mapcar (lambda (group) - (let ((string (match-string group))) + (let ((string (gnus-replace-in-string + (match-string group) + "\\(?:[\t ]*\n\\)+[\t ]*" ""))) (set-text-properties 0 (length string) nil string) string))