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.5 1995/11/21 02:49:25 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.
33 ;;; @ to decode subjects in mode-line
35 ;; This function imported from gnus.el.
37 ;; New implementation in gnus 3.14.3
40 (defun tm-gnus/article-set-mode-line ()
41 "Set Article mode line string.
42 If you don't like it, define your own gnus-article-set-mode-line."
43 (let ((maxlen 15) ;Maximum subject length
45 (if gnus-current-headers
46 (mime-eword/decode-string
47 (nntp-header-subject gnus-current-headers))
50 ;; The value must be a string to escape %-constructs because of subject.
51 (setq mode-line-buffer-identification
52 (format "GNUS: %s%s %s%s%s"
54 (if gnus-current-article
55 (format "/%d" gnus-current-article) "")
56 (rightful-boundary-short-string subject
57 (min (string-width subject)
59 (if (> (string-width subject) maxlen) "..." "")
60 (make-string (max 0 (- 17 (string-width subject))) ? )
62 (set-buffer-modified-p t))
65 ;;; @ to decode subjects in Summary buffer
68 (defun tm-gnus/decode-summary-subjects ()
71 (let ((subj (or (gnus-header-subject header) "")))
72 (nntp-set-header-subject
73 header (mime-eword/decode-string subj))
75 gnus-newsgroup-headers)