annotate lisp/obsolete.el @ 774:703228f54913

[xemacs-hg @ 2002-03-14 03:54:10 by stephent] Ville Skytta's auto-mode additions <1016058402.2852.39.camel@bobcat.ods.org> ChangeLog placeholders <87it7zu7wj.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 14 Mar 2002 03:54:28 +0000
parents 943eaba38521
children e65d9cf16707
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; obsolete.el --- obsoleteness support
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1985-1994, 1997 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1994, 1995 Amdahl Corporation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Sun Microsystems.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Keywords: internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Free Software Foundation, 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;;; Synched up with: Not in FSF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; This file is dumped with XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ;; The obsoleteness support used to be scattered throughout various
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; source files. We put the stuff in one place to remove the junkiness
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;; from other source files and to facilitate creating/updating things
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 ;; like sysdep.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 (defsubst define-obsolete-function-alias (oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 "Define OLDFUN as an obsolete alias for function NEWFUN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 as obsolete."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 (define-function oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 (make-obsolete oldfun newfun))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (defsubst define-compatible-function-alias (oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 "Define OLDFUN as a compatible alias for function NEWFUN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 as provided for compatibility only."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (define-function oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 (make-compatible oldfun newfun))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (defsubst define-obsolete-variable-alias (oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 "Define OLDVAR as an obsolete alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 This makes referencing or setting OLDVAR equivalent to referencing or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 setting NEWVAR and marks OLDVAR as obsolete.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 If OLDVAR was bound and NEWVAR was not, Set NEWVAR to OLDVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
60 Note: Use this before any other references (defvar/defcustom) to NEWVAR."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 (let ((needs-setting (and (boundp oldvar) (not (boundp newvar))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 (value (and (boundp oldvar) (symbol-value oldvar))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 (defvaralias oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 (make-obsolete-variable oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (and needs-setting (set newvar value))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (defsubst define-compatible-variable-alias (oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 "Define OLDVAR as a compatible alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 This makes referencing or setting OLDVAR equivalent to referencing or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 setting NEWVAR and marks OLDVAR as provided for compatibility only."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (defvaralias oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (make-compatible-variable oldvar newvar))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (make-compatible-variable 'window-system "use (console-type)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 (defun x-display-color-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 "Return t if DEVICE is a color device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 (eq 'color (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (make-compatible 'x-display-color-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 (define-function 'x-color-display-p 'x-display-color-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 (make-compatible 'x-display-color-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 (defun x-display-grayscale-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 "Return t if DEVICE is a grayscale device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 (eq 'grayscale (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 (make-compatible 'x-display-grayscale-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 (define-function 'x-grayscale-display-p 'x-display-grayscale-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (make-compatible 'x-display-grayscale-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 (define-compatible-function-alias 'x-display-pixel-width 'device-pixel-width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (define-compatible-function-alias 'x-display-pixel-height 'device-pixel-height)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (define-compatible-function-alias 'x-display-planes 'device-bitplanes)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (define-compatible-function-alias 'x-display-color-cells 'device-color-cells)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (define-obsolete-function-alias 'menu-event-p 'misc-user-event-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (make-obsolete-variable 'unread-command-char 'unread-command-events)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; extents
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (make-obsolete 'set-window-dot 'set-window-point)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 (define-obsolete-function-alias 'extent-buffer 'extent-object)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 (defun frame-first-window (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 "Return the topmost, leftmost window of FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 If omitted, FRAME defaults to the currently selected frame."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (frame-highest-window frame 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 (make-compatible 'frame-first-window 'frame-highest-window)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (define-obsolete-variable-alias 'initial-frame-alist 'initial-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (define-obsolete-variable-alias 'minibuffer-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 'minibuffer-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (define-obsolete-variable-alias 'pop-up-frame-alist 'pop-up-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (define-obsolete-variable-alias 'special-display-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 'special-display-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 ;; Defined in C.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 (define-obsolete-variable-alias 'default-tty-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 'default-tty-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 (make-compatible 'frame-parameters 'frame-property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (defun frame-parameters (&optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 "Return the parameters-alist of frame FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 The meaningful PARMs depend on the kind of frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 If FRAME is omitted, return information on the currently selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 See the variables `default-frame-plist', `default-x-frame-plist', and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 `default-tty-frame-plist' for a description of the parameters meaningful
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 for particular types of frames."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 ;; #### This relies on a `copy-sequence' of the user properties in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 ;; `frame-properties'. Removing that would make `frame-properties' more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 ;; efficient but this function less efficient, as we couldn't be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 ;; destructive. Since most callers now use `frame-parameters', we'll
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 ;; do it this way. Should probably change this at some point in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 ;; future.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (destructive-plist-to-alist (frame-properties frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (make-compatible 'modify-frame-parameters 'set-frame-properties)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (defun modify-frame-parameters (frame alist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 "Modify the properties of frame FRAME according to ALIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 ALIST is an alist of properties to change and their new values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 The meaningful PARMs depend on the kind of frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 See `set-frame-properties' for built-in property names."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 ;; it would be nice to be destructive here but that's not safe.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 (set-frame-properties frame (alist-to-plist alist)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; faces
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 (define-obsolete-function-alias 'list-faces-display 'edit-faces)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 (define-obsolete-function-alias 'list-faces 'face-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; paths
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 (defvar Info-default-directory-list nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 "This used to be the initial value of Info-directory-list.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 If you want to change the locations where XEmacs looks for info files,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 set Info-directory-list.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 (make-obsolete-variable 'Info-default-directory-list 'Info-directory-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (defvar init-file-user nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 "This used to be the name of the user whose init file was read at startup.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 (make-obsolete-variable 'init-file-user 'load-user-init-file-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; hooks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 (make-compatible-variable 'lisp-indent-hook 'lisp-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (make-compatible-variable 'comment-indent-hook 'comment-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 (make-obsolete-variable 'temp-buffer-show-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 'temp-buffer-show-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 (make-obsolete-variable 'inhibit-local-variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 "use `enable-local-variables' (with the reversed sense).")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 (make-obsolete-variable 'suspend-hooks 'suspend-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 (make-obsolete-variable 'first-change-function 'first-change-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 (make-obsolete-variable 'before-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 "use before-change-functions; which is a list of functions rather than a single function.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 (make-obsolete-variable 'after-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 "use after-change-functions; which is a list of functions rather than a single function.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (define-compatible-function-alias 'insert-and-inherit 'insert)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (define-compatible-function-alias 'insert-before-markers-and-inherit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 'insert-before-markers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 (defun keymap-parent (keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 "Return the first parent of the given keymap."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 (car (keymap-parents keymap)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 (make-compatible 'keymap-parent 'keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 (defun set-keymap-parent (keymap parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 "Make the given keymap have (only) the given parent."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 (set-keymap-parents keymap (if parent (list parent) '()))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 (make-compatible 'set-keymap-parent 'set-keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 (defun add-menu-item (menu-path item-name function enabled-p &optional before)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 "Obsolete. See the function `add-menu-button'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 (or item-name (error "must specify an item name"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (add-menu-button menu-path (vector item-name function enabled-p) before))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 (make-obsolete 'add-menu-item 'add-menu-button)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (defun add-menu (menu-path menu-name menu-items &optional before)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 "See the function `add-submenu'."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
222 (or menu-name (error "must specify a menu name"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
223 (or menu-items (error "must specify some menu items"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (add-submenu menu-path (cons menu-name menu-items) before))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 ;; Can't make this obsolete. easymenu depends on it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (make-compatible 'add-menu 'add-submenu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (define-compatible-function-alias 'read-minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 'read-expression) ; misleading name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 (define-compatible-function-alias 'read-input 'read-string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; misc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 ;; (defun user-original-login-name ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 ;; "Return user's login name from original login.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 ;; This tries to remain unaffected by `su', by looking in environment variables."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 ;; (or (getenv "LOGNAME") (getenv "USER") (user-login-name)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (define-obsolete-function-alias 'user-original-login-name 'user-login-name)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 ; old names
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 (define-obsolete-function-alias 'show-buffer 'set-window-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 (define-obsolete-function-alias 'buffer-flush-undo 'buffer-disable-undo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 (make-compatible 'eval-current-buffer 'eval-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (define-compatible-function-alias 'byte-code-function-p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 'compiled-function-p) ;FSFmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 (define-obsolete-function-alias 'isearch-yank-x-selection
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 'isearch-yank-selection)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 (define-obsolete-function-alias 'isearch-yank-x-clipboard
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 'isearch-yank-clipboard)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 ;; too bad there's not a way to check for aref, assq, and nconc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 ;; being called on the values of functions known to return keymaps,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 ;; or known to return vectors of events instead of strings...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 (make-obsolete-variable 'executing-macro 'executing-kbd-macro)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
718
29e4e3036b4e [xemacs-hg @ 2001-12-28 01:38:41 by youngs]
youngs
parents: 444
diff changeset
260 (define-compatible-function-alias 'interactive-form
29e4e3036b4e [xemacs-hg @ 2001-12-28 01:38:41 by youngs]
youngs
parents: 444
diff changeset
261 'function-interactive) ;FSFmacs 21.1
29e4e3036b4e [xemacs-hg @ 2001-12-28 01:38:41 by youngs]
youngs
parents: 444
diff changeset
262
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (define-compatible-function-alias 'force-mode-line-update
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 'redraw-modeline) ;; FSF compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 (define-compatible-variable-alias 'mode-line-map 'modeline-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (define-compatible-variable-alias 'mode-line-buffer-identification
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 'modeline-buffer-identification)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (define-compatible-variable-alias 'mode-line-process 'modeline-process)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 (define-compatible-variable-alias 'mode-line-modified 'modeline-modified)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 (make-compatible-variable 'mode-line-inverse-video
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 "use set-face-highlight-p and set-face-reverse-p")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 (define-compatible-variable-alias 'default-mode-line-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 'default-modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 (define-compatible-variable-alias 'mode-line-format 'modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 (define-compatible-variable-alias 'mode-line-menu 'modeline-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 ;;; (defun mouse-eval-last-sexpr (event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 ;;; (interactive "@e")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 ;;; (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 ;;; (mouse-set-point event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 ;;; (eval-last-sexp nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 (define-obsolete-function-alias 'mouse-eval-last-sexpr 'mouse-eval-sexp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 (defun read-mouse-position (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 (cdr (mouse-position (frame-device frame))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 (make-obsolete 'read-mouse-position 'mouse-position)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 (defun redraw-display (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 (if (eq device t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 (mapcar 'redisplay-device (device-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 (redisplay-device device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; window-system objects
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 ;; the functionality of column.el has been moved into C
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 ;; Function obsoleted for XEmacs 20.0/February 1997.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 (defalias 'display-column-mode 'column-number-mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 (defun x-color-values (color &optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 "Return a description of the color named COLOR on frame FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 The value is a list of integer RGB values--(RED GREEN BLUE).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 These values appear to range from 0 to 65280 or 65535, depending
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 on the system; white is (65280 65280 65280) or (65535 65535 65535).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 If FRAME is omitted or nil, use the selected frame."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (color-instance-rgb-components (make-color-instance color)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (make-compatible 'x-color-values 'color-instance-rgb-components)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 ;; Two loser functions which shouldn't be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 (make-obsolete 'following-char 'char-after)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 (make-obsolete 'preceding-char 'char-before)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 ;; Keywords already do The Right Thing in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 (make-compatible 'define-widget-keywords "Just use them")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 (make-obsolete 'function-called-at-point 'function-at-point)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 (provide 'obsolete)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 ;;; obsolete.el ends here