annotate lisp/obsolete.el @ 276:6330739388db r21-0b36

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