1 |
;;; mh-xemacs-compat.el --- GNU Emacs Functions needed by XEmacs |
;;; mh-xemacs-compat.el --- GNU Emacs Functions needed by XEmacs |
2 |
|
|
3 |
;; Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
;; Copyright (C) 2001, 02, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: FSF |
;; Author: FSF |
6 |
;; Maintainer: Bill Wohler <wohler@newt.com> |
;; Maintainer: Bill Wohler <wohler@newt.com> |
28 |
|
|
29 |
;;; Change Log: |
;;; Change Log: |
30 |
|
|
|
;; $Id$ |
|
|
|
|
31 |
;;; Code: |
;;; Code: |
32 |
|
|
33 |
;;; Some requires: |
;;; Some requires: |
34 |
(require 'rfc822) |
(require 'rfc822) |
35 |
|
|
36 |
|
(eval-when-compile (require 'mh-utils)) |
37 |
|
|
38 |
;;; Simple compatibility: |
;;; Simple compatibility: |
39 |
|
|
40 |
(unless (fboundp 'match-string-no-properties) |
(unless (fboundp 'match-string-no-properties) |
52 |
(unless (fboundp 'cancel-timer) |
(unless (fboundp 'cancel-timer) |
53 |
(defalias 'cancel-timer 'delete-itimer)) |
(defalias 'cancel-timer 'delete-itimer)) |
54 |
|
|
55 |
|
;; Set up the modeline glyph |
56 |
|
(defconst mh-modeline-logo |
57 |
|
"/* XPM */ |
58 |
|
static char * file[] = { |
59 |
|
\"18 13 2 1\", |
60 |
|
\"# c #666699\", |
61 |
|
\". c None s None\", |
62 |
|
\"........##........\", |
63 |
|
\".......####.......\", |
64 |
|
\"......######......\", |
65 |
|
\"......######......\", |
66 |
|
\"....#########.....\", |
67 |
|
\"..##############..\", |
68 |
|
\".##...######....#.\", |
69 |
|
\"##...#.#.####...#.\", |
70 |
|
\"....#..#.##.#...#.\", |
71 |
|
\"...#..##.#.#.#....\", |
72 |
|
\"...#..#..#..#.#...\", |
73 |
|
\"...#..#.##..#.##..\", |
74 |
|
\"...#..#.#..#....#.\"};" |
75 |
|
"The image for the modeline logo.") |
76 |
|
|
77 |
|
(mh-do-in-xemacs |
78 |
|
(defvar mh-modeline-glyph |
79 |
|
(progn |
80 |
|
(let* ((data mh-modeline-logo) |
81 |
|
(glyph (make-glyph |
82 |
|
(cond ((and (featurep 'xpm) |
83 |
|
(device-on-window-system-p) |
84 |
|
has-modeline-p) |
85 |
|
`[xpm :data ,data]) |
86 |
|
(t [string :data "MH-E"]))))) |
87 |
|
(set-glyph-face glyph 'modeline-buffer-id) |
88 |
|
glyph)) |
89 |
|
"Cute little logo to put in the modeline of MH-E buffers.")) |
90 |
|
|
91 |
(provide 'mh-xemacs-compat) |
(provide 'mh-xemacs-compat) |
92 |
|
|
93 |
;;; Local Variables: |
;;; Local Variables: |