Mercurial > emacs
annotate lisp/gnus/gnus-ems.el @ 28781:dc2a0cf401ab
(french-calendar-multibyte-special-days-array)
(french-calendar-special-days-array): Change French text.
(calendar-french-date-string): Change output.
(calendar-goto-french-date): Likewise.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 02 May 2000 13:43:45 +0000 |
parents | 15fc6acbae7a |
children | 9968f55ad26e |
rev | line source |
---|---|
17493 | 1 ;;; gnus-ems.el --- functions for making Gnus work under different Emacsen |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
2 ;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc. |
17493 | 3 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 5 ;; Keywords: news |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 ;; Boston, MA 02111-1307, USA. | |
23 | |
24 ;;; Commentary: | |
25 | |
26 ;;; Code: | |
27 | |
28 (eval-when-compile (require 'cl)) | |
29 | |
30 ;;; Function aliases later to be redefined for XEmacs usage. | |
31 | |
32 (defvar gnus-xemacs (string-match "XEmacs\\|Lucid" emacs-version) | |
33 "Non-nil if running under XEmacs.") | |
34 | |
35 (defvar gnus-mouse-2 [mouse-2]) | |
36 (defvar gnus-down-mouse-2 [down-mouse-2]) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
37 (defvar gnus-mode-line-modified |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
38 (if (or gnus-xemacs |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
39 (< emacs-major-version 20)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
40 '("--**-" . "-----") |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
41 '("**" "--"))) |
17493 | 42 |
43 (eval-and-compile | |
44 (autoload 'gnus-xmas-define "gnus-xmas") | |
45 (autoload 'gnus-xmas-redefine "gnus-xmas") | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
46 (autoload 'appt-select-lowest-window "appt")) |
17493 | 47 |
48 (or (fboundp 'mail-file-babyl-p) | |
49 (fset 'mail-file-babyl-p 'rmail-file-p)) | |
50 | |
51 ;;; Mule functions. | |
52 | |
53 (defun gnus-mule-cite-add-face (number prefix face) | |
54 ;; At line NUMBER, ignore PREFIX and add FACE to the rest of the line. | |
55 (when face | |
56 (let ((inhibit-point-motion-hooks t) | |
57 from to) | |
58 (goto-line number) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
59 (unless (eobp) ; Sometimes things become confused (broken). |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
60 (if (boundp 'MULE) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
61 (forward-char (chars-in-string prefix)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
62 (forward-char (length prefix))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
63 (skip-chars-forward " \t") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
64 (setq from (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
65 (end-of-line 1) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
66 (skip-chars-backward " \t") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
67 (setq to (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
68 (when (< from to) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
69 (push (setq overlay (gnus-make-overlay from to)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
70 gnus-cite-overlay-list) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
71 (gnus-overlay-put (gnus-make-overlay from to) 'face face)))))) |
17493 | 72 |
73 (defun gnus-mule-max-width-function (el max-width) | |
74 (` (let* ((val (eval (, el))) | |
75 (valstr (if (numberp val) | |
76 (int-to-string val) val))) | |
77 (if (> (length valstr) (, max-width)) | |
78 (truncate-string valstr (, max-width)) | |
79 valstr)))) | |
80 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
81 (defun gnus-encode-coding-string (string system) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
82 string) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
83 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
84 (defun gnus-decode-coding-string (string system) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
85 string) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
86 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
87 (defun gnus-encode-coding-string (string system) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
88 string) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
89 |
17493 | 90 (eval-and-compile |
91 (if (string-match "XEmacs\\|Lucid" emacs-version) | |
92 nil | |
93 | |
94 (defvar gnus-mouse-face-prop 'mouse-face | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
95 "Property used for highlighting mouse regions.")) |
17493 | 96 |
97 (cond | |
98 ((string-match "XEmacs\\|Lucid" emacs-version) | |
99 (gnus-xmas-define)) | |
100 | |
101 ((or (not (boundp 'emacs-minor-version)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
102 (and (< emacs-major-version 20) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
103 (< emacs-minor-version 30))) |
17493 | 104 ;; Remove the `intangible' prop. |
105 (let ((props (and (boundp 'gnus-hidden-properties) | |
106 gnus-hidden-properties))) | |
107 (while (and props (not (eq (car (cdr props)) 'intangible))) | |
108 (setq props (cdr props))) | |
109 (when props | |
110 (setcdr props (cdr (cdr (cdr props)))))) | |
111 (unless (fboundp 'buffer-substring-no-properties) | |
112 (defun buffer-substring-no-properties (beg end) | |
113 (format "%s" (buffer-substring beg end))))) | |
114 | |
115 ((boundp 'MULE) | |
116 (provide 'gnusutil)))) | |
117 | |
118 (eval-and-compile | |
119 (cond | |
120 ((not window-system) | |
121 (defun gnus-dummy-func (&rest args)) | |
122 (let ((funcs '(mouse-set-point set-face-foreground | |
123 set-face-background x-popup-menu))) | |
124 (while funcs | |
125 (unless (fboundp (car funcs)) | |
126 (fset (car funcs) 'gnus-dummy-func)) | |
127 (setq funcs (cdr funcs)))))) | |
128 (unless (fboundp 'file-regular-p) | |
129 (defun file-regular-p (file) | |
130 (and (not (file-directory-p file)) | |
131 (not (file-symlink-p file)) | |
132 (file-exists-p file)))) | |
133 (unless (fboundp 'face-list) | |
134 (defun face-list (&rest args)))) | |
135 | |
136 (eval-and-compile | |
137 (let ((case-fold-search t)) | |
138 (cond | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
139 ((string-match "windows-nt\\|os/2\\|emx\\|cygwin" |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
140 (symbol-name system-type)) |
17493 | 141 (setq nnheader-file-name-translation-alist |
142 (append nnheader-file-name-translation-alist | |
143 '((?: . ?_) | |
144 (?+ . ?-)))))))) | |
145 | |
146 (defvar gnus-tmp-unread) | |
147 (defvar gnus-tmp-replied) | |
148 (defvar gnus-tmp-score-char) | |
149 (defvar gnus-tmp-indentation) | |
150 (defvar gnus-tmp-opening-bracket) | |
151 (defvar gnus-tmp-lines) | |
152 (defvar gnus-tmp-name) | |
153 (defvar gnus-tmp-closing-bracket) | |
154 (defvar gnus-tmp-subject-or-nil) | |
155 | |
156 (defun gnus-ems-redefine () | |
157 (cond | |
158 ((string-match "XEmacs\\|Lucid" emacs-version) | |
159 (gnus-xmas-redefine)) | |
160 | |
161 ((featurep 'mule) | |
162 ;; Mule and new Emacs definitions | |
163 | |
164 ;; [Note] Now there are three kinds of mule implementations, | |
165 ;; original MULE, XEmacs/mule and beta version of Emacs including | |
166 ;; some mule features. Unfortunately these API are different. In | |
167 ;; particular, Emacs (including original MULE) and XEmacs are | |
168 ;; quite different. | |
169 ;; Predicates to check are following: | |
170 ;; (boundp 'MULE) is t only if MULE (original; anything older than | |
171 ;; Mule 2.3) is running. | |
172 ;; (featurep 'mule) is t when every mule variants are running. | |
173 | |
174 ;; These implementations may be able to share between original | |
175 ;; MULE and beta version of new Emacs. In addition, it is able to | |
176 ;; detect XEmacs/mule by (featurep 'mule) and to check variable | |
177 ;; `emacs-version'. In this case, implementation for XEmacs/mule | |
178 ;; may be able to share between XEmacs and XEmacs/mule. | |
179 | |
180 (defalias 'gnus-truncate-string 'truncate-string) | |
181 | |
182 (defvar gnus-summary-display-table nil | |
183 "Display table used in summary mode buffers.") | |
184 (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) | |
185 (fset 'gnus-max-width-function 'gnus-mule-max-width-function) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
186 (fset 'gnus-summary-set-display-table (lambda ())) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
187 (fset 'gnus-encode-coding-string 'encode-coding-string) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
188 (fset 'gnus-decode-coding-string 'decode-coding-string) |
17493 | 189 |
190 (when (boundp 'gnus-check-before-posting) | |
191 (setq gnus-check-before-posting | |
192 (delq 'long-lines | |
193 (delq 'control-chars gnus-check-before-posting)))) | |
194 | |
195 (defun gnus-summary-line-format-spec () | |
196 (insert gnus-tmp-unread gnus-tmp-replied | |
197 gnus-tmp-score-char gnus-tmp-indentation) | |
198 (put-text-property | |
199 (point) | |
200 (progn | |
201 (insert | |
202 gnus-tmp-opening-bracket | |
203 (format "%4d: %-20s" | |
204 gnus-tmp-lines | |
205 (if (> (length gnus-tmp-name) 20) | |
206 (truncate-string gnus-tmp-name 20) | |
207 gnus-tmp-name)) | |
208 gnus-tmp-closing-bracket) | |
209 (point)) | |
210 gnus-mouse-face-prop gnus-mouse-face) | |
211 (insert " " gnus-tmp-subject-or-nil "\n")) | |
19991
6a13c8143100
(gnus-ems-redefine): If the feature `mule' is
Kenichi Handa <handa@m17n.org>
parents:
19969
diff
changeset
|
212 |
20118
44afc898c138
(gnus-ems-redefine): Require `gnus-mule' only
Kenichi Handa <handa@m17n.org>
parents:
19991
diff
changeset
|
213 (when (and (boundp 'enable-multibyte-characters) |
44afc898c138
(gnus-ems-redefine): Require `gnus-mule' only
Kenichi Handa <handa@m17n.org>
parents:
19991
diff
changeset
|
214 enable-multibyte-characters) |
44afc898c138
(gnus-ems-redefine): Require `gnus-mule' only
Kenichi Handa <handa@m17n.org>
parents:
19991
diff
changeset
|
215 (require 'gnus-mule) |
44afc898c138
(gnus-ems-redefine): Require `gnus-mule' only
Kenichi Handa <handa@m17n.org>
parents:
19991
diff
changeset
|
216 (gnus-mule-initialize)) |
17493 | 217 ))) |
218 | |
219 (defun gnus-region-active-p () | |
220 "Say whether the region is active." | |
221 (and (boundp 'transient-mark-mode) | |
222 transient-mark-mode | |
223 (boundp 'mark-active) | |
224 mark-active)) | |
225 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
226 (defun gnus-add-minor-mode (mode name map) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
227 (if (fboundp 'add-minor-mode) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
228 (add-minor-mode mode name map) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
229 (set (make-local-variable mode) t) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
230 (unless (assq mode minor-mode-alist) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
231 (push `(,mode ,name) minor-mode-alist)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
232 (unless (assq mode minor-mode-map-alist) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
233 (push (cons mode map) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
234 minor-mode-map-alist)))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
235 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
236 (defun gnus-x-splash () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
237 "Show a splash screen using a pixmap in the current buffer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
238 (let ((dir (nnheader-find-etc-directory "gnus")) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
239 pixmap file height beg i) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
240 (save-excursion |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
241 (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
242 (let ((buffer-read-only nil)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
243 (erase-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
244 (when (and dir |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
245 (file-exists-p (setq file (concat dir "x-splash")))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
246 (nnheader-temp-write nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
247 (insert-file-contents file) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
248 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
249 (ignore-errors |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
250 (setq pixmap (read (current-buffer)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
251 (when pixmap |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
252 (erase-buffer) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
253 (unless (facep 'gnus-splash) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
254 (make-face 'gnus-splash)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
255 (setq height (/ (car pixmap) (frame-char-height)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
256 width (/ (cadr pixmap) (frame-char-width))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
257 (set-face-foreground 'gnus-splash "ForestGreen") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
258 (set-face-stipple 'gnus-splash pixmap) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
259 (insert-char ?\n (* (/ (window-height) 2 height) height)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
260 (setq i height) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
261 (while (> i 0) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
262 (insert-char ? (* (+ (/ (window-width) 2 width) 1) width)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
263 (setq beg (point)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
264 (insert-char ? width) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
265 (set-text-properties beg (point) '(face gnus-splash)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
266 (insert "\n") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
267 (decf i)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
268 (goto-char (point-min)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
269 (sit-for 0)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
270 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
271 (if (fboundp 'split-string) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
272 (fset 'gnus-split-string 'split-string) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
273 (defun gnus-split-string (string pattern) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
274 "Return a list of substrings of STRING which are separated by PATTERN." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
275 (let (parts (start 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
276 (while (string-match pattern string start) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
277 (setq parts (cons (substring string start (match-beginning 0)) parts) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
278 start (match-end 0))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
279 (nreverse (cons (substring string start) parts))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
20118
diff
changeset
|
280 |
17493 | 281 (provide 'gnus-ems) |
282 | |
283 ;; Local Variables: | |
284 ;; byte-compile-warnings: '(redefine callargs) | |
285 ;; End: | |
286 | |
287 ;;; gnus-ems.el ends here |