Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-ems.el @ 108:360340f9fd5f r20-1b6
Import from CVS: tag r20-1b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:18:39 +0200 |
parents | 0d2f883870bc |
children | 7d55a9ba150c |
comparison
equal
deleted
inserted
replaced
107:523141596bda | 108:360340f9fd5f |
---|---|
33 "Non-nil if running under XEmacs.") | 33 "Non-nil if running under XEmacs.") |
34 | 34 |
35 (defvar gnus-mouse-2 [mouse-2]) | 35 (defvar gnus-mouse-2 [mouse-2]) |
36 (defvar gnus-down-mouse-2 [down-mouse-2]) | 36 (defvar gnus-down-mouse-2 [down-mouse-2]) |
37 | 37 |
38 (eval-and-compile | 38 (eval-and-compile |
39 (autoload 'gnus-xmas-define "gnus-xmas") | 39 (autoload 'gnus-xmas-define "gnus-xmas") |
40 (autoload 'gnus-xmas-redefine "gnus-xmas") | 40 (autoload 'gnus-xmas-redefine "gnus-xmas") |
41 (autoload 'appt-select-lowest-window "appt.el")) | 41 (autoload 'appt-select-lowest-window "appt.el")) |
42 | 42 |
43 (or (fboundp 'mail-file-babyl-p) | 43 (or (fboundp 'mail-file-babyl-p) |
69 (if (> (length valstr) (, max-width)) | 69 (if (> (length valstr) (, max-width)) |
70 (truncate-string valstr (, max-width)) | 70 (truncate-string valstr (, max-width)) |
71 valstr)))) | 71 valstr)))) |
72 | 72 |
73 (eval-and-compile | 73 (eval-and-compile |
74 (if gnus-xemacs | 74 (if (string-match "XEmacs\\|Lucid" emacs-version) |
75 nil | 75 nil |
76 | 76 |
77 (defvar gnus-mouse-face-prop 'mouse-face | 77 (defvar gnus-mouse-face-prop 'mouse-face |
78 "Property used for highlighting mouse regions.") | 78 "Property used for highlighting mouse regions.") |
79 | 79 |
81 "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -" | 81 "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -" |
82 "String or function to be executed to display an X-Face header. | 82 "String or function to be executed to display an X-Face header. |
83 If it is a string, the command will be executed in a sub-shell | 83 If it is a string, the command will be executed in a sub-shell |
84 asynchronously. The compressed face will be piped to this command.")) | 84 asynchronously. The compressed face will be piped to this command.")) |
85 | 85 |
86 (cond | 86 (cond |
87 ((string-match "XEmacs\\|Lucid" emacs-version) | 87 ((string-match "XEmacs\\|Lucid" emacs-version) |
88 (gnus-xmas-define)) | 88 (gnus-xmas-define)) |
89 | 89 |
90 ((or (not (boundp 'emacs-minor-version)) | 90 ((or (not (boundp 'emacs-minor-version)) |
91 (< emacs-minor-version 30)) | 91 (< emacs-minor-version 30)) |
97 (when props | 97 (when props |
98 (setcdr props (cdr (cdr (cdr props)))))) | 98 (setcdr props (cdr (cdr (cdr props)))))) |
99 (unless (fboundp 'buffer-substring-no-properties) | 99 (unless (fboundp 'buffer-substring-no-properties) |
100 (defun buffer-substring-no-properties (beg end) | 100 (defun buffer-substring-no-properties (beg end) |
101 (format "%s" (buffer-substring beg end))))) | 101 (format "%s" (buffer-substring beg end))))) |
102 | 102 |
103 ((boundp 'MULE) | 103 ((boundp 'MULE) |
104 (provide 'gnusutil)))) | 104 (provide 'gnusutil)))) |
105 | 105 |
106 (eval-and-compile | 106 (eval-and-compile |
107 (cond | 107 (cond |
139 (defvar gnus-tmp-name) | 139 (defvar gnus-tmp-name) |
140 (defvar gnus-tmp-closing-bracket) | 140 (defvar gnus-tmp-closing-bracket) |
141 (defvar gnus-tmp-subject-or-nil) | 141 (defvar gnus-tmp-subject-or-nil) |
142 | 142 |
143 (defun gnus-ems-redefine () | 143 (defun gnus-ems-redefine () |
144 (cond | 144 (cond |
145 ((string-match "XEmacs\\|Lucid" emacs-version) | 145 ((string-match "XEmacs\\|Lucid" emacs-version) |
146 (gnus-xmas-redefine)) | 146 (gnus-xmas-redefine)) |
147 | 147 |
148 ((featurep 'mule) | 148 ((featurep 'mule) |
149 ;; Mule and new Emacs definitions | 149 ;; Mule and new Emacs definitions |
150 | 150 |
151 ;; [Note] Now there are three kinds of mule implementations, | 151 ;; [Note] Now there are three kinds of mule implementations, |
152 ;; original MULE, XEmacs/mule and beta version of Emacs including | 152 ;; original MULE, XEmacs/mule and beta version of Emacs including |
153 ;; some mule features. Unfortunately these API are different. In | 153 ;; some mule features. Unfortunately these API are different. In |
154 ;; particular, Emacs (including original MULE) and XEmacs are | 154 ;; particular, Emacs (including original MULE) and XEmacs are |
155 ;; quite different. | 155 ;; quite different. |
156 ;; Predicates to check are following: | 156 ;; Predicates to check are following: |
157 ;; (boundp 'MULE) is t only if MULE (original; anything older than | 157 ;; (boundp 'MULE) is t only if MULE (original; anything older than |
158 ;; Mule 2.3) is running. | 158 ;; Mule 2.3) is running. |
159 ;; (featurep 'mule) is t when every mule variants are running. | 159 ;; (featurep 'mule) is t when every mule variants are running. |
160 | 160 |
161 ;; These implementations may be able to share between original | 161 ;; These implementations may be able to share between original |
162 ;; MULE and beta version of new Emacs. In addition, it is able to | 162 ;; MULE and beta version of new Emacs. In addition, it is able to |
163 ;; detect XEmacs/mule by (featurep 'mule) and to check variable | 163 ;; detect XEmacs/mule by (featurep 'mule) and to check variable |
164 ;; `emacs-version'. In this case, implementation for XEmacs/mule | 164 ;; `emacs-version'. In this case, implementation for XEmacs/mule |
165 ;; may be able to share between XEmacs and XEmacs/mule. | 165 ;; may be able to share between XEmacs and XEmacs/mule. |
166 | 166 |
167 (defalias 'gnus-truncate-string 'truncate-string) | 167 (defalias 'gnus-truncate-string 'truncate-string) |
168 | 168 |
169 (defvar gnus-summary-display-table nil | 169 (defvar gnus-summary-display-table nil |
170 "Display table used in summary mode buffers.") | 170 "Display table used in summary mode buffers.") |
171 (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) | 171 (fset 'gnus-cite-add-face 'gnus-mule-cite-add-face) |
172 (fset 'gnus-max-width-function 'gnus-mule-max-width-function) | 172 (fset 'gnus-max-width-function 'gnus-mule-max-width-function) |
173 | 173 |
174 (when (boundp 'gnus-check-before-posting) | 174 (when (boundp 'gnus-check-before-posting) |
175 (setq gnus-check-before-posting | 175 (setq gnus-check-before-posting |
176 (delq 'long-lines | 176 (delq 'long-lines |
177 (delq 'control-chars gnus-check-before-posting)))) | 177 (delq 'control-chars gnus-check-before-posting)))) |
178 | 178 |
179 (defun gnus-summary-line-format-spec () | 179 (defun gnus-summary-line-format-spec () |
180 (insert gnus-tmp-unread gnus-tmp-replied | 180 (insert gnus-tmp-unread gnus-tmp-replied |
181 gnus-tmp-score-char gnus-tmp-indentation) | 181 gnus-tmp-score-char gnus-tmp-indentation) |
182 (put-text-property | 182 (put-text-property |
183 (point) | 183 (point) |
184 (progn | 184 (progn |
185 (insert | 185 (insert |
186 gnus-tmp-opening-bracket | 186 gnus-tmp-opening-bracket |
187 (format "%4d: %-20s" | 187 (format "%4d: %-20s" |
188 gnus-tmp-lines | 188 gnus-tmp-lines |
189 (if (> (length gnus-tmp-name) 20) | 189 (if (> (length gnus-tmp-name) 20) |
190 (truncate-string gnus-tmp-name 20) | 190 (truncate-string gnus-tmp-name 20) |
191 gnus-tmp-name)) | 191 gnus-tmp-name)) |
192 gnus-tmp-closing-bracket) | 192 gnus-tmp-closing-bracket) |
193 (point)) | 193 (point)) |