Created
August 20, 2014 22:09
-
-
Save gnusosa/bfce10bd40b207d13fd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defvar gnus-user-format-function-g-prev "" "") | |
| (defun empty-common-prefix (left right) | |
| "Given `left' '(\"foo\" \"bar\" \"fie\") and `right' '(\"foo\" | |
| \"bar\" \"fum\"), return '(\" \" \" \" \"fum\")." | |
| (if (and (cdr right) ; always keep the last part of right | |
| (equal (car left) (car right))) | |
| (cons (make-string (length (car left)) ? ) | |
| (empty-common-prefix (cdr left) (cdr right))) | |
| right)) | |
| (defun gnus-user-format-function-g (arg) | |
| "The full group name, but if it starts with a previously seen | |
| prefix, empty that prefix." | |
| (if (equal gnus-user-format-function-g-prev gnus-tmp-group) ; line-format is updated on exiting the summary, making prev equal this | |
| gnus-tmp-group | |
| (let* ((prev (split-string-and-unquote gnus-user-format-function-g-prev "\\.")) | |
| (this (split-string-and-unquote gnus-tmp-group "\\."))) | |
| (setq gnus-user-format-function-g-prev gnus-tmp-group) | |
| (combine-and-quote-strings | |
| (empty-common-prefix prev this) | |
| ".")))) | |
| (setq gnus-group-line-format "%M%S%p%P%5y:%B%(%ug%)\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment