X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=643dee6ecb928b393bf1c821aca90e0ad36b3811;hb=5d05523659912c6b4221fe5246261df601ea41c8;hp=f2487abf5ccf983eae438c01cc06e388dc1fa693;hpb=ba8fba3d6aa37b1c7698137f6d577309335981ae;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index f2487abf..643dee6e 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1174,13 +1174,15 @@ This also turns id:\"\"-parts and mid: links into buttons for a corresponding notmuch search." (goto-address-fontify-region start end) (save-excursion - (let (links) - (goto-char start) - (while (re-search-forward notmuch-id-regexp end t) + (let (links + (beg-line (progn (goto-char start) (line-beginning-position))) + (end-line (progn (goto-char end) (line-end-position)))) + (goto-char beg-line) + (while (re-search-forward notmuch-id-regexp end-line t) (push (list (match-beginning 0) (match-end 0) (match-string-no-properties 0)) links)) - (goto-char start) - (while (re-search-forward notmuch-mid-regexp end t) + (goto-char beg-line) + (while (re-search-forward notmuch-mid-regexp end-line t) (let* ((mid-cid (match-string-no-properties 1)) (mid (save-match-data (string-match "^[^/]*" mid-cid)