annotate lisp/obsolete.el @ 4911:7eec2a1f3412

Fix Visual Studio 6 build
author Vin Shelton <acs@xemacs.org>
date Mon, 01 Feb 2010 17:08:41 -0500
parents 755ae5b97edb
children c17c857e20bf
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.
2527
491f8cf78a9c [xemacs-hg @ 2005-01-28 02:58:38 by ben]
ben
parents: 1365
diff changeset
6 ;; Copyright (C) 2002, 2004 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; Keywords: internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; along with XEmacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; Free Software Foundation, 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ;;; Synched up with: Not in FSF.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;; This file is dumped with XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;; The obsoleteness support used to be scattered throughout various
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;; 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
36 ;; from other source files and to facilitate creating/updating things
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;; like sysdep.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 (defsubst define-obsolete-function-alias (oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 "Define OLDFUN as an obsolete alias for function NEWFUN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 as obsolete."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 (define-function oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (make-obsolete oldfun newfun))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 (defsubst define-compatible-function-alias (oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 "Define OLDFUN as a compatible alias for function NEWFUN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 as provided for compatibility only."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 (define-function oldfun newfun)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 (make-compatible oldfun newfun))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 (defsubst define-obsolete-variable-alias (oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 "Define OLDVAR as an obsolete alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 This makes referencing or setting OLDVAR equivalent to referencing or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 setting NEWVAR and marks OLDVAR as obsolete.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 If OLDVAR was bound and NEWVAR was not, Set NEWVAR to OLDVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
61 Note: Use this before any other references (defvar/defcustom) to NEWVAR."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 (let ((needs-setting (and (boundp oldvar) (not (boundp newvar))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 (value (and (boundp oldvar) (symbol-value oldvar))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 (defvaralias oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (make-obsolete-variable oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 (and needs-setting (set newvar value))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 (defsubst define-compatible-variable-alias (oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 "Define OLDVAR as a compatible alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 This makes referencing or setting OLDVAR equivalent to referencing or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 setting NEWVAR and marks OLDVAR as provided for compatibility only."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (defvaralias oldvar newvar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (make-compatible-variable oldvar newvar))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 (make-compatible-variable 'window-system "use (console-type)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 (defun x-display-color-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 "Return t if DEVICE is a color device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (eq 'color (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 (make-compatible 'x-display-color-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 (define-function 'x-color-display-p 'x-display-color-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (make-compatible 'x-display-color-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 (defun x-display-grayscale-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 "Return t if DEVICE is a grayscale device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 (eq 'grayscale (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 (make-compatible 'x-display-grayscale-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (define-function 'x-grayscale-display-p 'x-display-grayscale-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 (make-compatible 'x-display-grayscale-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (define-compatible-function-alias 'x-display-pixel-width 'device-pixel-width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (define-compatible-function-alias 'x-display-pixel-height 'device-pixel-height)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (define-compatible-function-alias 'x-display-planes 'device-bitplanes)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (define-compatible-function-alias 'x-display-color-cells 'device-color-cells)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (define-obsolete-function-alias 'menu-event-p 'misc-user-event-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (make-obsolete-variable 'unread-command-char 'unread-command-events)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; extents
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 (make-obsolete 'set-window-dot 'set-window-point)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 (define-obsolete-function-alias 'extent-buffer 'extent-object)
1024
ccaf90c5a53a [xemacs-hg @ 2002-10-02 09:29:37 by stephent]
stephent
parents: 883
diff changeset
110 (define-compatible-variable-alias 'parse-sexp-lookup-properties
ccaf90c5a53a [xemacs-hg @ 2002-10-02 09:29:37 by stephent]
stephent
parents: 883
diff changeset
111 'lookup-syntax-properties)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; frames
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (defun frame-first-window (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 "Return the topmost, leftmost window of FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 If omitted, FRAME defaults to the currently selected frame."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (frame-highest-window frame 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (make-compatible 'frame-first-window 'frame-highest-window)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (define-obsolete-variable-alias 'initial-frame-alist 'initial-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (define-obsolete-variable-alias 'minibuffer-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 'minibuffer-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (define-obsolete-variable-alias 'pop-up-frame-alist 'pop-up-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 (define-obsolete-variable-alias 'special-display-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 'special-display-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 ;; Defined in C.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 (define-obsolete-variable-alias 'default-tty-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 'default-tty-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 (make-compatible 'frame-parameters 'frame-property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 (defun frame-parameters (&optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 "Return the parameters-alist of frame FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 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
138 The meaningful PARMs depend on the kind of frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 If FRAME is omitted, return information on the currently selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 See the variables `default-frame-plist', `default-x-frame-plist', and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 `default-tty-frame-plist' for a description of the parameters meaningful
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 for particular types of frames."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 ;; #### This relies on a `copy-sequence' of the user properties in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 ;; `frame-properties'. Removing that would make `frame-properties' more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 ;; efficient but this function less efficient, as we couldn't be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 ;; destructive. Since most callers now use `frame-parameters', we'll
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 ;; 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
150 ;; future.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (destructive-plist-to-alist (frame-properties frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
883
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
153 (make-compatible 'frame-parameter 'frame-property)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
154 (defun frame-parameter (frame parameter)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
155 "Return FRAME's value for parameter PARAMETER.
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
156 If FRAME is nil, describe the currently selected frame."
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
157 (cdr (assq parameter (frame-parameters frame))))
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
158
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 (make-compatible 'modify-frame-parameters 'set-frame-properties)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 (defun modify-frame-parameters (frame alist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 "Modify the properties of frame FRAME according to ALIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 ALIST is an alist of properties to change and their new values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 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
164 The meaningful PARMs depend on the kind of frame.
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 See `set-frame-properties' for built-in property names."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 ;; 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
168 (set-frame-properties frame (alist-to-plist alist)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; faces
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 (define-obsolete-function-alias 'list-faces-display 'edit-faces)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 (define-obsolete-function-alias 'list-faces 'face-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; paths
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 (defvar Info-default-directory-list nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 "This used to be the initial value of Info-directory-list.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 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
180 set Info-directory-list.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (make-obsolete-variable 'Info-default-directory-list 'Info-directory-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 (defvar init-file-user nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 "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
185 (make-obsolete-variable 'init-file-user 'load-user-init-file-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 1024
diff changeset
187 (define-obsolete-function-alias 'pui-add-install-directory
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 1024
diff changeset
188 'pui-set-local-package-get-directory) ; misleading name
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; hooks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 (make-compatible-variable 'lisp-indent-hook 'lisp-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 (make-compatible-variable 'comment-indent-hook 'comment-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 (make-obsolete-variable 'temp-buffer-show-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 'temp-buffer-show-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (make-obsolete-variable 'inhibit-local-variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 "use `enable-local-variables' (with the reversed sense).")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (make-obsolete-variable 'suspend-hooks 'suspend-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (make-obsolete-variable 'first-change-function 'first-change-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 (make-obsolete-variable 'before-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 "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
201 (make-obsolete-variable 'after-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 "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
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion
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 (define-compatible-function-alias 'insert-and-inherit 'insert)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 (define-compatible-function-alias 'insert-before-markers-and-inherit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 'insert-before-markers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps
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 (defun keymap-parent (keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 "Return the first parent of the given keymap."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 (car (keymap-parents keymap)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 (make-compatible 'keymap-parent 'keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (defun set-keymap-parent (keymap parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 "Make the given keymap have (only) the given parent."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (set-keymap-parents keymap (if parent (list parent) '()))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 (make-compatible 'set-keymap-parent 'set-keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
225 (defun add-menu-item (menu-path item-name function enabled-p &optional before)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
226 "Obsolete. See the function `add-menu-button'."
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
227 (or item-name (error "must specify an item name"))
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
228 (declare-fboundp (add-menu-button menu-path (vector item-name function enabled-p) before)))
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
229 (make-obsolete 'add-menu-item 'add-menu-button)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
231 (defun add-menu (menu-path menu-name menu-items &optional before)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
232 "See the function `add-submenu'."
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
233 (or menu-name (error "must specify a menu name"))
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
234 (or menu-items (error "must specify some menu items"))
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
235 (declare-fboundp (add-submenu menu-path (cons menu-name menu-items) before)))
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
236 ;; Can't make this obsolete. easymenu depends on it.
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
237 (make-compatible 'add-menu 'add-submenu)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
239 (define-obsolete-function-alias 'package-get-download-menu
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
240 'package-ui-download-menu)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
241
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
242 (unless (featurep 'menubar)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
243 ;; Don't provide the last three functions unless the menubar feature is
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
244 ;; available. This approach (with #'unintern) avoids warnings about lost
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
245 ;; docstrings since make-docfile doesn't parse bytecode.
4783
e29fcfd8df5f Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4677
diff changeset
246 (mapc #'unintern '(add-menu-item add-menu package-get-download-menu)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 1024
diff changeset
247
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (define-compatible-function-alias 'read-minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 'read-expression) ; misleading name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (define-compatible-function-alias 'read-input 'read-string)
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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; misc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 ;; (defun user-original-login-name ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 ;; "Return user's login name from original login.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 ;; This tries to remain unaffected by `su', by looking in environment variables."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 ;; (or (getenv "LOGNAME") (getenv "USER") (user-login-name)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 (define-obsolete-function-alias 'user-original-login-name 'user-login-name)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 ; old names
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 (define-obsolete-function-alias 'show-buffer 'set-window-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 (define-obsolete-function-alias 'buffer-flush-undo 'buffer-disable-undo)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (make-compatible 'eval-current-buffer 'eval-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (define-compatible-function-alias 'byte-code-function-p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 'compiled-function-p) ;FSFmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (define-obsolete-function-alias 'isearch-yank-x-selection
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 'isearch-yank-selection)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (define-obsolete-function-alias 'isearch-yank-x-clipboard
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 'isearch-yank-clipboard)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 ;; 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
275 ;; being called on the values of functions known to return keymaps,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 ;; or known to return vectors of events instead of strings...
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277
4885
6772ce4d982b Fix hash tables, #'member*, #'assoc*, #'eql compiler macros if bignums
Aidan Kehoe <kehoea@parhasard.net>
parents: 4783
diff changeset
278 ;;; Yes there is; make compiler macros for aref, assq, nconc, checking that
6772ce4d982b Fix hash tables, #'member*, #'assoc*, #'eql compiler macros if bignums
Aidan Kehoe <kehoea@parhasard.net>
parents: 4783
diff changeset
279 ;;; the car of the relevant argument is sane.
6772ce4d982b Fix hash tables, #'member*, #'assoc*, #'eql compiler macros if bignums
Aidan Kehoe <kehoea@parhasard.net>
parents: 4783
diff changeset
280
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 (make-obsolete-variable 'executing-macro 'executing-kbd-macro)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282
718
29e4e3036b4e [xemacs-hg @ 2001-12-28 01:38:41 by youngs]
youngs
parents: 444
diff changeset
283 (define-compatible-function-alias 'interactive-form
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 860
diff changeset
284 'function-interactive) ;GNU 21.1
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 860
diff changeset
285 (define-compatible-function-alias 'assq-delete-all
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 860
diff changeset
286 'remassq) ;GNU 21.1
718
29e4e3036b4e [xemacs-hg @ 2001-12-28 01:38:41 by youngs]
youngs
parents: 444
diff changeset
287
883
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
288 (defun makehash (&optional test)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
289 "Create a new hash table.
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
290 Optional first argument TEST specifies how to compare keys in the table.
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
291 Predefined tests are `eq', `eql', and `equal'. Default is `eql'."
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
292 (make-hash-table :test test))
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
293 (make-compatible 'makehash 'make-hash-table)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
294
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
295 (defun buffer-local-value (variable buffer)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
296 "Return the value of VARIABLE in BUFFER.
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
297 If VARIABLE does not have a buffer-local binding in BUFFER, the value
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
298 is the default binding of variable."
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
299 (symbol-value-in-buffer variable buffer))
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
300 (make-compatible 'buffer-local-value 'symbol-value-in-buffer)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
301
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
302 (define-compatible-function-alias 'line-beginning-position 'point-at-bol)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
303 (define-compatible-function-alias 'line-end-position 'point-at-eol)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
304
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline
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 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 (define-compatible-function-alias 'force-mode-line-update
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 'redraw-modeline) ;; FSF compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 (define-compatible-variable-alias 'mode-line-map 'modeline-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 (define-compatible-variable-alias 'mode-line-buffer-identification
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 'modeline-buffer-identification)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (define-compatible-variable-alias 'mode-line-process 'modeline-process)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (define-compatible-variable-alias 'mode-line-modified 'modeline-modified)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 (make-compatible-variable 'mode-line-inverse-video
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 "use set-face-highlight-p and set-face-reverse-p")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 (define-compatible-variable-alias 'default-mode-line-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 'default-modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 (define-compatible-variable-alias 'mode-line-format 'modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 (define-compatible-variable-alias 'mode-line-menu 'modeline-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 ;;; (defun mouse-eval-last-sexpr (event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 ;;; (interactive "@e")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 ;;; (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 ;;; (mouse-set-point event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 ;;; (eval-last-sexp nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 (define-obsolete-function-alias 'mouse-eval-last-sexpr 'mouse-eval-sexp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 (defun read-mouse-position (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 (cdr (mouse-position (frame-device frame))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 (make-obsolete 'read-mouse-position 'mouse-position)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 (defun redraw-display (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 (if (eq device t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 (mapcar 'redisplay-device (device-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 (redisplay-device device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342
777
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
343 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; strings
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
344
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
345 (define-obsolete-function-alias 'sref 'aref)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
346
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
347 (defun char-bytes (character)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
348 "Return number of bytes a CHARACTER occupies in a string or buffer.
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
349 It always returns 1 in XEmacs, and in recent FSF Emacs versions."
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
350 1)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
351 (make-obsolete 'char-bytes "This function always returns 1")
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
352
860
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
353 (defun find-non-ascii-charset-string (string)
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
354 "Return a list of charsets in the STRING except ascii.
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
355 It might be available for compatibility with Mule 2.3,
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
356 because its `find-charset-string' ignores ASCII charset."
4222
38ef5a6da799 [xemacs-hg @ 2007-10-13 14:08:26 by aidan]
aidan
parents: 3555
diff changeset
357 (delq 'ascii (and-fboundp #'charsets-in-string (charsets-in-string string))))
860
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
358 (make-obsolete 'find-non-ascii-charset-string
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
359 "use (delq 'ascii (charsets-in-string STRING)) instead.")
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
360
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
361 (defun find-non-ascii-charset-region (start end)
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
362 "Return a list of charsets except ascii in the region between START and END.
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
363 It might be available for compatibility with Mule 2.3,
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
364 because its `find-charset-string' ignores ASCII charset."
4222
38ef5a6da799 [xemacs-hg @ 2007-10-13 14:08:26 by aidan]
aidan
parents: 3555
diff changeset
365 (delq 'ascii (and-fboundp #'charsets-in-region
38ef5a6da799 [xemacs-hg @ 2007-10-13 14:08:26 by aidan]
aidan
parents: 3555
diff changeset
366 (charsets-in-region start end))))
860
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
367 (make-obsolete 'find-non-ascii-charset-region
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
368 "use (delq 'ascii (charsets-in-region START END)) instead.")
818
accc481aef34 [xemacs-hg @ 2002-04-25 06:09:11 by youngs]
youngs
parents: 777
diff changeset
369
3555
db783273b399 [xemacs-hg @ 2006-08-11 01:30:22 by vins]
vins
parents: 2527
diff changeset
370 ;; < 21.5 compatibility, eg. https://bugzilla.redhat.com/201524#c2
db783273b399 [xemacs-hg @ 2006-08-11 01:30:22 by vins]
vins
parents: 2527
diff changeset
371 (define-obsolete-function-alias 'string-to-char-list 'string-to-list)
db783273b399 [xemacs-hg @ 2006-08-11 01:30:22 by vins]
vins
parents: 2527
diff changeset
372
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; window-system objects
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 ;; the functionality of column.el has been moved into C
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 ;; Function obsoleted for XEmacs 20.0/February 1997.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 (defalias 'display-column-mode 'column-number-mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 (defun x-color-values (color &optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 "Return a description of the color named COLOR on frame FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 The value is a list of integer RGB values--(RED GREEN BLUE).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 These values appear to range from 0 to 65280 or 65535, depending
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 on the system; white is (65280 65280 65280) or (65535 65535 65535).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 If FRAME is omitted or nil, use the selected frame."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 (color-instance-rgb-components (make-color-instance color)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 (make-compatible 'x-color-values 'color-instance-rgb-components)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387
2527
491f8cf78a9c [xemacs-hg @ 2005-01-28 02:58:38 by ben]
ben
parents: 1365
diff changeset
388 (make-obsolete 'mswindows-color-list 'color-list)
491f8cf78a9c [xemacs-hg @ 2005-01-28 02:58:38 by ben]
ben
parents: 1365
diff changeset
389 (make-obsolete 'tty-color-list 'color-list)
491f8cf78a9c [xemacs-hg @ 2005-01-28 02:58:38 by ben]
ben
parents: 1365
diff changeset
390 (make-compatible 'list-fonts 'font-list)
491f8cf78a9c [xemacs-hg @ 2005-01-28 02:58:38 by ben]
ben
parents: 1365
diff changeset
391
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 ;; Two loser functions which shouldn't be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 (make-obsolete 'following-char 'char-after)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 (make-obsolete 'preceding-char 'char-before)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 ;; Keywords already do The Right Thing in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 (make-compatible 'define-widget-keywords "Just use them")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 (make-obsolete 'function-called-at-point 'function-at-point)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400
4905
755ae5b97edb Change "special form" to "special operator" in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4885
diff changeset
401 ;; As of 21.5, #'throw is a special operator. This makes bytecode using it
4677
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
402 ;; compiled for 21.4 fail; making this function available works around that.
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
403 (defun obsolete-throw (tag value)
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
404 "Ugly compatibility hack.
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
405
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
406 See the implementation of #'funcall in eval.c. This should be removed once
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
407 we no longer encounter bytecode from 21.4."
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
408 (throw tag value))
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
409
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
410 (make-obsolete
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
411 'obsolete-throw
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
412 "it says `obsolete' in the name, you know you shouldn't be using this.")
8f1ee2d15784 Support full Common Lisp multiple values in C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4317
diff changeset
413
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 (provide 'obsolete)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 ;;; obsolete.el ends here