annotate lisp/gnus/gnus-ems.el @ 175:2d532a89d707 r20-3b14

Import from CVS: tag r20-3b14
author cvs
date Mon, 13 Aug 2007 09:50:14 +0200
parents 8eaf7971accc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; gnus-ems.el --- functions for making Gnus work under different Emacsen
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
2 ;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Keywords: news
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 (eval-when-compile (require 'cl))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
30 ;;; Function aliases later to be redefined for XEmacs usage.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
32 (defvar gnus-xemacs (string-match "XEmacs\\|Lucid" emacs-version)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
33 "Non-nil if running under XEmacs.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
35 (defvar gnus-mouse-2 [mouse-2])
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
36 (defvar gnus-down-mouse-2 [down-mouse-2])
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
37 (defvar gnus-mode-line-modified
175
2d532a89d707 Import from CVS: tag r20-3b14
cvs
parents: 173
diff changeset
38 (if (or gnus-xemacs
2d532a89d707 Import from CVS: tag r20-3b14
cvs
parents: 173
diff changeset
39 (< emacs-major-version 20))
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
40 '("--**-" . "-----")
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
41 '("**" "--")))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
42
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
43 (eval-and-compile
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (autoload 'gnus-xmas-define "gnus-xmas")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (autoload 'gnus-xmas-redefine "gnus-xmas")
136
b980b6286996 Import from CVS: tag r20-2b2
cvs
parents: 118
diff changeset
46 (autoload 'appt-select-lowest-window "appt"))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (or (fboundp 'mail-file-babyl-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (fset 'mail-file-babyl-p 'rmail-file-p))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;;; Mule functions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (defun gnus-mule-cite-add-face (number prefix face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
55 (when face
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
56 (let ((inhibit-point-motion-hooks t)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
57 from to)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
58 (goto-line number)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
59 (if (boundp 'MULE)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
60 (forward-char (chars-in-string prefix))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
61 (forward-char (length prefix)))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
62 (skip-chars-forward " \t")
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
63 (setq from (point))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
64 (end-of-line 1)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
65 (skip-chars-backward " \t")
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
66 (setq to (point))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
67 (when (< from to)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
68 (gnus-overlay-put (gnus-make-overlay from to) 'face face)))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (defun gnus-mule-max-width-function (el max-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (` (let* ((val (eval (, el)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (valstr (if (numberp val)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (int-to-string val) val)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (if (> (length valstr) (, max-width))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (truncate-string valstr (, max-width))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 valstr))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (eval-and-compile
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
79 (if (string-match "XEmacs\\|Lucid" emacs-version)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
80 nil
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (defvar gnus-mouse-face-prop 'mouse-face
140
585fb297b004 Import from CVS: tag r20-2b4
cvs
parents: 136
diff changeset
83 "Property used for highlighting mouse regions."))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 30
diff changeset
84
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
85 (cond
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ((string-match "XEmacs\\|Lucid" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (gnus-xmas-define))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 ((or (not (boundp 'emacs-minor-version))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (< emacs-minor-version 30))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 ;; Remove the `intangible' prop.
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
92 (let ((props (and (boundp 'gnus-hidden-properties)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 gnus-hidden-properties)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (while (and props (not (eq (car (cdr props)) 'intangible)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (setq props (cdr props)))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
96 (when props
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
97 (setcdr props (cdr (cdr (cdr props))))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
98 (unless (fboundp 'buffer-substring-no-properties)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
99 (defun buffer-substring-no-properties (beg end)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
100 (format "%s" (buffer-substring beg end)))))
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
101
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 ((boundp 'MULE)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (provide 'gnusutil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (eval-and-compile
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 ((not window-system)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (defun gnus-dummy-func (&rest args))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (let ((funcs '(mouse-set-point set-face-foreground
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 set-face-background x-popup-menu)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (while funcs
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
112 (unless (fboundp (car funcs))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
113 (fset (car funcs) 'gnus-dummy-func))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (setq funcs (cdr funcs))))))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
115 (unless (fboundp 'file-regular-p)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
116 (defun file-regular-p (file)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
117 (and (not (file-directory-p file))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
118 (not (file-symlink-p file))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
119 (file-exists-p file))))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
120 (unless (fboundp 'face-list)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
121 (defun face-list (&rest args))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (eval-and-compile
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (let ((case-fold-search t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 ((string-match "windows-nt\\|os/2\\|emx" (format "%s" system-type))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (setq nnheader-file-name-translation-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (append nnheader-file-name-translation-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 '((?: . ?_)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (?+ . ?-))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (defvar gnus-tmp-unread)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (defvar gnus-tmp-replied)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (defvar gnus-tmp-score-char)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (defvar gnus-tmp-indentation)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (defvar gnus-tmp-opening-bracket)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (defvar gnus-tmp-lines)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (defvar gnus-tmp-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (defvar gnus-tmp-closing-bracket)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (defvar gnus-tmp-subject-or-nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (defun gnus-ems-redefine ()
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
143 (cond
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 ((string-match "XEmacs\\|Lucid" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (gnus-xmas-redefine))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
147 ((featurep 'mule)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
148 ;; Mule and new Emacs definitions
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
149
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
150 ;; [Note] Now there are three kinds of mule implementations,
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
151 ;; original MULE, XEmacs/mule and beta version of Emacs including
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
152 ;; some mule features. Unfortunately these API are different. In
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
153 ;; particular, Emacs (including original MULE) and XEmacs are
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
154 ;; quite different.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
155 ;; Predicates to check are following:
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
156 ;; (boundp 'MULE) is t only if MULE (original; anything older than
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
157 ;; Mule 2.3) is running.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
158 ;; (featurep 'mule) is t when every mule variants are running.
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
159
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
160 ;; These implementations may be able to share between original
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
161 ;; MULE and beta version of new Emacs. In addition, it is able to
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
162 ;; detect XEmacs/mule by (featurep 'mule) and to check variable
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
163 ;; `emacs-version'. In this case, implementation for XEmacs/mule
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
164 ;; may be able to share between XEmacs and XEmacs/mule.
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
165
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (defalias 'gnus-truncate-string 'truncate-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
168 (defvar gnus-summary-display-table nil
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
169 "Display table used in summary mode buffers.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (fset 'gnus-max-width-function 'gnus-mule-max-width-function)
118
7d55a9ba150c Import from CVS: tag r20-1b11
cvs
parents: 108
diff changeset
172 (fset 'gnus-summary-set-display-table 'ignore)
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
173
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
174 (when (boundp 'gnus-check-before-posting)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
175 (setq gnus-check-before-posting
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
176 (delq 'long-lines
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
177 (delq 'control-chars gnus-check-before-posting))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (defun gnus-summary-line-format-spec ()
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
180 (insert gnus-tmp-unread gnus-tmp-replied
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 gnus-tmp-score-char gnus-tmp-indentation)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (put-text-property
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (progn
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
185 (insert
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
186 gnus-tmp-opening-bracket
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
187 (format "%4d: %-20s"
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 98
diff changeset
188 gnus-tmp-lines
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
189 (if (> (length gnus-tmp-name) 20)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
190 (truncate-string gnus-tmp-name 20)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 gnus-tmp-name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 gnus-tmp-closing-bracket)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 gnus-mouse-face-prop gnus-mouse-face)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (insert " " gnus-tmp-subject-or-nil "\n"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 )))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
198 (defun gnus-region-active-p ()
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
199 "Say whether the region is active."
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
200 (and (boundp 'transient-mark-mode)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
201 transient-mark-mode
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
202 (boundp 'mark-active)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 70
diff changeset
203 mark-active))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204
173
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
205 (defun gnus-add-minor-mode (mode name map)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
206 (if (fboundp 'add-minor-mode)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
207 (add-minor-mode mode name map)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
208 (unless (assq mode minor-mode-alist)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
209 (push `(,mode ,name) minor-mode-alist))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
210 (unless (assq mode minor-mode-map-alist)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
211 (push (cons mode map)
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
212 minor-mode-map-alist))))
8eaf7971accc Import from CVS: tag r20-3b13
cvs
parents: 140
diff changeset
213
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (provide 'gnus-ems)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 ;; Local Variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 ;; byte-compile-warnings: '(redefine callargs)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 ;; End:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 ;;; gnus-ems.el ends here