annotate lisp/prim/obsolete.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents cf808b4c4290
children fe104dbd9147
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; obsolete.el --- obsoleteness support.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;;; Copyright (C) 1985-1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;;;; Copyright (C) 1994, 1995 Amdahl Corporation.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;;; Copyright (C) 1995 Sun Microsystems.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Maintainer: XEmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; Keywords: internal
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 0
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents: 38
diff changeset
24 ;; Free Software Foundation, 59 Temple Place - Suite 330,
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 0
diff changeset
25 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; The obsoleteness support used to be scattered throughout various
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;; source files. We put the stuff in one place to remove the junkiness
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; from other source files and to facilitate creating/updating things
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; like sysdep.el.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;;; Synched up with: Not in FSF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 (defsubst define-obsolete-function-alias (oldfun newfun)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 "Define OLDFUN as an obsolete alias for function NEWFUN.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 as obsolete."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (define-function oldfun newfun)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (make-obsolete oldfun newfun))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
41 (defsubst define-compatible-function-alias (oldfun newfun)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
42 "Define OLDFUN as a compatible alias for function NEWFUN.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
43 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
44 as provided for compatibility only."
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
45 (define-function oldfun newfun)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
46 (make-compatible oldfun newfun))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
47
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (defsubst define-obsolete-variable-alias (oldvar newvar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 "Define OLDVAR as an obsolete alias for varction NEWVAR.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 This makes referencing or setting OLDVAR equivalent to referencing or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 setting NEWVAR and marks OLDVAR as obsolete."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (defvaralias oldvar newvar)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (make-obsolete-variable oldvar newvar))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
55 (defsubst define-compatible-variable-alias (oldvar newvar)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
56 "Define OLDVAR as a compatible alias for varction NEWVAR.
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
57 This makes referencing or setting OLDVAR equivalent to referencing or
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
58 setting NEWVAR and marks OLDVAR as provided for compatibility only."
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
59 (defvaralias oldvar newvar)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
60 (make-compatible-variable oldvar newvar))
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
61
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 104
diff changeset
64 (make-compatible-variable 'window-system "use (console-type)")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (make-obsolete-variable 'meta-flag
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 "use the `set-input-mode' function instead.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (defun x-display-color-p (&optional device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 "Returns non-nil if DEVICE is a color device."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (eq 'color (device-class device)))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
71 (make-compatible 'x-display-color-p 'device-class)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (define-function 'x-color-display-p 'x-display-color-p)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
74 (make-compatible 'x-display-color-p 'device-class)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (defun x-display-grayscale-p (&optional device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 "Returns non-nil if DEVICE is a grayscale device."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (eq 'grayscale (device-class device)))
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
79 (make-compatible 'x-display-grayscale-p 'device-class)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (define-function 'x-grayscale-display-p 'x-display-grayscale-p)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
82 (make-compatible 'x-display-grayscale-p 'device-class)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
84 (define-compatible-function-alias 'x-display-pixel-width 'device-pixel-width)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
85 (define-compatible-function-alias 'x-display-pixel-height
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 'device-pixel-height)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
87 (define-compatible-function-alias 'x-display-planes 'device-bitplanes)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
88 (define-compatible-function-alias 'x-display-color-cells 'device-color-cells)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 (define-obsolete-function-alias 'baud-rate 'device-baud-rate)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (define-obsolete-function-alias 'menu-event-p 'misc-user-event-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (make-obsolete-variable 'unread-command-char 'unread-command-events)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (make-obsolete 'sleep-for-millisecs "use sleep-for with a float")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; extents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (defun extent-data (extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 "Obsolete. Returns the `data' property of the given extent."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (extent-property extent 'data))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (make-obsolete 'set-window-dot 'set-window-point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (defun set-extent-data (extent data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 "Obsolete. Sets the `data' property of the given extent."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (set-extent-property extent 'data data))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (make-obsolete 'set-extent-data 'set-extent-property)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (define-obsolete-function-alias 'extent-buffer 'extent-object)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 (defun set-extent-attribute (extent attr &optional clearp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 "" ;; obsoleteness info will be displayed, so no need for anything more.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (cond ((eq attr 'write-protected)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 (set-extent-property extent 'read-only t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 ((eq attr 'unhighlight)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 (set-extent-property extent 'mouse-face nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 ((eq attr 'writable)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (set-extent-property extent 'read-only nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ((eq attr 'visible)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (set-extent-property extent 'invisible nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (set-extent-property extent attr t))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (make-obsolete 'set-extent-attribute 'set-extent-property)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (defun extent-glyph (extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 "" ;; obsoleteness info will be displayed, so no need for anything more.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (or (extent-begin-glyph extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (extent-end-glyph extent)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (make-obsolete 'extent-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 "use `extent-begin-glyph' or `extent-end-glyph' instead.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (defun extent-layout (extent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 "" ;; obsoleteness info will be displayed, so no need for anything more.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (extent-begin-glyph-layout extent))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (make-obsolete 'extent-layout
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 "use `extent-begin-glyph-layout' or `extent-end-glyph-layout' instead.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (defun set-extent-layout (extent layout)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 "" ;; obsoleteness info will be displayed, so no need for anything more.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (set-extent-begin-glyph-layout extent layout))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (make-obsolete 'set-extent-layout
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 "use `set-extent-begin-glyph-layout' or `set-extent-end-glyph-layout' instead.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; frames
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (define-obsolete-variable-alias 'select-screen-hook 'select-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (define-obsolete-variable-alias 'deselect-screen-hook 'deselect-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (define-obsolete-variable-alias 'auto-raise-screen 'auto-raise-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (define-obsolete-variable-alias 'auto-lower-screen 'auto-lower-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (define-obsolete-variable-alias 'get-screen-for-buffer-default-screen-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 'get-frame-for-buffer-default-frame-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (define-obsolete-function-alias 'buffer-dedicated-screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 'buffer-dedicated-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (define-obsolete-function-alias 'deiconify-screen 'deiconify-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (define-obsolete-function-alias 'delete-screen 'delete-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (define-obsolete-function-alias 'event-screen 'event-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (define-obsolete-function-alias 'find-file-other-screen 'find-file-other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (define-obsolete-function-alias 'find-file-read-only-other-screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 'find-file-read-only-other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (define-obsolete-function-alias 'live-screen-p 'frame-live-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 (define-obsolete-function-alias 'screen-height 'frame-height)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (define-obsolete-function-alias 'screen-iconified-p 'frame-iconified-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (define-obsolete-function-alias 'screen-list 'frame-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (define-obsolete-function-alias 'screen-live-p 'frame-live-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (define-obsolete-function-alias 'screen-name 'frame-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (define-obsolete-function-alias 'screen-parameters 'frame-parameters)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (define-obsolete-function-alias 'screen-pixel-height 'frame-pixel-height)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (define-obsolete-function-alias 'screen-pixel-width 'frame-pixel-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (define-obsolete-function-alias 'screen-root-window 'frame-root-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (define-obsolete-function-alias 'screen-selected-window 'frame-selected-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (define-obsolete-function-alias 'screen-totally-visible-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 'frame-totally-visible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (define-obsolete-function-alias 'screen-visible-p 'frame-visible-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (define-obsolete-function-alias 'screen-width 'frame-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (define-obsolete-function-alias 'screenp 'framep)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (define-obsolete-function-alias 'get-screen-for-buffer 'get-frame-for-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (define-obsolete-function-alias 'get-screen-for-buffer-noselect
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 'get-frame-for-buffer-noselect)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 (define-obsolete-function-alias 'get-other-screen 'get-other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (define-obsolete-function-alias 'iconify-screen 'iconify-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (define-obsolete-function-alias 'lower-screen 'lower-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (define-obsolete-function-alias 'mail-other-screen 'mail-other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (define-obsolete-function-alias 'make-screen 'make-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 (define-obsolete-function-alias 'make-screen-invisible 'make-frame-invisible)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (define-obsolete-function-alias 'make-screen-visible 'make-frame-visible)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (define-obsolete-function-alias 'modify-screen-parameters
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 'modify-frame-parameters)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 (define-obsolete-function-alias 'new-screen 'new-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (define-obsolete-function-alias 'next-screen 'next-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (define-obsolete-function-alias 'next-multiscreen-window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 'next-multiframe-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (define-obsolete-function-alias 'other-screen 'other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 (define-obsolete-function-alias 'previous-screen 'previous-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 (define-obsolete-function-alias 'previous-multiscreen-window
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 'previous-multiframe-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (define-obsolete-function-alias 'raise-screen 'raise-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 (define-obsolete-function-alias 'redraw-screen 'redraw-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (define-obsolete-function-alias 'select-screen 'select-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (define-obsolete-function-alias 'selected-screen 'selected-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 (define-obsolete-function-alias 'set-buffer-dedicated-screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 'set-buffer-dedicated-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (define-obsolete-function-alias 'set-screen-height 'set-frame-height)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (define-obsolete-function-alias 'set-screen-position 'set-frame-position)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (define-obsolete-function-alias 'set-screen-size 'set-frame-size)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 (define-obsolete-function-alias 'set-screen-width 'set-frame-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (define-obsolete-function-alias 'show-temp-buffer-in-current-screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 'show-temp-buffer-in-current-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 (define-obsolete-function-alias 'switch-to-buffer-other-screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 'switch-to-buffer-other-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (define-obsolete-function-alias 'visible-screen-list 'visible-frame-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 (define-obsolete-function-alias 'window-screen 'window-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 (define-obsolete-function-alias 'x-set-screen-pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 'set-frame-pointer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (define-obsolete-function-alias 'x-set-frame-pointer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 'set-frame-pointer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 (define-obsolete-variable-alias 'screen-title-format 'frame-title-format)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (define-obsolete-variable-alias 'screen-icon-title-format
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 'frame-icon-title-format)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 (define-obsolete-variable-alias 'terminal-screen 'terminal-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 (define-obsolete-variable-alias 'delete-screen-hook 'delete-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (define-obsolete-variable-alias 'create-screen-hook 'create-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 (define-obsolete-variable-alias 'mouse-enter-screen-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 'mouse-enter-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (define-obsolete-variable-alias 'mouse-leave-screen-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 'mouse-leave-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (define-obsolete-variable-alias 'map-screen-hook 'map-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 (define-obsolete-variable-alias 'unmap-screen-hook 'unmap-frame-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (define-obsolete-variable-alias 'default-screen-alist 'default-frame-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (define-obsolete-variable-alias 'default-screen-name 'default-frame-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 (define-obsolete-variable-alias 'x-screen-defaults 'default-x-frame-alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (defun x-create-screen (parms window-id)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 ""
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 (if (not (eq 'x (device-type (selected-device))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 (error "Cannot create X frames on non-X device"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (make-frame (append parms (list (list 'window-id window-id)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (selected-device)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 (make-obsolete 'x-create-screen 'make-frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 (defun frame-first-window (frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 "Returns the topmost, leftmost window of FRAME.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 If omitted, FRAME defaults to the currently selected frame."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 (frame-highest-window frame 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (make-obsolete 'frame-first-window 'frame-highest-window)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (define-obsolete-variable-alias 'initial-frame-alist 'initial-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 (define-obsolete-variable-alias 'minibuffer-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 'minibuffer-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 (define-obsolete-variable-alias 'pop-up-frame-alist 'pop-up-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 (define-obsolete-variable-alias 'special-display-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 'special-display-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 ;; Defined in C.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 (define-obsolete-variable-alias 'default-tty-frame-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 'default-tty-frame-plist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
263 (make-compatible 'frame-parameters 'frame-property)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 (defun frame-parameters (&optional frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 "Return the parameters-alist of frame FRAME.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 The meaningful PARMs depend on the kind of frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 If FRAME is omitted, return information on the currently selected frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 See the variables `default-frame-plist', `default-x-frame-plist', and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 `default-tty-frame-plist' for a description of the parameters meaningful
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 for particular types of frames."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 (or frame (setq frame (selected-frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 ;; #### This relies on a `copy-sequence' of the user properties in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 ;; `frame-properties'. Removing that would make `frame-properties' more
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 ;; efficient but this function less efficient, as we couldn't be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 ;; destructive. Since most callers now use `frame-parameters', we'll
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 ;; do it this way. Should probably change this at some point in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 ;; future.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 (destructive-plist-to-alist (frame-properties frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
282 (make-compatible 'modify-frame-parameters 'set-frame-properties)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 (defun modify-frame-parameters (frame alist)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 "Modify the properties of frame FRAME according to ALIST.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 ALIST is an alist of properties to change and their new values.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 The meaningful PARMs depend on the kind of frame.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 See `set-frame-properties' for built-in property names."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 ;; it would be nice to be destructive here but that's not safe.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291 (set-frame-properties frame (alist-to-plist alist)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; faces
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
295 (define-obsolete-function-alias 'list-faces-display 'edit-faces)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 (define-obsolete-function-alias 'list-faces 'face-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
297
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 (make-obsolete-variable 'trim-versions-without-asking 'delete-old-versions)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 ;;; Old XEmacs name; kept around for compatibility.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 (define-obsolete-variable-alias 'after-write-file-hooks 'after-save-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 (define-obsolete-function-alias 'truename 'file-truename)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 (make-obsolete-variable 'auto-fill-hook 'auto-fill-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 (make-obsolete-variable 'blink-paren-hook 'blink-paren-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 (make-obsolete-variable 'lisp-indent-hook 'lisp-indent-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
310 (make-obsolete-variable 'comment-indent-hook 'comment-indent-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 (make-obsolete-variable 'temp-buffer-show-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
312 'temp-buffer-show-function)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
313 (make-obsolete-variable 'inhibit-local-variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 "use `enable-local-variables' (with the reversed sense).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
315 (make-obsolete-variable 'suspend-hooks 'suspend-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 (make-obsolete-variable 'first-change-function 'first-change-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 (make-obsolete-variable 'before-change-function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 "use before-change-functions; which is a list of functions rather than a single function.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 (make-obsolete-variable 'after-change-function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 "use after-change-functions; which is a list of functions rather than a single function.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 (define-obsolete-function-alias 'insert-and-inherit 'insert)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
325 (define-obsolete-function-alias 'insert-before-markers-and-inherit
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 'insert-before-markers)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
330 (defun keymap-parent (keymap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 "Returns the first parent of the given keymap."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
332 (car (keymap-parents keymap)))
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
333 (make-compatible 'keymap-parent 'keymap-parents)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
334
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 (defun set-keymap-parent (keymap parent)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 "Makes the given keymap have (only) the given parent."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 (set-keymap-parents keymap (if parent (list parent) '()))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 parent)
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
339 (make-compatible 'set-keymap-parent 'set-keymap-parents)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 (defun add-menu-item (menu-path item-name function enabled-p &optional before)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 "Obsolete. See the function `add-menu-button'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 (or item-name (error "must specify an item name"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 (add-menu-button menu-path (vector item-name function enabled-p) before))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 (make-obsolete 'add-menu-item 'add-menu-button)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 (defun add-menu (menu-path menu-name menu-items &optional before)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 "Obsolete. See the function `add-submenu'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 (or menu-name (error (gettext "must specify a menu name")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
352 (or menu-items (error (gettext "must specify some menu items")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
353 (add-submenu menu-path (cons menu-name menu-items) before))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
354 (make-obsolete 'add-menu 'add-submenu)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
355
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 (define-obsolete-function-alias 'popup-menu-up-p 'popup-up-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
357
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 (define-obsolete-function-alias 'read-minibuffer
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 'read-expression) ; misleading name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362 (define-obsolete-function-alias 'read-input 'read-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 (make-obsolete 'read-no-blanks-input 'read-string) ; mocklisp crud
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; misc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 ;; (defun user-original-login-name ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 ;; "Return user's login name from original login.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 ;; This tries to remain unaffected by `su', by looking in environment variables."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 ;; (or (getenv "LOGNAME") (getenv "USER") (user-login-name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 (define-obsolete-function-alias 'user-original-login-name 'user-login-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 ; old names
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
374 (define-obsolete-function-alias 'wholenump 'natnump)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 (define-obsolete-function-alias 'show-buffer 'set-window-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 (define-obsolete-function-alias 'buffer-flush-undo 'buffer-disable-undo)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 (define-obsolete-function-alias 'eval-current-buffer 'eval-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 (define-obsolete-function-alias 'byte-code-function-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 'compiled-function-p) ;FSFmacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381 ;;(make-obsolete 'mod '%) ; mod and % are different now
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 (make-obsolete 'ring-mod 'mod)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 (make-obsolete 'current-time-seconds 'current-time)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 ;; too bad there's not a way to check for aref, assq, and nconc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387 ;; being called on the values of functions known to return keymaps,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 ;; or known to return vectors of events instead of strings...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 (define-obsolete-function-alias 'run-special-hook-with-args
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 'run-hook-with-args-until-success)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 (make-obsolete-variable 'executing-macro 'executing-kbd-macro)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
397 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
398 (define-compatible-function-alias 'force-mode-line-update
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 'redraw-modeline) ;; FSF compatibility
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
400 (define-compatible-variable-alias 'mode-line-map 'modeline-map)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
401 (define-compatible-variable-alias 'mode-line-buffer-identification
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 'modeline-buffer-identification)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
403 (define-compatible-variable-alias 'mode-line-process 'modeline-process)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
404 (define-compatible-variable-alias 'mode-line-modified 'modeline-modified)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
405 (make-compatible-variable 'mode-line-inverse-video
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 "use set-face-highlight-p and set-face-reverse-p")
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
407 (define-compatible-variable-alias 'default-mode-line-format
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 'default-modeline-format)
98
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
409 (define-compatible-variable-alias 'mode-line-format 'modeline-format)
0d2f883870bc Import from CVS: tag r20-1b1
cvs
parents: 74
diff changeset
410 (define-compatible-variable-alias 'mode-line-menu 'modeline-menu)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 ;;; (defun mouse-eval-last-sexpr (event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 ;;; (interactive "@e")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 ;;; (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 ;;; (mouse-set-point event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 ;;; (eval-last-sexp nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420 (define-obsolete-function-alias 'mouse-eval-last-sexpr 'mouse-eval-sexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422 (defun read-mouse-position (frame)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 (cdr (mouse-position (frame-device frame))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 (make-obsolete 'read-mouse-position 'mouse-position)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; `point'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 (define-obsolete-function-alias 'dot 'point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 (define-obsolete-function-alias 'dot-marker 'point-marker)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430 (define-obsolete-function-alias 'dot-min 'point-min)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431 (define-obsolete-function-alias 'dot-max 'point-max)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 (define-obsolete-function-alias 'window-dot 'window-point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 (define-obsolete-function-alias 'set-window-dot 'set-window-point)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; processes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 (define-obsolete-function-alias 'send-string 'process-send-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 (define-obsolete-function-alias 'send-region 'process-send-region)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; redisplay
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 (defun redraw-display (&optional device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 (if (eq device t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 (mapcar 'redisplay-device (device-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 (redisplay-device device)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; stuff replaced by specifiers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 (defun screen-scrollbar-width (&optional screen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450 ;; specifier-specs is the inverse of set-specifier, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 ;; the way this function was defined, specifier-instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452 ;; is closer.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 (specifier-instance scrollbar-width (or screen (selected-frame))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 (make-obsolete 'screen-scrollbar-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
455 "use (specifier-instance scrollbar-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 (defun set-screen-scrollbar-width (screen value)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 (set-specifier scrollbar-width (cons screen value)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 (make-obsolete 'set-screen-scrollbar-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 "use (set-specifier scrollbar-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 (defun set-screen-left-margin-width (value &optional screen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 (set-specifier left-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 (cons (or screen (selected-frame)) value)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 (make-obsolete 'set-screen-left-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 "use (set-specifier left-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 (defun set-screen-right-margin-width (value &optional screen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 (set-specifier right-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 (cons (or screen (selected-frame)) value)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 (make-obsolete 'set-screen-right-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 "use (set-specifier right-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 (defun set-buffer-left-margin-width (value &optional buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 (set-specifier left-margin-width (cons (or buffer (current-buffer)) value)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 (make-obsolete 'set-buffer-left-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477 "use (set-specifier left-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479 (defun set-buffer-right-margin-width (value &optional buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 (set-specifier right-margin-width (cons (or buffer (current-buffer)) value)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 (make-obsolete 'set-buffer-right-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 "use (set-specifier right-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 (defun screen-left-margin-width (&optional screen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 (specifier-specs left-margin-width (or screen (selected-frame))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 (make-obsolete 'screen-left-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 "use (specifier-specs left-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
488
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 (defun screen-right-margin-width (&optional screen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 (specifier-specs right-margin-width (or screen (selected-frame))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 (make-obsolete 'screen-right-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 "use (specifier-specs right-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 (defun buffer-left-margin-width (&optional buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 (specifier-specs left-margin-width (or buffer (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496 (make-obsolete 'buffer-left-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 "use (specifier-specs left-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 (defun buffer-right-margin-width (&optional buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 (specifier-specs right-margin-width (or buffer (current-buffer))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 (make-obsolete 'buffer-right-margin-width
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 "use (specifier-specs right-margin-width ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 (defun x-set-frame-icon-pixmap (frame image-instance &optional mask-ignored)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 "Set the icon of the given frame to the given image instance,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 which should be an image instance object (as returned by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507 `make-image-instance'), a glyph object (as returned by `make-glyph'),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 or nil. If a glyph object is given, the glyph will be instantiated on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509 the frame to produce an image instance object.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 If the given image instance has a mask, that will be used as the icon mask;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512 however, not all window managers support this.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 The window manager is also not required to support color pixmaps,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 only bitmaps (one plane deep).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 Optional third argument is ignored. If you're concerned about this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 incomplete backwards incompatibility, you should convert your code
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 to use `frame-icon-glyph' -- you can specify a mask for an XBM file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520 using the standard image instantiator format."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 (if (glyphp image-instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 (setq image-instance (glyph-image-instance image-instance frame)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523 (set-glyph-image frame-icon-glyph image-instance frame))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 (make-obsolete 'x-set-frame-icon-pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 "use (set-glyph-image frame-icon-glyph ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 (defalias 'x-set-screen-icon-pixmap 'x-set-frame-icon-pixmap)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527 (make-obsolete 'x-set-screen-icon-pixmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 "use (set-glyph-image frame-icon-glyph ...).")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
529
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
530 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; window-system objects
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
532 (define-obsolete-function-alias 'pixel-name 'color-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
533
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534 ;; compatibility function -- a front-end to make-glyph
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 (defun make-pixmap (name &optional locale)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 "Create a glyph with NAME as an image specifier and locale LOCALE.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 The file should be in `XBM' or `XPM' format.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538 If the XBMLANGPATH environment variable is set, it will be searched for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 matching files. Next, the directories listed in the `x-bitmap-file-path'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 variable will be searched (this variable is initialized from the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 \"*bitmapFilePath\" resource). Finally, the XEmacs etc/ directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 (the value of `data-directory') will be searched.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 The file argument may also be a list of the form (width height data) where
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 width and height are the size in pixels, and data is a string, containing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 the raw bits of the bitmap. (Bitmaps specified this way can only be one bit
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 deep.)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 If compiled with support for XPM, the file argument may also be a string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548 which is the contents of an XPM file (that is, a string beginning with the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 characters \"/* XPM */\"; see the XPM documentation).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 The optional second argument is the specifier locale for this pixmap glyph.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551 The returned object is a glyph object. To get the actual pixmap object for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 a given frame, use the function `glyph-instance'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553 (if (consp name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 (setq name (vector 'xbm :data name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 (make-glyph name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 (make-obsolete 'make-pixmap 'make-glyph)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 (defun make-cursor (name &optional fg bg device)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 "Creates a pointer image instance with NAME as an image specifier.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560 The optional second and third arguments are the foreground and background
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 colors. They may be color name strings or `pixel' objects.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 The optional fourth argument is the device on which to allocate the cursor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 (defaults to the selected device).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564 This allocates a new pointer in the X server, and signals an error if the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 pointer is unknown or cannot be allocated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 A pointer name can take many different forms. It can be:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
568 - any of the standard cursor names from appendix B of the Xlib manual
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 (also known as the file <X11/cursorfont.h>) minus the XC_ prefix;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
570 - the name of a font, and glyph index into it of the form
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
571 \"FONT fontname index [[mask-font] mask-index]\";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
572 - the name of a bitmap or pixmap file;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
573 - or an image instance object, as returned by `make-image-instance'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
574
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
575 If it is an image instance or pixmap file, and that pixmap comes with a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
576 mask, then that mask will be used. If it is an image instance, it must
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
577 have only one plane, since X pointers may only have two colors. If it is a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578 pixmap file, then the file will be read in monochrome.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 If it is a bitmap file, and if a bitmap file whose name is the name of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 pointer with \"msk\" or \"Mask\" appended exists, then that second bitmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 will be used as the mask. For example, a pair of files might be named
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 \"pointer.xbm\" and \"pointer.xbmmsk\".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
585 The returned object is a normal, first-class lisp object. The way you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
586 `deallocate' the pointer is the way you deallocate any other lisp object:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
587 you drop all pointers to it and allow it to be garbage collected. When
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
588 these objects are GCed, the underlying X data is deallocated as well."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589 ;; #### ignores fg and bg
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
590 (make-image-instance name device '(pointer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
591 (make-obsolete 'make-cursor 'make-image-instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593 (define-obsolete-function-alias 'pixmap-width 'glyph-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 (define-obsolete-function-alias 'pixmap-contributes-to-line-height-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 'glyph-contrib-p-instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 (define-obsolete-function-alias 'set-pixmap-contributes-to-line-height
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 'set-glyph-contrib-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
599 ;; the functionality of column.el has been moved into C
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
600 (defalias 'display-column-mode 'column-number-mode)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
601
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
602 (defun x-color-values (color &optional frame)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
603 "Return a description of the color named COLOR on frame FRAME.
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
604 The value is a list of integer RGB values--(RED GREEN BLUE).
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
605 These values appear to range from 0 to 65280 or 65535, depending
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
606 on the system; white is (65280 65280 65280) or (65535 65535 65535).
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
607 If FRAME is omitted or nil, use the selected frame."
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
608 (color-instance-rgb-components (make-color-instance color)))
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
609 (make-compatible 'x-color-values 'color-instance-rgb-components)
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
610
104
cf808b4c4290 Import from CVS: tag r20-1b4
cvs
parents: 100
diff changeset
611 ;; The name of char-int is unintuitive and silly.
cf808b4c4290 Import from CVS: tag r20-1b4
cvs
parents: 100
diff changeset
612 (define-obsolete-function-alias 'char-int 'char-to-int)
cf808b4c4290 Import from CVS: tag r20-1b4
cvs
parents: 100
diff changeset
613 ;; likewise with int-char.
cf808b4c4290 Import from CVS: tag r20-1b4
cvs
parents: 100
diff changeset
614 (define-obsolete-function-alias 'int-char 'int-to-char)
cf808b4c4290 Import from CVS: tag r20-1b4
cvs
parents: 100
diff changeset
615
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 98
diff changeset
616 ;;; obsolete.el ends here