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>
9 ;;; $Id: tm-gd3.el,v 7.4 1995/11/19 07:10:19 morioka Exp $
10 ;;; Keywords: news, MIME, multimedia, multilingual, encoded-word
12 ;;; This file is part of tm (Tools for MIME).
18 ;;; @ to decode subjects in mode-line
20 ;; This function imported from gnus.el.
22 ;; New implementation in gnus 3.14.3
25 (defun tm-gnus/article-set-mode-line ()
26 "Set Article mode line string.
27 If you don't like it, define your own gnus-article-set-mode-line."
28 (let ((maxlen 15) ;Maximum subject length
30 (if gnus-current-headers
31 (mime-eword/decode-string
32 (nntp-header-subject gnus-current-headers))
35 ;; The value must be a string to escape %-constructs because of subject.
36 (setq mode-line-buffer-identification
37 (format "GNUS: %s%s %s%s%s"
39 (if gnus-current-article
40 (format "/%d" gnus-current-article) "")
41 (rightful-boundary-short-string subject
42 (min (string-width subject)
44 (if (> (string-width subject) maxlen) "..." "")
45 (make-string (max 0 (- 17 (string-width subject))) ? )
47 (set-buffer-modified-p t))
50 ;;; @ to decode subjects in Summary buffer
53 (defun tm-gnus/decode-summary-subjects ()
56 (let ((subj (or (gnus-header-subject header) "")))
57 (nntp-set-header-subject
58 header (mime-eword/decode-string subj))
60 gnus-newsgroup-headers)