]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
emacs: Don't insert extra line after citations.
[notmuch] / notmuch.el
index 31e9d585fdd98a8880f7755c0060a53e22f15926..492b5d66f78f20fb5f62ff3c8e4943fb5c6544ff 100644 (file)
@@ -599,16 +599,18 @@ which this thread was originally shown."
   (while (< (point) end)
     (let ((beg-sub (point-marker))
          (indent (make-string depth ? ))
-         (citation "[[:space:]]*>"))
+         (citation ">"))
+      (move-to-column depth)
       (if (looking-at citation)
          (progn
            (while (looking-at citation)
-             (forward-line))
+             (forward-line)
+             (move-to-column depth))
            (let ((overlay (make-overlay beg-sub (point)))
                   (invis-spec (make-symbol "notmuch-citation-region")))
               (add-to-invisibility-spec invis-spec)
              (overlay-put overlay 'invisible invis-spec)
-              (let ((p (point))
+              (let ((p (point-marker))
                     (cite-button-text
                      (concat "["  (number-to-string (count-lines beg-sub (point)))
                              "-line citation.]")))
@@ -617,7 +619,6 @@ which this thread was originally shown."
                 (insert-button cite-button-text
                                'invisibility-spec invis-spec
                                :type 'notmuch-button-citation-toggle-type)
-                (insert "\n")
                 (goto-char (+ (length cite-button-text) p))
               ))))
       (move-to-column depth)
@@ -633,7 +634,7 @@ which this thread was originally shown."
                     (goto-char (- beg-sub 1))
                     (insert (concat "\n" indent))
                     (let ((sig-button-text (concat "[" (number-to-string sig-lines)
-                                                   "-line signature.]")))
+                                                   "-line signature. Click/Enter to show.]")))
                       (insert-button sig-button-text 'invisibility-spec invis-spec
                                      :type 'notmuch-button-signature-toggle-type)
                      )