annotate lisp/glyphs.el @ 428:3ecd8885ac67 r21-2-22

Import from CVS: tag r21-2-22
author cvs
date Mon, 13 Aug 2007 11:28:15 +0200
parents
children abe6d1db359e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; glyphs.el --- Lisp interface to C glyphs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1994, 1997 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995, 1996 Ben Wing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Author: Chuck Thompson <cthomp@cs.uiuc.edu>, Ben Wing <ben@xemacs.org>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Keywords: extensions, internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Free Software Foundation, 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Synched up with: Not in FSF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; This file is dumped with XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; font specifiers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 (defun make-image-specifier (spec-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 "Return a new `image' specifier object with the specification list SPEC-LIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 SPEC-LIST can be a list of specifications (each of which is a cons of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 locale and a list of instantiators), a single instantiator, or a list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 of instantiators. See `make-specifier' for more information about
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 specifiers."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (make-specifier-and-init 'image spec-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; glyphs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (defconst built-in-glyph-specifiers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 '(image contrib-p baseline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 "A list of the built-in face properties that are specifiers.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (defun glyph-property (glyph property &optional locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 "Return GLYPH's value of PROPERTY in LOCALE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 If LOCALE is omitted, the GLYPH's actual value for PROPERTY will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 returned. For built-in properties, this will be a specifier object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 of a type appropriate to the property (e.g. a font or color
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 specifier). For other properties, this could be anything.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 If LOCALE is supplied, then instead of returning the actual value,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 the specification(s) for the given locale or locale type will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 be returned. This will only work if the actual value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 PROPERTY is a specifier (this will always be the case for built-in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 properties, but not or not may apply to user-defined properties).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 If the actual value of PROPERTY is not a specifier, this value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 will simply be returned regardless of LOCALE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 The return value will be a list of instantiators (e.g. strings
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 specifying a font or color name), or a list of specifications, each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 of which is a cons of a locale and a list of instantiators.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 Specifically, if LOCALE is a particular locale (a buffer, window,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 frame, device, or 'global), a list of instantiators for that locale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 will be returned. Otherwise, if LOCALE is a locale type (one of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 the symbols 'buffer, 'window, 'frame, 'device, 'device-class, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 'device-type), the specifications for all locales of that type will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 be returned. Finally, if LOCALE is 'all, the specifications for all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 locales of all types will be returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 The specifications in a specifier determine what the value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 PROPERTY will be in a particular \"domain\" or set of circumstances,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 which is typically a particular Emacs window along with the buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 it contains and the frame and device it lies within. The value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 is derived from the instantiator associated with the most specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 locale (in the order buffer, window, frame, device, and 'global)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 that matches the domain in question. In other words, given a domain
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (i.e. an Emacs window, usually), the specifier for PROPERTY will first
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 be searched for a specification whose locale is the buffer contained
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 within that window; then for a specification whose locale is the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 itself; then for a specification whose locale is the frame that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 window is contained within; etc. The first instantiator that is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 valid for the domain (usually this means that the instantiator is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 recognized by the device [i.e. the X server or TTY device] that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 domain is on. The function `glyph-property-instance' actually does
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 all this, and is used to determine how to display the glyph.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 See `set-glyph-property' for the built-in property-names."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (check-argument-type 'glyphp glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (let ((value (get glyph property)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (if (and locale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (or (memq property built-in-glyph-specifiers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (specifierp value)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (setq value (specifier-specs value locale)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 value))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (defun convert-glyph-property-into-specifier (glyph property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 "Convert PROPERTY on GLYPH into a specifier, if it's not already."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (check-argument-type 'glyphp glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 (let ((specifier (get glyph property)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 ;; if a user-property does not have a specifier but a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 ;; locale was specified, put a specifier there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 ;; If there was already a value there, convert it to a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 ;; specifier with the value as its 'global instantiator.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 (if (not (specifierp specifier))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 (let ((new-specifier (make-specifier 'generic)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (if (or (not (null specifier))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 ;; make sure the nil returned from `get' wasn't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 ;; actually the value of the property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (null (get glyph property t)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (add-spec-to-specifier new-specifier specifier))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (setq specifier new-specifier)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (put glyph property specifier)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 (defun glyph-property-instance (glyph property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 &optional domain default no-fallback)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 "Return the instance of GLYPH's PROPERTY in the specified DOMAIN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 Under most circumstances, DOMAIN will be a particular window,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 and the returned instance describes how the specified property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 actually is displayed for that window and the particular buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 in it. Note that this may not be the same as how the property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 appears when the buffer is displayed in a different window or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 frame, or how the property appears in the same window if you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 switch to another buffer in that window; and in those cases,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 the returned instance would be different.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 DOMAIN defaults to the selected window if omitted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 DOMAIN can be a frame or device, instead of a window. The value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 returned for a such a domain is used in special circumstances
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 when a more specific domain does not apply; for example, a frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 value might be used for coloring a toolbar, which is conceptually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 attached to a frame rather than a particular window. The value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 is also useful in determining what the value would be for a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 particular window within the frame or device, if it is not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 overridden by a more specific specification.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 If PROPERTY does not name a built-in property, its value will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 simply be returned unless it is a specifier object, in which case
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 it will be instanced using `specifier-instance'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 Optional arguments DEFAULT and NO-FALLBACK are the same as in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 `specifier-instance'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 (check-argument-type 'glyphp glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (let ((value (get glyph property)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (if (specifierp value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 (setq value (specifier-instance value domain default no-fallback)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 value))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 (defun set-glyph-property (glyph property value &optional locale tag-set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 how-to-add)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 "Change a property of a GLYPH.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 NOTE: If you want to remove a property from a glyph, use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 `remove-glyph-property' rather than attempting to set a value of nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 for the property.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 For built-in properties, the actual value of the property is a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 specifier and you cannot change this; but you can change the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 specifications within the specifier, and that is what this function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 will do. For user-defined properties, you can use this function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 to either change the actual value of the property or, if this value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 is a specifier, change the specifications within it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 If PROPERTY is a built-in property, the specifications to be added to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 this property can be supplied in many different ways:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 -- If VALUE is a simple instantiator (e.g. a string naming a font or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 color) or a list of instantiators, then the instantiator(s) will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 be added as a specification of the property for the given LOCALE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 (which defaults to 'global if omitted).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 -- If VALUE is a list of specifications (each of which is a cons of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 a locale and a list of instantiators), then LOCALE must be nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 (it does not make sense to explicitly specify a locale in this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 case), and specifications will be added as given.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 -- If VALUE is a specifier (as would be returned by `glyph-property'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 if no LOCALE argument is given), then some or all of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 specifications in the specifier will be added to the property.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 In this case, the function is really equivalent to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 `copy-specifier' and LOCALE has the same semantics (if it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 a particular locale, the specification for the locale will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 copied; if a locale type, specifications for all locales of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 that type will be copied; if nil or 'all, then all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 specifications will be copied).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 HOW-TO-ADD should be either nil or one of the symbols 'prepend,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 'append, 'remove-tag-set-prepend, 'remove-tag-set-append, 'remove-locale,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 'remove-locale-type, or 'remove-all. See `copy-specifier' and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 `add-spec-to-specifier' for a description of what each of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 these means. Most of the time, you do not need to worry about
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 this argument; the default behavior usually is fine.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 In general, it is OK to pass an instance object (e.g. as returned
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 by `glyph-property-instance') as an instantiator in place of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 an actual instantiator. In such a case, the instantiator used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 to create that instance object will be used (for example, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 you set a font-instance object as the value of the 'font
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 property, then the font name used to create that object will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 be used instead). If some cases, however, doing this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 conversion does not make sense, and this will be noted in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 the documentation for particular types of instance objects.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 If PROPERTY is not a built-in property, then this function will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 simply set its value if LOCALE is nil. However, if LOCALE is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 given, then this function will attempt to add VALUE as the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 instantiator for the given LOCALE, using `add-spec-to-specifier'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 If the value of the property is not a specifier, it will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 automatically be converted into a 'generic specifier.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 The following symbols have predefined meanings:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 image The image used to display the glyph.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 baseline Percent above baseline that glyph is to be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 displayed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 contrib-p Whether the glyph contributes to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 height of the line it's on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 face Face of this glyph (*not* a specifier)."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (check-argument-type 'glyphp glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 (if (memq property built-in-glyph-specifiers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 (set-specifier (get glyph property) value locale tag-set how-to-add)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 ;; This section adds user defined properties.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 (if (not locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 (put glyph property value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 (convert-glyph-property-into-specifier glyph property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 (add-spec-to-specifier (get glyph property) value locale tag-set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 how-to-add)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 (defun remove-glyph-property (glyph property &optional locale tag-set exact-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 "Remove a property from a glyph.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 For built-in properties, this is analogous to `remove-specifier'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 See `remove-specifier' for the meaning of the LOCALE, TAG-SET, and EXACT-P
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 arguments."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 (or locale (setq locale 'all))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 (if (memq property built-in-glyph-specifiers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 (remove-specifier (glyph-property glyph property) locale tag-set exact-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (if (eq locale 'all)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 (remprop glyph property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (convert-glyph-property-into-specifier glyph property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 (remove-specifier (glyph-property glyph property) locale tag-set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 exact-p))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 (defun glyph-face (glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 "Return the face of GLYPH."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 (glyph-property glyph 'face))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 (defun set-glyph-face (glyph face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 "Change the face of GLYPH to FACE."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 ; (interactive (glyph-interactive "face"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 (set-glyph-property glyph 'face face))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (defun glyph-image (glyph &optional locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 "Return the image of GLYPH in LOCALE, or nil if it is unspecified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 LOCALE may be a locale (the instantiators for that particular locale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 will be returned), a locale type (the specifications for all locales
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 of that type will be returned), 'all (all specifications will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 returned), or nil (the actual specifier object will be returned).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 See `glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 (glyph-property glyph 'image locale))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 (defun glyph-image-instance (glyph &optional domain default no-fallback)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 "Return the instance of GLYPH's image in DOMAIN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 Normally DOMAIN will be a window or nil (meaning the selected window),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 and an instance object describing how the image appears in that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 particular window and buffer will be returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 See `glyph-property-instance' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 (glyph-property-instance glyph 'image domain default no-fallback))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 (defun set-glyph-image (glyph spec &optional locale tag-set how-to-add)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 "Change the image of GLYPH in LOCALE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 SPEC should be an instantiator (a string or vector; see
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 `image-specifier-p' for a description of possible values here),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 a list of (possibly tagged) instantiators, an alist of specifications
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 (each mapping a locale to an instantiator list), or an image specifier
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 If SPEC is an alist, LOCALE must be omitted. If SPEC is a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 specifier object, LOCALE can be a locale, a locale type, 'all,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 or nil; see `copy-specifier' for its semantics. Otherwise LOCALE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 specifies the locale under which the specified instantiator(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 will be added, and defaults to 'global.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 See `set-glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 ; (interactive (glyph-interactive "image"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (set-glyph-property glyph 'image spec locale tag-set how-to-add))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 (defun glyph-contrib-p (glyph &optional locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 "Return whether GLYPH contributes to its line height.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 LOCALE may be a locale (the instantiators for that particular locale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 will be returned), a locale type (the specifications for all locales
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 of that type will be returned), 'all (all specifications will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 returned), or nil (the actual specifier object will be returned).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 See `glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (glyph-property glyph 'contrib-p locale))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 (defun glyph-contrib-p-instance (glyph &optional domain default no-fallback)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 "Return the instance of GLYPH's 'contrib-p property in DOMAIN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 Normally DOMAIN will be a window or nil (meaning the selected window),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 and an instance object describing what the 'contrib-p property is in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 that particular window and buffer will be returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 See `glyph-property-instance' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 (glyph-property-instance glyph 'contrib-p domain default no-fallback))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 (defun set-glyph-contrib-p (glyph spec &optional locale tag-set how-to-add)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 "Change the contrib-p property of GLYPH in LOCALE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 SPEC should be an instantiator (t or nil), a list of (possibly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 tagged) instantiators, an alist of specifications (each mapping a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 locale to an instantiator list), or a boolean specifier object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 If SPEC is an alist, LOCALE must be omitted. If SPEC is a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 specifier object, LOCALE can be a locale, a locale type, 'all,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 or nil; see `copy-specifier' for its semantics. Otherwise LOCALE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 specifies the locale under which the specified instantiator(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 will be added, and defaults to 'global.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 See `set-glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 ; (interactive (glyph-interactive "contrib-p"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 (set-glyph-property glyph 'contrib-p spec locale tag-set how-to-add))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 (defun glyph-baseline (glyph &optional locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 "Return the baseline of GLYPH in LOCALE, or nil if it is unspecified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 LOCALE may be a locale (the instantiators for that particular locale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 will be returned), a locale type (the specifications for all locales
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 of that type will be returned), 'all (all specifications will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 returned), or nil (the actual specifier object will be returned).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 See `glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 (glyph-property glyph 'baseline locale))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 (defun glyph-baseline-instance (glyph &optional domain default no-fallback)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 "Return the instance of GLYPH's baseline in DOMAIN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 Normally DOMAIN will be a window or nil (meaning the selected window),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 and an integer or nil (specifying the baseline in that particular
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 window and buffer) will be returned.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 See `glyph-property-instance' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 (glyph-property-instance glyph 'baseline domain default no-fallback))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 (defun set-glyph-baseline (glyph spec &optional locale tag-set how-to-add)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 "Change the baseline of GLYPH to SPEC in LOCALE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 SPEC should be an instantiator (an integer [a percentage above the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 baseline of the line the glyph is on] or nil), a list of (possibly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 tagged) instantiators, an alist of specifications (each mapping a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 locale to an instantiator list), or a generic specifier object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 If SPEC is an alist, LOCALE must be omitted. If SPEC is a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 specifier object, LOCALE can be a locale, a locale type, 'all,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 or nil; see `copy-specifier' for its semantics. Otherwise LOCALE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 specifies the locale under which the specified instantiator(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 will be added, and defaults to 'global.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 See `set-glyph-property' for more information."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 ; (interactive (glyph-interactive "baseline"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 (set-glyph-property glyph 'baseline spec locale tag-set how-to-add))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 (defun make-glyph (&optional spec-list type)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 "Return a new `glyph' object of type TYPE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 TYPE should be one of `buffer' (used for glyphs in an extent, the modeline,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 the toolbar, or elsewhere in a buffer), `pointer' (used for the mouse-pointer),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 or `icon' (used for a frame's icon), and defaults to `buffer'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 SPEC-LIST is used to initialize the glyph's image. It is typically an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 image instantiator (a string or a vector; see `image-specifier-p' for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 a detailed description of the valid image instantiators), but can also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 be a list of such instantiators (each one in turn is tried until an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 image is successfully produced), a cons of a locale (frame, buffer, etc.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 and an instantiator, a list of such conses, or any other form accepted
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 by `canonicalize-spec-list'. See `make-specifier' for more information
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 about specifiers."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 (let ((glyph (make-glyph-internal type)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 (and spec-list (set-glyph-image glyph spec-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 glyph))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (defun buffer-glyph-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 "Return t if OBJECT is a glyph of type `buffer'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 (and (glyphp object) (eq 'buffer (glyph-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 (defun pointer-glyph-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 "Return t if OBJECT is a glyph of type `pointer'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 (and (glyphp object) (eq 'pointer (glyph-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 (defun icon-glyph-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 "Return t if OBJECT is a glyph of type `icon'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 (and (glyphp object) (eq 'icon (glyph-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 (defun make-pointer-glyph (&optional spec-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 "Return a new `pointer-glyph' object with the specification list SPEC-LIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 This is equivalent to calling `make-glyph', specifying a type of `pointer'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 SPEC-LIST is used to initialize the glyph's image. It is typically an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 image instantiator (a string or a vector; see `image-specifier-p' for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 a detailed description of the valid image instantiators), but can also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 be a list of such instantiators (each one in turn is tried until an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 image is successfully produced), a cons of a locale (frame, buffer, etc.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 and an instantiator, a list of such conses, or any other form accepted
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 by `canonicalize-spec-list'. See `make-specifier' for more information
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 about specifiers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 You can also create a glyph with an empty SPEC-LIST and add image
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 instantiators afterwards using `set-glyph-image'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 (make-glyph spec-list 'pointer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 (defun make-icon-glyph (&optional spec-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 "Return a new `icon-glyph' object with the specification list SPEC-LIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 This is equivalent to calling `make-glyph', specifying a type of `icon'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 SPEC-LIST is used to initialize the glyph's image. It is typically an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 image instantiator (a string or a vector; see `image-specifier-p' for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 a detailed description of the valid image instantiators), but can also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 be a list of such instantiators (each one in turn is tried until an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 image is successfully produced), a cons of a locale (frame, buffer, etc.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 and an instantiator, a list of such conses, or any other form accepted
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 by `canonicalize-spec-list'. See `make-specifier' for more information
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 about specifiers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 You can also create a glyph with an empty SPEC-LIST and add image
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 instantiators afterwards using `set-glyph-image'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 (make-glyph spec-list 'icon))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 (defun nothing-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 "Return t if OBJECT is an image instance of type `nothing'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451 (and (image-instance-p object) (eq 'nothing (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 (defun text-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 "Return t if OBJECT is an image instance of type `text'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 (and (image-instance-p object) (eq 'text (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 (defun mono-pixmap-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 "Return t if OBJECT is an image instance of type `mono-pixmap'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 (and (image-instance-p object) (eq 'mono-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 (defun color-pixmap-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 "Return t if OBJECT is an image instance of type `color-pixmap'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 (and (image-instance-p object) (eq 'color-pixmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 (defun pointer-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 "Return t if OBJECT is an image instance of type `pointer'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 (and (image-instance-p object) (eq 'pointer (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 (defun subwindow-image-instance-p (object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 "Return t if OBJECT is an image instance of type `subwindow'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 Subwindows are not implemented in this version of XEmacs."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 (and (image-instance-p object) (eq 'subwindow (image-instance-type object))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 ;;;;;;;;;; the built-in glyphs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 (defvar text-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 "*The shape of the mouse-pointer when over text.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 This is a glyph; use `set-glyph-image' to change it.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 (set-glyph-face text-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 (defvar nontext-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 "*The shape of the mouse-pointer when over a buffer, but not over text.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 If unspecified in a particular domain, `text-pointer-glyph' is used.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 (set-glyph-face nontext-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 (defvar modeline-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 "*The shape of the mouse-pointer when over the modeline.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 (set-glyph-face modeline-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 (defvar selection-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 "*The shape of the mouse-pointer when over a selectable text region.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 If unspecified in a particular domain, `text-pointer-glyph' is used.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 (set-glyph-face selection-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 (defvar busy-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 "*The shape of the mouse-pointer when XEmacs is busy.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 If unspecified in a particular domain, the pointer is not changed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 when XEmacs is busy.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 (set-glyph-face busy-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 (defvar toolbar-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 "*The shape of the mouse-pointer when over a toolbar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 (set-glyph-face toolbar-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 (defvar divider-pointer-glyph (make-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 "*The shape of the mouse-pointer when over a window divider.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 This is a glyph; use `set-glyph-image' to change it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 (set-glyph-face divider-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 ;; The following three are in C.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 (if (featurep 'menubar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 (set-glyph-face menubar-pointer-glyph 'pointer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 (if (featurep 'scrollbar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 (set-glyph-face scrollbar-pointer-glyph 'pointer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 (set-glyph-face gc-pointer-glyph 'pointer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 ;; Now add the magic access/set behavior.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 (defun dontusethis-set-value-glyph-handler (sym args fun harg handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 (error "Use `set-glyph-image' to set `%s'" sym))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 (defun dontusethis-make-unbound-glyph-handler (sym args fun harg handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 (error "Can't `makunbound' `%s'" sym))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 (defun dontusethis-make-local-glyph-handler (sym args fun harg handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 (error "Use `set-glyph-image' to make local values for `%s'" sym))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 (defun define-constant-glyph (sym)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 (dontusethis-set-symbol-value-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 sym 'set-value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 'dontusethis-set-value-glyph-handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 (dontusethis-set-symbol-value-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 sym 'make-unbound
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 'dontusethis-make-unbound-glyph-handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 (dontusethis-set-symbol-value-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 sym 'make-local
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 'dontusethis-make-local-glyph-handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
546 ;; Make frame properties magically work with glyph variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547 (put sym 'const-glyph-variable t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 (define-constant-glyph 'text-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 (define-constant-glyph 'nontext-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 (define-constant-glyph 'modeline-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 (define-constant-glyph 'selection-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553 (define-constant-glyph 'busy-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 (define-constant-glyph 'gc-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555 (define-constant-glyph 'divider-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 (define-constant-glyph 'toolbar-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557 (define-constant-glyph 'menubar-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 (define-constant-glyph 'scrollbar-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 (define-constant-glyph 'octal-escape-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561 (define-constant-glyph 'control-arrow-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562 (define-constant-glyph 'invisible-text-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563 (define-constant-glyph 'hscroll-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 (define-constant-glyph 'truncation-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 (define-constant-glyph 'continuation-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 (define-constant-glyph 'frame-icon-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
568
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569 ;; backwards compatibility garbage
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 (defun dontusethis-old-pointer-shape-handler (sym args fun harg handler)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 (let ((value (car args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 (if (null value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
574 (remove-specifier harg 'global)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
575 (set-glyph-image (symbol-value harg) value))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
577 ;; It might or might not be garbage, but it's rude. Make these
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578 ;; 'compatible instead of 'obsolete. -slb
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
579 (defun define-obsolete-pointer-glyph (old new)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 (define-compatible-variable-alias old new)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 (dontusethis-set-symbol-value-handler
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582 old 'set-value 'dontusethis-old-pointer-shape-handler new))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584 ;;; (defvar x-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 (define-obsolete-pointer-glyph 'x-pointer-shape 'text-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 ;;; (defvar x-nontext-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588 (define-obsolete-pointer-glyph 'x-nontext-pointer-shape 'nontext-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590 ;;; (defvar x-mode-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 (define-obsolete-pointer-glyph 'x-mode-pointer-shape 'modeline-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 ;;; (defvar x-selection-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594 (define-obsolete-pointer-glyph 'x-selection-pointer-shape
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 'selection-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 ;;; (defvar x-busy-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 (define-obsolete-pointer-glyph 'x-busy-pointer-shape 'busy-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 ;;; (defvar x-gc-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601 (define-obsolete-pointer-glyph 'x-gc-pointer-shape 'gc-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603 ;;; (defvar x-toolbar-pointer-shape nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 (define-obsolete-pointer-glyph 'x-toolbar-pointer-shape 'toolbar-pointer-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606 ;; for subwindows
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607 (defalias 'subwindow-xid 'image-instance-subwindow-id)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608 (defalias 'subwindow-width 'image-instance-width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 (defalias 'subwindow-height 'image-instance-height)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610 ;;;;;;;;;; initialization
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 (defun init-glyphs ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613 ;; initialize default image types
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 (if (featurep 'x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 (set-console-type-image-conversion-list 'x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 `(,@(if (featurep 'xpm) '(("\\.xpm\\'" [xpm :file nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 ("\\.xbm\\'" [xbm :file nil] 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618 ,@(if (featurep 'xpm) '(("\\`/\\* XPM \\*/" [xpm :data nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 ,@(if (featurep 'xface) '(("\\`X-Face:" [xface :data nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 ,@(if (featurep 'gif) '(("\\.gif\\'" [gif :file nil] 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621 ("\\`GIF8[79]" [gif :data nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 ,@(if (featurep 'jpeg) '(("\\.jpe?g\\'" [jpeg :file nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 ;; all of the JFIF-format JPEG's that I've seen begin with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624 ;; the following. I have no idea if this is standard.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 ,@(if (featurep 'jpeg) '(("\\`\377\330\377\340\000\020JFIF"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626 [jpeg :data nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
627 ,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 ,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629 ("" [autodetect :data nil] 2))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 ;; #### this should really be formatted-string, not string but we
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 ;; don't have it implemented yet
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 ;; #define could also mean a bitmap as well as a version 1 XPM. Who
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634 ;; cares. We don't want the file contents getting converted to a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635 ;; string in either case which is why the entry is there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 (if (featurep 'tty)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
637 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 (set-console-type-image-conversion-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 'tty
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640 '(("^#define" [string :data "[xpm]"])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 ("\\`X-Face:" [string :data "[xface]"])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
642 ("\\`/\\* XPM \\*/" [string :data "[xpm]"])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643 ("\\`GIF87" [string :data "[gif]"])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 ("\\`\377\330\340\000\020JFIF" [string :data "[jpeg]"])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 ("" [string :data nil] 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 ;; this last one is here for pointers and icons and such --
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647 ;; strings are not allowed so they will be ignored.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648 ("" [nothing])))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650 ;; finish initializing truncation glyph -- created internally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651 ;; because it has a built-in bitmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 (set-glyph-image truncation-glyph "$" 'global 'tty)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654 ;; finish initializing continuation glyph -- created internally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
655 ;; because it has a built-in bitmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656 (set-glyph-image continuation-glyph "\\" 'global 'tty)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
658 ;; finish initializing hscroll glyph -- created internally
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
659 ;; because it has a built-in bitmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
660 (set-glyph-image hscroll-glyph "$" 'global 'tty)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
661
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662 (set-glyph-image octal-escape-glyph "\\")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
663 (set-glyph-image control-arrow-glyph "^")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
664 (set-glyph-image invisible-text-glyph " ...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
665 ;; (set-glyph-image hscroll-glyph "$")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667 (let ((face (make-face 'border-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 "Truncation and continuation glyphs face")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 (set-glyph-face continuation-glyph face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
670 (set-glyph-face truncation-glyph face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
671 (set-glyph-face hscroll-glyph face))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673 ;; finish initializing xemacs logo -- created internally because it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 ;; has a built-in bitmap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 (if (featurep 'xpm)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 (set-glyph-image xemacs-logo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
677 (concat "../etc/"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
678 (if emacs-beta-version
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 "xemacs-beta.xpm"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 "xemacs.xpm"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 'global 'x))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 (cond ((featurep 'xpm)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683 (set-glyph-image frame-icon-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684 (concat "../etc/" "xemacs-icon.xpm")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
685 'global 'x))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
686 ((featurep 'x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 (set-glyph-image frame-icon-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688 (concat "../etc/" "xemacs-icon2.xbm")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689 'global 'x)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691 (if (featurep 'tty)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692 (set-glyph-image xemacs-logo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 "XEmacs <insert spiffy graphic logo here>"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 'global 'tty))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 (init-glyphs)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 ;;; glyphs.el ends here.