Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
072c3cd2
Commit
072c3cd2
authored
Apr 23, 1994
by
Richard M. Stallman
Browse files
(rmail-show-message): Highlight the specified fields.
(rmail-highlighted-headers): New user variable.
parent
9076a6fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
lisp/mail/rmail.el
lisp/mail/rmail.el
+26
-0
No files found.
lisp/mail/rmail.el
View file @
072c3cd2
...
...
@@ -67,6 +67,10 @@ It is useful to set this variable in the site customization file.")
(defvar rmail-ignored-headers "
^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:\\|^message-id:\\|^summary-line:" "\
*Regexp to match Header fields that rmail should normally hide.")
;;;###autoload
(defvar rmail-highlighted-headers "^From:\\|^Subject:
" "
\
*Regexp
to
match
Header
fields
that
rmail
should
normally
highlight.
")
;;;###autoload
(defvar rmail-delete-after-output nil "
\
*Non-nil
means
automatically
delete
a
message
that
is
copied
to
a
file.
")
...
...
@@ -1389,6 +1393,28 @@ If summary buffer is currently displayed, update current message there also."
(narrow-to-region (point) end))
(goto-char (point-min))
(rmail-display-labels)
;; Find all occurrences of certain fields, and highlight them.
(save-excursion
(search-forward "\n\n" nil 'move)
(save-restriction
(narrow-to-region (point-min) (point))
(let ((case-fold-search t)
(inhibit-read-only t)
;; Highlight with boldface if that is available.
;; Otherwise use the `highlight' face.
(face (if (face-differs-from-default-p 'bold)
'bold 'highlight)))
(goto-char (point-min))
(while (re-search-forward rmail-highlighted-headers nil t)
(skip-syntax-forward " ")
(let ((beg (point)))
(while (progn (forward-line 1)
(looking-at "[ \t]")))
;; Back up over newline, then trailing spaces or tabs
(forward-char -1)
(while (member (preceding-char) '(? ?\t))
(forward-char -1))
(put-text-property beg (point) 'face face))))))
(run-hooks 'rmail-show-message-hook)
;; If there is a summary buffer, try to move to this message
;; in that buffer. But don't complain if this message
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment