Mercurial > hg > xemacs-beta
comparison lisp/prim/obsolete.el @ 98:0d2f883870bc r20-1b1
Import from CVS: tag r20-1b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:13:56 +0200 |
parents | 54cc21c15cbb |
children | 4be1180a9e89 |
comparison
equal
deleted
inserted
replaced
97:498bf5da1c90 | 98:0d2f883870bc |
---|---|
36 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN | 36 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN |
37 as obsolete." | 37 as obsolete." |
38 (define-function oldfun newfun) | 38 (define-function oldfun newfun) |
39 (make-obsolete oldfun newfun)) | 39 (make-obsolete oldfun newfun)) |
40 | 40 |
41 (defsubst define-compatible-function-alias (oldfun newfun) | |
42 "Define OLDFUN as a compatible alias for function NEWFUN. | |
43 This makes calling OLDFUN equivalent to calling NEWFUN and marks OLDFUN | |
44 as provided for compatibility only." | |
45 (define-function oldfun newfun) | |
46 (make-compatible oldfun newfun)) | |
47 | |
41 (defsubst define-obsolete-variable-alias (oldvar newvar) | 48 (defsubst define-obsolete-variable-alias (oldvar newvar) |
42 "Define OLDVAR as an obsolete alias for varction NEWVAR. | 49 "Define OLDVAR as an obsolete alias for varction NEWVAR. |
43 This makes referencing or setting OLDVAR equivalent to referencing or | 50 This makes referencing or setting OLDVAR equivalent to referencing or |
44 setting NEWVAR and marks OLDVAR as obsolete." | 51 setting NEWVAR and marks OLDVAR as obsolete." |
45 (defvaralias oldvar newvar) | 52 (defvaralias oldvar newvar) |
46 (make-obsolete-variable oldvar newvar)) | 53 (make-obsolete-variable oldvar newvar)) |
47 | 54 |
55 (defsubst define-compatible-variable-alias (oldvar newvar) | |
56 "Define OLDVAR as a compatible alias for varction NEWVAR. | |
57 This makes referencing or setting OLDVAR equivalent to referencing or | |
58 setting NEWVAR and marks OLDVAR as provided for compatibility only." | |
59 (defvaralias oldvar newvar) | |
60 (make-compatible-variable oldvar newvar)) | |
61 | |
48 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff | 62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; device stuff |
49 | 63 |
50 (make-obsolete-variable 'window-system "use (console-type)") | 64 (make-obsolete-variable 'window-system "use (console-type)") |
51 (make-obsolete-variable 'meta-flag | 65 (make-obsolete-variable 'meta-flag |
52 "use the `set-input-mode' function instead.") | 66 "use the `set-input-mode' function instead.") |
53 | 67 |
54 (defun x-display-color-p (&optional device) | 68 (defun x-display-color-p (&optional device) |
55 "Returns non-nil if DEVICE is a color device." | 69 "Returns non-nil if DEVICE is a color device." |
56 (eq 'color (device-class device))) | 70 (eq 'color (device-class device))) |
57 (make-obsolete 'x-display-color-p 'device-class) | 71 (make-compatible 'x-display-color-p 'device-class) |
58 | 72 |
59 (define-function 'x-color-display-p 'x-display-color-p) | 73 (define-function 'x-color-display-p 'x-display-color-p) |
60 (make-obsolete 'x-display-color-p 'device-class) | 74 (make-compatible 'x-display-color-p 'device-class) |
61 | 75 |
62 (defun x-display-grayscale-p (&optional device) | 76 (defun x-display-grayscale-p (&optional device) |
63 "Returns non-nil if DEVICE is a grayscale device." | 77 "Returns non-nil if DEVICE is a grayscale device." |
64 (eq 'grayscale (device-class device))) | 78 (eq 'grayscale (device-class device))) |
65 (make-obsolete 'x-display-grayscale-p 'device-class) | 79 (make-compatible 'x-display-grayscale-p 'device-class) |
66 | 80 |
67 (define-function 'x-grayscale-display-p 'x-display-grayscale-p) | 81 (define-function 'x-grayscale-display-p 'x-display-grayscale-p) |
68 (make-obsolete 'x-display-grayscale-p 'device-class) | 82 (make-compatible 'x-display-grayscale-p 'device-class) |
69 | 83 |
70 (define-obsolete-function-alias 'x-display-pixel-width 'device-pixel-width) | 84 (define-compatible-function-alias 'x-display-pixel-width 'device-pixel-width) |
71 (define-obsolete-function-alias 'x-display-pixel-height | 85 (define-compatible-function-alias 'x-display-pixel-height |
72 'device-pixel-height) | 86 'device-pixel-height) |
73 (define-obsolete-function-alias 'x-display-planes 'device-bitplanes) | 87 (define-compatible-function-alias 'x-display-planes 'device-bitplanes) |
74 (define-obsolete-function-alias 'x-display-color-cells 'device-color-cells) | 88 (define-compatible-function-alias 'x-display-color-cells 'device-color-cells) |
75 | 89 |
76 (define-obsolete-function-alias 'baud-rate 'device-baud-rate) | 90 (define-obsolete-function-alias 'baud-rate 'device-baud-rate) |
77 | 91 |
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events | 92 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; events |
79 | 93 |
244 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist) | 258 (define-obsolete-variable-alias 'default-frame-alist 'default-frame-plist) |
245 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist) | 259 (define-obsolete-variable-alias 'default-x-frame-alist 'default-x-frame-plist) |
246 (define-obsolete-variable-alias 'default-tty-frame-alist | 260 (define-obsolete-variable-alias 'default-tty-frame-alist |
247 'default-tty-frame-plist) | 261 'default-tty-frame-plist) |
248 | 262 |
249 (make-obsolete 'frame-parameters 'frame-property) | 263 (make-compatible 'frame-parameters 'frame-property) |
250 (defun frame-parameters (&optional frame) | 264 (defun frame-parameters (&optional frame) |
251 "Return the parameters-alist of frame FRAME. | 265 "Return the parameters-alist of frame FRAME. |
252 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol. | 266 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol. |
253 The meaningful PARMs depend on the kind of frame. | 267 The meaningful PARMs depend on the kind of frame. |
254 If FRAME is omitted, return information on the currently selected frame. | 268 If FRAME is omitted, return information on the currently selected frame. |
263 ;; destructive. Since most callers now use `frame-parameters', we'll | 277 ;; destructive. Since most callers now use `frame-parameters', we'll |
264 ;; do it this way. Should probably change this at some point in the | 278 ;; do it this way. Should probably change this at some point in the |
265 ;; future. | 279 ;; future. |
266 (destructive-plist-to-alist (frame-properties frame))) | 280 (destructive-plist-to-alist (frame-properties frame))) |
267 | 281 |
268 (make-obsolete 'modify-frame-parameters 'set-frame-properties) | 282 (make-compatible 'modify-frame-parameters 'set-frame-properties) |
269 (defun modify-frame-parameters (frame alist) | 283 (defun modify-frame-parameters (frame alist) |
270 "Modify the properties of frame FRAME according to ALIST. | 284 "Modify the properties of frame FRAME according to ALIST. |
271 ALIST is an alist of properties to change and their new values. | 285 ALIST is an alist of properties to change and their new values. |
272 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol. | 286 Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol. |
273 The meaningful PARMs depend on the kind of frame. | 287 The meaningful PARMs depend on the kind of frame. |
306 "use after-change-functions; which is a list of functions rather than a single function.") | 320 "use after-change-functions; which is a list of functions rather than a single function.") |
307 | 321 |
308 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion | 322 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion |
309 | 323 |
310 (define-obsolete-function-alias 'insert-and-inherit 'insert) | 324 (define-obsolete-function-alias 'insert-and-inherit 'insert) |
311 (define-obsolete-function-alias 'insert-before-markers-and-inerhit | 325 (define-obsolete-function-alias 'insert-before-markers-and-inherit |
312 'insert-before-markers) | 326 'insert-before-markers) |
313 | 327 |
314 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps | 328 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps |
315 | 329 |
316 (defun keymap-parent (keymap) | 330 (defun keymap-parent (keymap) |
378 | 392 |
379 (make-obsolete-variable 'executing-macro 'executing-kbd-macro) | 393 (make-obsolete-variable 'executing-macro 'executing-kbd-macro) |
380 | 394 |
381 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline | 395 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; modeline |
382 | 396 |
383 (define-obsolete-function-alias 'redraw-mode-line 'redraw-modeline) | 397 (define-compatible-function-alias 'redraw-mode-line 'redraw-modeline) |
384 (define-obsolete-function-alias 'force-mode-line-update | 398 (define-compatible-function-alias 'force-mode-line-update |
385 'redraw-modeline) ;; FSF compatibility | 399 'redraw-modeline) ;; FSF compatibility |
386 (define-obsolete-variable-alias 'mode-line-map 'modeline-map) | 400 (define-compatible-variable-alias 'mode-line-map 'modeline-map) |
387 (define-obsolete-variable-alias 'mode-line-buffer-identification | 401 (define-compatible-variable-alias 'mode-line-buffer-identification |
388 'modeline-buffer-identification) | 402 'modeline-buffer-identification) |
389 (define-obsolete-variable-alias 'mode-line-process 'modeline-process) | 403 (define-compatible-variable-alias 'mode-line-process 'modeline-process) |
390 (define-obsolete-variable-alias 'mode-line-modified 'modeline-modified) | 404 (define-compatible-variable-alias 'mode-line-modified 'modeline-modified) |
391 (make-obsolete-variable 'mode-line-inverse-video | 405 (make-compatible-variable 'mode-line-inverse-video |
392 "use set-face-highlight-p and set-face-reverse-p") | 406 "use set-face-highlight-p and set-face-reverse-p") |
393 (define-obsolete-variable-alias 'default-mode-line-format | 407 (define-compatible-variable-alias 'default-mode-line-format |
394 'default-modeline-format) | 408 'default-modeline-format) |
395 (define-obsolete-variable-alias 'mode-line-format 'modeline-format) | 409 (define-compatible-variable-alias 'mode-line-format 'modeline-format) |
396 (define-obsolete-variable-alias 'mode-line-menu 'modeline-menu) | 410 (define-compatible-variable-alias 'mode-line-menu 'modeline-menu) |
397 | 411 |
398 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse | 412 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; mouse |
399 | 413 |
400 ;;; (defun mouse-eval-last-sexpr (event) | 414 ;;; (defun mouse-eval-last-sexpr (event) |
401 ;;; (interactive "@e") | 415 ;;; (interactive "@e") |