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