aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPankaj Jangid2020-12-12 11:47:12 +0100
committerLars Ingebrigtsen2020-12-12 11:47:17 +0100
commitdba74cb5ec1c1abfbee236bbcf811b023bb19d4f (patch)
tree2f8c49029418bb39bb913451af9c1900d097fcd1 /lisp
parent404f12060ca43d100a0609f2658dd487f6a50ebd (diff)
downloademacs-dba74cb5ec1c1abfbee236bbcf811b023bb19d4f.tar.gz
emacs-dba74cb5ec1c1abfbee236bbcf811b023bb19d4f.zip
Allow customizing the Gnus summary thread indicators
* doc/misc/gnus.texi (Summary Buffer Lines): Document them. * lisp/gnus/gnus-sum.el (gnus-summary-prepare-threads): Use them. * lisp/gnus/gnus-sum.el (gnus-sum-opening-bracket) (gnus-sum-closing-bracket, gnus-sum-opening-bracket-adopted) (gnus-sum-closing-bracket-adopted): New variables.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-sum.el46
1 files changed, 38 insertions, 8 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 9432eefcb4d..9488b324878 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1460,8 +1460,8 @@ the normal Gnus MIME machinery."
1460 (?I gnus-tmp-indentation ?s) 1460 (?I gnus-tmp-indentation ?s)
1461 (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s) 1461 (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s)
1462 (?R gnus-tmp-replied ?c) 1462 (?R gnus-tmp-replied ?c)
1463 (?\[ gnus-tmp-opening-bracket ?c) 1463 (?\[ gnus-tmp-opening-bracket ?s)
1464 (?\] gnus-tmp-closing-bracket ?c) 1464 (?\] gnus-tmp-closing-bracket ?s)
1465 (?\> (make-string gnus-tmp-level ? ) ?s) 1465 (?\> (make-string gnus-tmp-level ? ) ?s)
1466 (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s) 1466 (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
1467 (?i gnus-tmp-score ?d) 1467 (?i gnus-tmp-score ?d)
@@ -3748,6 +3748,30 @@ buffer that was in action when the last article was fetched."
3748 (inline 3748 (inline
3749 (gnus-summary-extract-address-component gnus-tmp-from)))))) 3749 (gnus-summary-extract-address-component gnus-tmp-from))))))
3750 3750
3751(defcustom gnus-sum-opening-bracket "["
3752 "With %[ spec, used to identify normal (non-adopted) articles."
3753 :version "28.1"
3754 :type 'string
3755 :group 'gnus-summary-format)
3756
3757(defcustom gnus-sum-closing-bracket "]"
3758 "With %] spec, used to identify normal (non-adopted) articles."
3759 :version "28.1"
3760 :type 'string
3761 :group 'gnus-summary-format)
3762
3763(defcustom gnus-sum-opening-bracket-adopted "<"
3764 "With %[ spec, used to identify adopted articles."
3765 :version "28.1"
3766 :type 'string
3767 :group 'gnus-summary-format)
3768
3769(defcustom gnus-sum-closing-bracket-adopted ">"
3770 "With %] spec, used to identify adopted articles."
3771 :version "28.1"
3772 :type 'string
3773 :group 'gnus-summary-format)
3774
3751(defun gnus-summary-insert-line (header level current undownloaded 3775(defun gnus-summary-insert-line (header level current undownloaded
3752 unread replied expirable subject-or-nil 3776 unread replied expirable subject-or-nil
3753 &optional dummy score process) 3777 &optional dummy score process)
@@ -3805,8 +3829,14 @@ buffer that was in action when the last article was fetched."
3805 (1+ (match-beginning 0)) (1- (match-end 0)))) 3829 (1+ (match-beginning 0)) (1- (match-end 0))))
3806 (t gnus-tmp-from))) 3830 (t gnus-tmp-from)))
3807 (gnus-tmp-subject (mail-header-subject gnus-tmp-header)) 3831 (gnus-tmp-subject (mail-header-subject gnus-tmp-header))
3808 (gnus-tmp-opening-bracket (if gnus-tmp-dummy ?\< ?\[)) 3832 (gnus-tmp-opening-bracket
3809 (gnus-tmp-closing-bracket (if gnus-tmp-dummy ?\> ?\])) 3833 (if gnus-tmp-dummy
3834 gnus-sum-opening-bracket-adopted
3835 gnus-sum-opening-bracket))
3836 (gnus-tmp-closing-bracket
3837 (if gnus-tmp-dummy
3838 gnus-sum-closing-bracket-adopted
3839 gnus-sum-closing-bracket))
3810 (inhibit-read-only t)) 3840 (inhibit-read-only t))
3811 (when (string= gnus-tmp-name "") 3841 (when (string= gnus-tmp-name "")
3812 (setq gnus-tmp-name gnus-tmp-from)) 3842 (setq gnus-tmp-name gnus-tmp-from))
@@ -5439,10 +5469,10 @@ or a straight list of headers."
5439 (if (and (eq gnus-summary-make-false-root 'adopt) 5469 (if (and (eq gnus-summary-make-false-root 'adopt)
5440 (= gnus-tmp-level 1) 5470 (= gnus-tmp-level 1)
5441 (memq number gnus-tmp-gathered)) 5471 (memq number gnus-tmp-gathered))
5442 (setq gnus-tmp-opening-bracket ?\< 5472 (setq gnus-tmp-opening-bracket gnus-sum-opening-bracket-adopted
5443 gnus-tmp-closing-bracket ?\>) 5473 gnus-tmp-closing-bracket gnus-sum-closing-bracket-adopted)
5444 (setq gnus-tmp-opening-bracket ?\[ 5474 (setq gnus-tmp-opening-bracket gnus-sum-opening-bracket
5445 gnus-tmp-closing-bracket ?\])) 5475 gnus-tmp-closing-bracket gnus-sum-closing-bracket))
5446 (if (>= gnus-tmp-level (length gnus-thread-indent-array)) 5476 (if (>= gnus-tmp-level (length gnus-thread-indent-array))
5447 (gnus-make-thread-indent-array 5477 (gnus-make-thread-indent-array
5448 (max (* 2 (length gnus-thread-indent-array)) 5478 (max (* 2 (length gnus-thread-indent-array))