]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
emacs/show: force notmuch-show-buttonise-links to act on lines
[notmuch] / emacs / notmuch-show.el
index 641398dc838ab10b4e17dbb4767a78b3ab0be667..e7d16f81da5fd6fcab37cbb6b85d77fed62b9143 100644 (file)
@@ -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)