diff options
author | David Edmondson <dme@dme.org> | 2012-01-30 10:16:01 +0000 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-02-03 21:20:15 -0400 |
commit | 6bd3d8af5431542f352f084b6366e88b98b019a1 (patch) | |
tree | fe878194e965a5708e090bcd9759fe32cb2841db /emacs/notmuch-lib.el | |
parent | e516a712bb79e523629012ee6a8325f5166b4ee5 (diff) |
emacs: Prefer '[No Subject]' to blank subjects.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r-- | emacs/notmuch-lib.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index c906ca76..d315f765 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -133,6 +133,15 @@ the user hasn't set this variable with the old or new value." (interactive) (kill-buffer (current-buffer))) +(defun notmuch-prettify-subject (subject) + ;; This function is used by `notmuch-search-process-filter' which + ;; requires that we not disrupt its' matching state. + (save-match-data + (if (and subject + (string-match "^[ \t]*$" subject)) + "[No Subject]" + subject))) + ;; (defun notmuch-common-do-stash (text) |