mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
emacs: notmuch-fontify-headers: Remove unneeded progn and indent correctly.
The defun special form doesn't require a progn. And the remainder of the function was previously indented in a misleading way, (as if each "if" was always evaluated, rather than each only being evaluated if all the previous evaluated to nil).
This commit is contained in:
parent
fcc36df1fa
commit
a0439ded70
1 changed files with 23 additions and 24 deletions
47
notmuch.el
47
notmuch.el
|
@ -697,33 +697,32 @@ which this thread was originally shown."
|
|||
)))
|
||||
|
||||
(defun notmuch-fontify-headers ()
|
||||
(progn
|
||||
(while (looking-at "[[:space:]]")
|
||||
(forward-char))
|
||||
(if (looking-at "[Tt]o:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-to))
|
||||
(while (looking-at "[[:space:]]")
|
||||
(forward-char))
|
||||
(if (looking-at "[Tt]o:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-to))
|
||||
(if (looking-at "[B]?[Cc][Cc]:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-cc))
|
||||
(if (looking-at "[Ss]ubject:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-subject))
|
||||
(if (looking-at "[Ff]rom:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-other))))))))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-cc))
|
||||
(if (looking-at "[Ss]ubject:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-subject))
|
||||
(if (looking-at "[Ff]rom:")
|
||||
(progn
|
||||
(overlay-put (make-overlay (point) (re-search-forward ":"))
|
||||
'face 'message-header-name)
|
||||
(overlay-put (make-overlay (point) (re-search-forward ".*$"))
|
||||
'face 'message-header-other)))))))
|
||||
|
||||
(defun notmuch-show-markup-header (depth)
|
||||
(re-search-forward notmuch-show-header-begin-regexp)
|
||||
|
|
Loading…
Reference in a new issue