Function: article-treat-overstrike
article-treat-overstrike is an interactive and byte-compiled function
defined in gnus-art.el.gz.
Signature
(article-treat-overstrike)
Documentation
Translate overstrikes into bold text.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun article-treat-overstrike ()
"Translate overstrikes into bold text."
(interactive nil gnus-article-mode)
(save-excursion
(when (article-goto-body)
(let ((inhibit-read-only t))
(while (search-forward "\b" nil t)
(let ((next (char-after))
(previous (char-after (- (point) 2))))
;; We do the boldification/underlining by hiding the
;; overstrikes and putting the proper text property
;; on the letters.
(cond
((eq next previous)
(gnus-article-hide-text-type (- (point) 2) (point) 'overstrike)
(put-text-property (point) (1+ (point)) 'face 'bold))
((eq next ?_)
(gnus-article-hide-text-type
(1- (point)) (1+ (point)) 'overstrike)
(put-text-property
(- (point) 2) (1- (point)) 'face 'underline))
((eq previous ?_)
(gnus-article-hide-text-type (- (point) 2) (point) 'overstrike)
(put-text-property
(point) (1+ (point)) 'face 'underline)))))))))