comparison lisp/gnus/gnus-art.el @ 122:d2f30a177268 r20-1b14

Import from CVS: tag r20-1b14
author cvs
date Mon, 13 Aug 2007 09:26:03 +0200
parents cca96a509cfe
children 9b50b4588a93
comparison
equal deleted inserted replaced
121:419db647c998 122:d2f30a177268
742 (defun article-treat-overstrike () 742 (defun article-treat-overstrike ()
743 "Translate overstrikes into bold text." 743 "Translate overstrikes into bold text."
744 (interactive) 744 (interactive)
745 (save-excursion 745 (save-excursion
746 (goto-char (point-min)) 746 (goto-char (point-min))
747 (re-search-forward "\n\n") 747 (when (search-forward "\n\n" nil t)
748 (let ((buffer-read-only nil)) 748 (let ((buffer-read-only nil))
749 (while (search-forward "\b" nil t) 749 (while (search-forward "\b" nil t)
750 (let ((next (following-char)) 750 (let ((next (following-char))
751 (previous (char-after (- (point) 2)))) 751 (previous (char-after (- (point) 2))))
752 ;; We do the boldification/underlining by hiding the 752 ;; We do the boldification/underlining by hiding the
753 ;; overstrikes and putting the proper text property 753 ;; overstrikes and putting the proper text property
754 ;; on the letters. 754 ;; on the letters.
755 (cond 755 (cond
756 ((eq next previous) 756 ((eq next previous)
757 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) 757 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike)
758 (put-text-property (point) (1+ (point)) 'face 'bold)) 758 (put-text-property (point) (1+ (point)) 'face 'bold))
759 ((eq next ?_) 759 ((eq next ?_)
760 (gnus-article-hide-text-type (1- (point)) (1+ (point)) 'overstrike) 760 (gnus-article-hide-text-type
761 (put-text-property 761 (1- (point)) (1+ (point)) 'overstrike)
762 (- (point) 2) (1- (point)) 'face 'underline)) 762 (put-text-property
763 ((eq previous ?_) 763 (- (point) 2) (1- (point)) 'face 'underline))
764 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike) 764 ((eq previous ?_)
765 (put-text-property 765 (gnus-article-hide-text-type (- (point) 2) (point) 'overstrike)
766 (point) (1+ (point)) 'face 'underline)))))))) 766 (put-text-property
767 (point) (1+ (point)) 'face 'underline)))))))))
767 768
768 (defun article-fill () 769 (defun article-fill ()
769 "Format too long lines." 770 "Format too long lines."
770 (interactive) 771 (interactive)
771 (save-excursion 772 (save-excursion
2140 (error "No references around point")))) 2141 (error "No references around point"))))
2141 2142
2142 (defun gnus-article-show-summary () 2143 (defun gnus-article-show-summary ()
2143 "Reconfigure windows to show summary buffer." 2144 "Reconfigure windows to show summary buffer."
2144 (interactive) 2145 (interactive)
2145 (gnus-configure-windows 'article) 2146 (if (not (gnus-buffer-live-p gnus-summary-buffer))
2146 (gnus-summary-goto-subject gnus-current-article)) 2147 (error "There is no summary buffer for this article buffer")
2148 (gnus-configure-windows 'article)
2149 (gnus-summary-goto-subject gnus-current-article)))
2147 2150
2148 (defun gnus-article-describe-briefly () 2151 (defun gnus-article-describe-briefly ()
2149 "Describe article mode commands briefly." 2152 "Describe article mode commands briefly."
2150 (interactive) 2153 (interactive)
2151 (gnus-message 6 2154 (gnus-message 6