annotate lisp/obsolete.el @ 5893:d3d073aceaea

Merge.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 18 Apr 2015 23:10:40 +0100
parents 15041705c196
children
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.
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
6 ;; Copyright (C) 2002, 2004, 2010 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
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
13 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
14 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
15 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
16 ;; option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
18 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
19 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
20 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
21 ;; for more details.
428
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
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5255
diff changeset
24 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;;; Synched up with: Not in FSF.
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 ;;; Commentary:
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 ;; This file is dumped with XEmacs.
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 ;; The obsoleteness support used to be scattered throughout various
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ;; 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
34 ;; from other source files and to facilitate creating/updating things
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 ;; like sysdep.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
39 (defsubst define-obsolete-function-alias (oldfun newfun
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
40 &optional when docstring)
428
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
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
43 as obsolete.
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
44 Optional WHEN is for GNU compatibility. XEmacs ignores it. \(In Emacs, WHEN
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
45 is a string indicating the version where OLDFUN was first marked obsolete.)
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
46 Optional DOCSTRING describes any changes in semantics users should be aware of."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (define-function oldfun newfun)
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
48 (make-obsolete oldfun (or docstring newfun) when))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
50 (defsubst define-compatible-function-alias (oldfun newfun
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
51 &optional when docstring)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 "Define OLDFUN as a compatible alias for function NEWFUN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
54 as provided for compatibility only.
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
55 Optional WHEN is for consistency with `define-obsolete-function-alias'. XEmacs
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
56 ignores it. \(If present, it is a string indicating the version where OLDFUN
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
57 was first marked as a compatibility API.)
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
58 Optional DOCSTRING describes any changes in semantics users should be aware of."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (define-function oldfun newfun)
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
60 (make-compatible oldfun (or docstring newfun)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
62 (defsubst define-obsolete-variable-alias (oldvar newvar
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
63 &optional when docstring)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 "Define OLDVAR as an obsolete alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 This makes referencing or setting OLDVAR equivalent to referencing or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 setting NEWVAR and marks OLDVAR as obsolete.
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
67 If OLDVAR was bound and NEWVAR was not, set NEWVAR to OLDVAR.
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
68 Note: Use this before any other references (defvar/defcustom) to NEWVAR.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
70 Optional WHEN is for GNU compatibility. XEmacs ignores it. \(In Emacs, WHEN
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
71 is a string indicating the version where OLDVAR was first marked obsolete.)
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
72 Optional DOCSTRING describes any changes in semantics users should be aware of."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (let ((needs-setting (and (boundp oldvar) (not (boundp newvar))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 (value (and (boundp oldvar) (symbol-value oldvar))))
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
75 (defvaralias oldvar newvar docstring)
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
76 (make-obsolete-variable oldvar newvar when)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 (and needs-setting (set newvar value))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
79 (defsubst define-compatible-variable-alias (oldvar newvar
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
80 &optional when docstring)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 "Define OLDVAR as a compatible alias for variable NEWVAR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 This makes referencing or setting OLDVAR equivalent to referencing or
5717
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
83 setting NEWVAR and marks OLDVAR as provided for compatibility only.
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
84 Optional WHEN is for consistency with `define-obsolete-variable-alias'. XEmacs
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
85 ignores it. \(If present, it is a string indicating the version where OLDFUN
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
86 was first marked as a compatibility API.)
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
87 Optional DOCSTRING describes any changes in semantics users should be aware of."
1fd684db4d45 Improve GNU-compatibility of define-*-alias.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
88 (defvaralias oldvar newvar docstring)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 (make-compatible-variable oldvar newvar))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
91 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; buffers
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
92
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
93 (define-obsolete-function-alias 'show-buffer 'set-window-buffer)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
94 (define-obsolete-function-alias 'buffer-flush-undo 'buffer-disable-undo)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
95 (make-compatible 'eval-current-buffer 'eval-buffer)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
96
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
97 (defun buffer-local-value (variable buffer)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
98 "Return the value of VARIABLE in BUFFER.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
99 If VARIABLE does not have a buffer-local binding in BUFFER, the value
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
100 is the default binding of variable."
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
101 (symbol-value-in-buffer variable buffer))
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
102 (make-compatible 'buffer-local-value 'symbol-value-in-buffer)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
103
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff
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-compatible-variable 'window-system "use (console-type)")
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 (defun x-display-color-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 "Return t if DEVICE is a color device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (eq 'color (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 (make-compatible 'x-display-color-p 'device-class)
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 (define-function 'x-color-display-p 'x-display-color-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (make-compatible 'x-display-color-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (defun x-display-grayscale-p (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 "Return t if DEVICE is a grayscale device."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (eq 'grayscale (device-class device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (make-compatible 'x-display-grayscale-p 'device-class)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (define-function 'x-grayscale-display-p 'x-display-grayscale-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 (make-compatible 'x-display-grayscale-p 'device-class)
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 (define-compatible-function-alias 'x-display-pixel-width 'device-pixel-width)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 (define-compatible-function-alias 'x-display-pixel-height 'device-pixel-height)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 (define-compatible-function-alias 'x-display-planes 'device-bitplanes)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (define-compatible-function-alias 'x-display-color-cells 'device-color-cells)
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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events
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 (define-obsolete-function-alias 'menu-event-p 'misc-user-event-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (make-obsolete-variable 'unread-command-char 'unread-command-events)
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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; extents
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 (make-obsolete 'set-window-dot 'set-window-point)
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 (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
139 (define-compatible-variable-alias 'parse-sexp-lookup-properties
ccaf90c5a53a [xemacs-hg @ 2002-10-02 09:29:37 by stephent]
stephent
parents: 883
diff changeset
140 'lookup-syntax-properties)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; frames
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
143
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 (defun frame-first-window (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 "Return the topmost, leftmost window of FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 If omitted, FRAME defaults to the currently selected frame."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (frame-highest-window frame 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (make-compatible 'frame-first-window 'frame-highest-window)
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 (define-obsolete-variable-alias 'initial-frame-alist 'initial-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (define-obsolete-variable-alias 'minibuffer-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 'minibuffer-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (define-obsolete-variable-alias 'pop-up-frame-alist 'pop-up-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (define-obsolete-variable-alias 'special-display-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 'special-display-frame-plist)
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 ;; Defined in C.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 (define-obsolete-variable-alias 'default-tty-frame-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 'default-tty-frame-plist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 (make-compatible 'frame-parameters 'frame-property)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 (defun frame-parameters (&optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 "Return the parameters-alist of frame FRAME.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 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
168 The meaningful PARMs depend on the kind of frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 If FRAME is omitted, return information on the currently selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 See the variables `default-frame-plist', `default-x-frame-plist', and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 `default-tty-frame-plist' for a description of the parameters meaningful
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 for particular types of frames."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 ;; #### This relies on a `copy-sequence' of the user properties in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 ;; `frame-properties'. Removing that would make `frame-properties' more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 ;; efficient but this function less efficient, as we couldn't be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 ;; destructive. Since most callers now use `frame-parameters', we'll
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 ;; 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
180 ;; future.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (destructive-plist-to-alist (frame-properties frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
883
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
183 (make-compatible 'frame-parameter 'frame-property)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
184 (defun frame-parameter (frame parameter)
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
185 "Return FRAME's value for parameter PARAMETER.
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
186 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
187 (cdr (assq parameter (frame-parameters frame))))
1e9272790fe0 [xemacs-hg @ 2002-06-26 00:11:15 by youngs]
youngs
parents: 863
diff changeset
188
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 (make-compatible 'modify-frame-parameters 'set-frame-properties)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 (defun modify-frame-parameters (frame alist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 "Modify the properties of frame FRAME according to ALIST.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 ALIST is an alist of properties to change and their new values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 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
194 The meaningful PARMs depend on the kind of frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 See `set-frame-properties' for built-in property names."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 ;; 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
198 (set-frame-properties frame (alist-to-plist alist)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; faces
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 (define-obsolete-function-alias 'list-faces-display 'edit-faces)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 (define-obsolete-function-alias 'list-faces 'face-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
205 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; fonts and colors
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
207 (defun x-color-values (color &optional frame)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
208 "Return a description of the color named COLOR on frame FRAME.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
209 The value is a list of integer RGB values--(RED GREEN BLUE).
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
210 These values appear to range from 0 to 65280 or 65535, depending
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
211 on the system; white is (65280 65280 65280) or (65535 65535 65535).
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
212 If FRAME is omitted or nil, use the selected frame."
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
213 (color-instance-rgb-components (make-color-instance color)))
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
214 (make-compatible 'x-color-values 'color-instance-rgb-components)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
216 (make-obsolete 'mswindows-color-list 'color-list)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
217 (make-obsolete 'tty-color-list 'color-list)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
218 (make-compatible 'list-fonts 'font-list)
428
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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; hooks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (make-compatible-variable 'lisp-indent-hook 'lisp-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 (make-compatible-variable 'comment-indent-hook 'comment-indent-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (make-obsolete-variable 'temp-buffer-show-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 'temp-buffer-show-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (make-obsolete-variable 'inhibit-local-variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 "use `enable-local-variables' (with the reversed sense).")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 (make-obsolete-variable 'suspend-hooks 'suspend-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (make-obsolete-variable 'first-change-function 'first-change-hook)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (make-obsolete-variable 'before-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 "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
232 (make-obsolete-variable 'after-change-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 "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
234
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
235 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion, deletion, movement
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 (define-compatible-function-alias 'insert-and-inherit 'insert)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 (define-compatible-function-alias 'insert-before-markers-and-inherit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 'insert-before-markers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
241 (define-compatible-function-alias 'line-beginning-position 'point-at-bol)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
242 (define-compatible-function-alias 'line-end-position 'point-at-eol)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
243
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
244 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lisp engine, basic Lisp stuff
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
245
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
246 (make-obsolete 'function-called-at-point 'function-at-point)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
247
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
248 ;; As of 21.5, #'throw is a special operator. This makes bytecode using it
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
249 ;; compiled for 21.4 fail; making this function available works around that.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
250 (defun obsolete-throw (tag value)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
251 "Ugly compatibility hack.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
252
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
253 See the implementation of #'funcall in eval.c. This should be removed once
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
254 we no longer encounter bytecode from 21.4."
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
255 (throw tag value))
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
256
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
257 (make-obsolete
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
258 'obsolete-throw
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
259 "it says `obsolete' in the name, you know you shouldn't be using this.")
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
260
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
261 (define-compatible-function-alias 'cl-mapc 'mapc)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
262
5387
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
263 ;; Various non-XEmacs code can call this, because it used not be
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
264 ;; called automatically at dump time.
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
265 (define-function 'cl-float-limits 'ignore)
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
266 (make-obsolete 'cl-float-limits "this is called at dump time in 21.5 and \
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
267 later, no need to call it in user code.")
5f5d48053e86 Drop #'cl-finite-do, defalias #'cl-float-limits to #'ignore in dumped XEmacs
Aidan Kehoe <kehoea@parhasard.net>
parents: 5368
diff changeset
268
5327
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
269 ;; XEmacs; old compiler macros meant that this was called directly
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
270 ;; from compiled code, and we need to provide a version of it for a
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
271 ;; couple of years at least because of that. Aidan Kehoe, Mon Oct 4
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
272 ;; 12:06:41 IST 2010
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
273 (defun cl-delete-duplicates (cl-seq cl-keys cl-copy)
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
274 (apply (if cl-copy #'remove-duplicates #'delete-duplicates) cl-seq cl-keys))
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
275
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
276 (make-obsolete 'cl-delete-duplicates 'delete-duplicates)
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
277
5635
2fc3f2f35523 Put back compatibility alias for #'cl-puthash, used by 21.4's setf expansion
Aidan Kehoe <kehoea@parhasard.net>
parents: 5583
diff changeset
278 ;; This occurs because of setf expansion by 21.4, changing the affected
2fc3f2f35523 Put back compatibility alias for #'cl-puthash, used by 21.4's setf expansion
Aidan Kehoe <kehoea@parhasard.net>
parents: 5583
diff changeset
279 ;; packages won't fix that.
2fc3f2f35523 Put back compatibility alias for #'cl-puthash, used by 21.4's setf expansion
Aidan Kehoe <kehoea@parhasard.net>
parents: 5583
diff changeset
280 (define-obsolete-function-alias 'cl-puthash 'puthash)
2fc3f2f35523 Put back compatibility alias for #'cl-puthash, used by 21.4's setf expansion
Aidan Kehoe <kehoea@parhasard.net>
parents: 5583
diff changeset
281
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
282 ; old names
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
283 (define-compatible-function-alias 'byte-code-function-p
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
284 'compiled-function-p) ;FSFmacs
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
285
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
286 (define-compatible-function-alias 'interactive-form
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
287 'function-interactive) ;GNU 21.1
5583
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
288 (define-function 'assq-delete-all 'remassq) ;GNU 21.1
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
289 (make-compatible 'assq-delete-all "use (delete* ITEM SEQUENCE :key #'car)")
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
290
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
291 (defun makehash (&optional test)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
292 "Create a new hash table.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
293 Optional first argument TEST specifies how to compare keys in the table.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
294 Predefined tests are `eq', `eql', and `equal'. Default is `eql'."
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
295 (make-hash-table :test test))
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
296 (make-compatible 'makehash 'make-hash-table)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
297
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
298 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keys, keymaps
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 (defun keymap-parent (keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 "Return the first parent of the given keymap."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (car (keymap-parents keymap)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (make-compatible 'keymap-parent 'keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 (defun set-keymap-parent (keymap parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 "Make the given keymap have (only) the given parent."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 (set-keymap-parents keymap (if parent (list parent) '()))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 parent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 (make-compatible 'set-keymap-parent 'set-keymap-parents)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310
5208
9fa29ec759e3 Implement suggest-key-bindings in terms of teach-extended-commands-p
Aidan Kehoe <kehoea@parhasard.net>
parents: 5175
diff changeset
311 (make-compatible-variable 'suggest-key-bindings 'teach-extended-commands-p)
9fa29ec759e3 Implement suggest-key-bindings in terms of teach-extended-commands-p
Aidan Kehoe <kehoea@parhasard.net>
parents: 5175
diff changeset
312
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
313 ;; too bad there's not a way to check for aref, assq, and nconc
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
314 ;; being called on the values of functions known to return keymaps,
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
315 ;; or known to return vectors of events instead of strings...
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
316
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
317 ;;; Yes there is; make compiler macros for aref, assq, nconc, checking that
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
318 ;;; the car of the relevant argument is sane.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
319
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
320 (make-obsolete-variable 'executing-macro 'executing-kbd-macro)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
321
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
324 (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
325 "Obsolete. See the function `add-menu-button'."
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
326 (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
327 (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
328 (make-obsolete 'add-menu-item 'add-menu-button)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
330 (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
331 "See the function `add-submenu'."
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
332 (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
333 (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
334 (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
335 ;; 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
336 (make-compatible 'add-menu 'add-submenu)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337
4317
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
338 (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
339 'package-ui-download-menu)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
340
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
341 (unless (featurep 'menubar)
15d36164ebd7 Eliminate lost docstring warnings on 21.5.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4222
diff changeset
342 ;; 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
343 ;; 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
344 ;; 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
345 (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
346
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 (define-compatible-function-alias 'read-minibuffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 'read-expression) ; misleading name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 (define-compatible-function-alias 'read-input 'read-string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 (define-compatible-function-alias 'force-mode-line-update
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 'redraw-modeline) ;; FSF compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 (define-compatible-variable-alias 'mode-line-map 'modeline-map)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 (define-compatible-variable-alias 'mode-line-buffer-identification
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 'modeline-buffer-identification)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 (define-compatible-variable-alias 'mode-line-process 'modeline-process)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 (define-compatible-variable-alias 'mode-line-modified 'modeline-modified)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 (make-compatible-variable 'mode-line-inverse-video
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 "use set-face-highlight-p and set-face-reverse-p")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 (define-compatible-variable-alias 'default-mode-line-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 'default-modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 (define-compatible-variable-alias 'mode-line-format 'modeline-format)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 (define-compatible-variable-alias 'mode-line-menu 'modeline-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 ;;; (defun mouse-eval-last-sexpr (event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 ;;; (interactive "@e")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 ;;; (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 ;;; (mouse-set-point event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 ;;; (eval-last-sexp nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 (define-obsolete-function-alias 'mouse-eval-last-sexpr 'mouse-eval-sexp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 (defun read-mouse-position (frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 (cdr (mouse-position (frame-device frame))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 (make-obsolete 'read-mouse-position 'mouse-position)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
384 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; paths
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
385
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
386 (defvar Info-default-directory-list nil
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
387 "This used to be the initial value of Info-directory-list.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
388 If you want to change the locations where XEmacs looks for info files,
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
389 set Info-directory-list.")
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
390 (make-obsolete-variable 'Info-default-directory-list 'Info-directory-list)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
391
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
392 (defvar init-file-user nil
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
393 "This used to be the name of the user whose init file was read at startup.")
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
394 (make-obsolete-variable 'init-file-user 'load-user-init-file-p)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
395
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
396 (define-obsolete-function-alias 'pui-add-install-directory
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
397 'pui-set-local-package-get-directory) ; misleading name
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
398
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (defun redraw-display (&optional device)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 (if (eq device t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 (mapcar 'redisplay-device (device-list))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 (redisplay-device device)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
406 ;; the functionality of column.el has been moved into C
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
407 ;; Function obsoleted for XEmacs 20.0/February 1997.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
408 (defalias 'display-column-mode 'column-number-mode)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
409
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
410 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; selections
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
411
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
412 (define-obsolete-function-alias 'isearch-yank-x-selection
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
413 'isearch-yank-selection)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
414 (define-obsolete-function-alias 'isearch-yank-x-clipboard
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
415 'isearch-yank-clipboard)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
416
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
417 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; text and strings
777
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
418
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
419 (define-obsolete-function-alias 'sref 'aref)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
420
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
421 (defun char-bytes (character)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
422 "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
423 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
424 1)
e65d9cf16707 [xemacs-hg @ 2002-03-15 11:00:28 by ben]
ben
parents: 771
diff changeset
425 (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
426
860
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
427 (defun find-non-ascii-charset-string (string)
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
428 "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
429 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
430 because its `find-charset-string' ignores ASCII charset."
5652
cc6f0266bc36 Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
Aidan Kehoe <kehoea@parhasard.net>
parents: 5635
diff changeset
431 (delete* 'ascii
cc6f0266bc36 Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
Aidan Kehoe <kehoea@parhasard.net>
parents: 5635
diff changeset
432 (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
433 (make-obsolete 'find-non-ascii-charset-string
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
434 "use (delq 'ascii (charsets-in-string STRING)) instead.")
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
435
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
436 (defun find-non-ascii-charset-region (start end)
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
437 "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
438 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
439 because its `find-charset-string' ignores ASCII charset."
5652
cc6f0266bc36 Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
Aidan Kehoe <kehoea@parhasard.net>
parents: 5635
diff changeset
440 (delete* 'ascii (and-fboundp 'charsets-in-region
cc6f0266bc36 Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
Aidan Kehoe <kehoea@parhasard.net>
parents: 5635
diff changeset
441 (charsets-in-region start end))))
860
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
442 (make-obsolete 'find-non-ascii-charset-region
b6fa6d07e6f8 [xemacs-hg @ 2002-06-01 20:34:00 by youngs]
youngs
parents: 818
diff changeset
443 "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
444
3555
db783273b399 [xemacs-hg @ 2006-08-11 01:30:22 by vins]
vins
parents: 2527
diff changeset
445 ;; < 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
446 (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
447
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 ;; Two loser functions which shouldn't be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 (make-obsolete 'following-char 'char-after)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 (make-obsolete 'preceding-char 'char-before)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451
5175
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
452
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
453 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; misc
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
454
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
455 ;; (defun user-original-login-name ()
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
456 ;; "Return user's login name from original login.
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
457 ;; This tries to remain unaffected by `su', by looking in environment variables."
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
458 ;; (or (getenv "LOGNAME") (getenv "USER") (user-login-name)))
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
459 (define-obsolete-function-alias 'user-original-login-name 'user-login-name)
dc94bf0afa37 rearrange stuff in obsolete.el
Ben Wing <ben@xemacs.org>
parents: 4996
diff changeset
460
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 ;; Keywords already do The Right Thing in XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 (make-compatible 'define-widget-keywords "Just use them")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463
5229
7d06a8bf47d2 Move #'purecopy from alloc.c to being an obsolete alias for #'identity
Aidan Kehoe <kehoea@parhasard.net>
parents: 5208
diff changeset
464 (define-function 'purecopy 'identity)
7d06a8bf47d2 Move #'purecopy from alloc.c to being an obsolete alias for #'identity
Aidan Kehoe <kehoea@parhasard.net>
parents: 5208
diff changeset
465 (make-obsolete 'purecopy "purespace is not available in XEmacs.")
4995
8431b52e43b1 Move the various map* functions to C; add #'map-into.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4885
diff changeset
466
5255
b5611afbcc76 Support process plists, for greater GNU compatibility.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5229
diff changeset
467 (define-compatible-function-alias 'process-get 'get)
b5611afbcc76 Support process plists, for greater GNU compatibility.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5229
diff changeset
468 (define-compatible-function-alias 'process-put 'put)
b5611afbcc76 Support process plists, for greater GNU compatibility.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5229
diff changeset
469 (define-compatible-function-alias 'process-plist 'object-plist)
b5611afbcc76 Support process plists, for greater GNU compatibility.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5229
diff changeset
470 (define-compatible-function-alias 'set-process-plist 'object-setplist)
b5611afbcc76 Support process plists, for greater GNU compatibility.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5229
diff changeset
471
5327
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
472 (define-function 'memql 'member*)
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
473 (make-compatible 'memql "use the more full-featured `member*' instead.")
d1b17a33450b Move the heavy lifting from cl-seq.el to C.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5255
diff changeset
474
5562
855b667dea13 Drop cl-macro-environment in favour of byte-compile-macro-environment.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5475
diff changeset
475 (define-obsolete-variable-alias 'cl-macro-environment
855b667dea13 Drop cl-macro-environment in favour of byte-compile-macro-environment.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5475
diff changeset
476 'byte-compile-macro-environment)
855b667dea13 Drop cl-macro-environment in favour of byte-compile-macro-environment.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5475
diff changeset
477
5583
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
478 ;; Actual implementations of these functions are in cl-extra.el, after
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
479 ;; cl-macs is loaded, since those implementations use #'labels and
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
480 ;; #'symbol-macrolet. These APIs were always XEmacs-specific, were never
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
481 ;; widely used, and it was always more readable and more compatible to use
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
482 ;; the CL functions.
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
483 (make-obsolete 'remassoc "use delete* with :test #'equal, :key #'car")
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
484 (make-obsolete 'remassq "use delete* with :test #'eq, :key #'car")
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
485 (make-obsolete 'remrassoc "use delete* with :test #'equal, :key #'cdr")
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
486 (make-obsolete 'remrassq "use delete* with :test #'eq, :key #'cdr")
10f179710250 Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5562
diff changeset
487
5863
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
488 (defun max-char ()
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
489 "Return a fixnum one less than `char-code-limit'.
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
490
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
491 In contrast with GNU Emacs, this is not necessarily a valid character, but it
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
492 is an inclusive upper bound on the possible values returned by `char-int'."
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
493 (1- char-code-limit))
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
494 (make-compatible
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
495 'max-char
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
496 "consider `char-code-limit', which gives an exclusive upper bound")
15041705c196 Provide `char-code-limit', implement the GNU equivalent in terms of it.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5717
diff changeset
497
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 (provide 'obsolete)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 ;;; obsolete.el ends here