diff options
| author | David Bremner <david@tethera.net> | 2016-10-11 22:42:26 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-10-11 22:42:26 -0300 |
| commit | 5d05523659912c6b4221fe5246261df601ea41c8 (patch) | |
| tree | 806e763272935467a6e23d5a5e9158704ebc4159 | |
| parent | 9259c7971d0839b4fcfda348c33761048b441064 (diff) | |
| parent | f575a346df09c82691bb9e7c462836d982fe31f7 (diff) | |
merge buttonise-links patch to master
| -rw-r--r-- | emacs/notmuch-show.el | 12 |
1 files changed, 7 insertions, 5 deletions
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:\"<message 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) |
