]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-wash.el
emacs: notmuch-wash-region-to-button: remove unused MSG argument
[notmuch] / emacs / notmuch-wash.el
index 70eff63777bf09ad320e9772351d30b97f6e8a8d..4fbb4e122dee29542486e7e8614a26a37f4d0edc 100644 (file)
@@ -200,7 +200,7 @@ message parts."
                                   (overlay-end overlay))))
     (format label-format lines-count)))
 
-(defun notmuch-wash-region-to-button (msg beg end type &optional prefix)
+(defun notmuch-wash-region-to-button (beg end type &optional prefix)
   "Auxiliary function to do the actual making of overlays and buttons.
 
 BEG and END are buffer locations. TYPE should a string, either
@@ -237,11 +237,9 @@ that PREFIX should not include a newline."
   (beginning-of-line)
   (when (and (< (point) (point-max))
             (re-search-forward notmuch-wash-original-regexp nil t))
-    (let* ((msg-start (match-beginning 0))
-          (msg-end (point-max))
-          (msg-lines (count-lines msg-start msg-end)))
-      (notmuch-wash-region-to-button
-       msg msg-start msg-end "original")))
+    (notmuch-wash-region-to-button (match-beginning 0)
+                                  (point-max)
+                                  "original"))
   (while (and (< (point) (point-max))
              (re-search-forward notmuch-wash-citation-regexp nil t))
     (let* ((cite-start (match-beginning 0))
@@ -258,14 +256,13 @@ that PREFIX should not include a newline."
          (goto-char cite-end)
          (forward-line (- notmuch-wash-citation-lines-suffix))
          (notmuch-wash-region-to-button
-          msg hidden-start (point-marker)
+          hidden-start (point-marker)
           "citation")))))
   (when (and (not (eobp))
             (re-search-forward notmuch-wash-signature-regexp nil t))
-    (let* ((sig-start (match-beginning 0))
-          (sig-end (match-end 0))
-          (sig-lines (count-lines sig-start (point-max))))
-      (when (<= sig-lines notmuch-wash-signature-lines-max)
+    (let ((sig-start (match-beginning 0)))
+      (when (<= (count-lines sig-start (point-max))
+               notmuch-wash-signature-lines-max)
        (let ((sig-start-marker (make-marker))
              (sig-end-marker (make-marker)))
          (set-marker sig-start-marker sig-start)
@@ -273,7 +270,7 @@ that PREFIX should not include a newline."
          (overlay-put (make-overlay sig-start-marker sig-end-marker)
                       'face 'message-cited-text)
          (notmuch-wash-region-to-button
-          msg sig-start-marker sig-end-marker
+          sig-start-marker sig-end-marker
           "signature"))))))
 
 (defun notmuch-wash-elide-blank-lines (msg depth)