2 ;;; tm-gd3.el --- tm-gnus module for GNUS 3.* and 4.*
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1995 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; Created: 1995/05/23 (obsolete tm-ognus.el)
11 ;;; $Id: tm-gd3.el,v 7.6 1996/03/27 19:27:04 morioka Exp $
12 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
14 ;;; This file is part of tm (Tools for MIME).
16 ;;; This program is free software; you can redistribute it and/or
17 ;;; modify it under the terms of the GNU General Public License as
18 ;;; published by the Free Software Foundation; either version 2, or
19 ;;; (at your option) any later version.
21 ;;; This program is distributed in the hope that it will be useful,
22 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 ;;; General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with This program. If not, write to the Free Software
28 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
35 ;;; @ to decode subjects in mode-line
37 ;; This function imported from gnus.el.
39 ;; New implementation in gnus 3.14.3
42 (defun tm-gnus/article-set-mode-line ()
43 "Set Article mode line string.
44 If you don't like it, define your own gnus-article-set-mode-line."
45 (let ((maxlen 15) ;Maximum subject length
47 (if gnus-current-headers
48 (mime-eword/decode-string
49 (nntp-header-subject gnus-current-headers))
52 ;; The value must be a string to escape %-constructs because of subject.
53 (setq mode-line-buffer-identification
54 (format "GNUS: %s%s %s%s%s"
56 (if gnus-current-article
57 (format "/%d" gnus-current-article) "")
58 (truncate-string subject
59 (min (string-width subject) maxlen))
60 (if (> (string-width subject) maxlen) "..." "")
61 (make-string (max 0 (- 17 (string-width subject))) ? )
63 (set-buffer-modified-p t))
66 ;;; @ to decode subjects in Summary buffer
69 (defun tm-gnus/decode-summary-subjects ()
72 (let ((subj (or (gnus-header-subject header) "")))
73 (nntp-set-header-subject
74 header (mime-eword/decode-string subj))
76 gnus-newsgroup-headers)
85 ;;; tm-gd3.el ends here