annotate lisp/obsolete.el @ 367:a4f53d9b3154 r21-1-13

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