]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
emacs: Add custom `notmuch-show-elide-same-subject'
[notmuch] / emacs / notmuch-show.el
index 2ce3ebf82a1dceb8f9827c5d3525a4445c9219d1..9c174e25e85576640a549f78924f6377bd91a566 100644 (file)
@@ -64,6 +64,12 @@ any given message."
   :group 'notmuch
   :type 'boolean)
 
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-show-elide-same-subject nil
+  "Do not show the subject of a collapsed message if it is the
+same as that of the previous message."
+  :group 'notmuch
+  :type 'boolean)
+
 (defcustom notmuch-show-always-show-subject t
   "Should a collapsed message show the `Subject:' line?"
   :group 'notmuch
 (defcustom notmuch-show-always-show-subject t
   "Should a collapsed message show the `Subject:' line?"
   :group 'notmuch
@@ -626,9 +632,9 @@ current buffer, if possible."
       ;; If the subject of this message is the same as that of the
       ;; previous message, don't display it when this message is
       ;; collapsed.
       ;; If the subject of this message is the same as that of the
       ;; previous message, don't display it when this message is
       ;; collapsed.
-      (when (or notmuch-show-always-show-subject
-                (not (string= notmuch-show-previous-subject
-                              bare-subject)))
+      (when (and notmuch-show-elide-same-subject
+                (not (string= notmuch-show-previous-subject
+                              bare-subject)))
        (forward-line 1))
       (setq headers-start (point-marker)))
     (setq headers-end (point-marker))
        (forward-line 1))
       (setq headers-start (point-marker)))
     (setq headers-end (point-marker))