Mercurial > hg > xemacs-beta
comparison lisp/obsolete.el @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | e29fcfd8df5f |
children | 6772ce4d982b |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
223 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff | 223 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff |
224 | 224 |
225 (defun add-menu-item (menu-path item-name function enabled-p &optional before) | 225 (defun add-menu-item (menu-path item-name function enabled-p &optional before) |
226 "Obsolete. See the function `add-menu-button'." | 226 "Obsolete. See the function `add-menu-button'." |
227 (or item-name (error "must specify an item name")) | 227 (or item-name (error "must specify an item name")) |
228 (add-menu-button menu-path (vector item-name function enabled-p) before)) | 228 (declare-fboundp (add-menu-button menu-path (vector item-name function enabled-p) before))) |
229 (make-obsolete 'add-menu-item 'add-menu-button) | 229 (make-obsolete 'add-menu-item 'add-menu-button) |
230 | 230 |
231 (defun add-menu (menu-path menu-name menu-items &optional before) | 231 (defun add-menu (menu-path menu-name menu-items &optional before) |
232 "See the function `add-submenu'." | 232 "See the function `add-submenu'." |
233 (or menu-name (error "must specify a menu name")) | 233 (or menu-name (error "must specify a menu name")) |
234 (or menu-items (error "must specify some menu items")) | 234 (or menu-items (error "must specify some menu items")) |
235 (add-submenu menu-path (cons menu-name menu-items) before)) | 235 (declare-fboundp (add-submenu menu-path (cons menu-name menu-items) before))) |
236 ;; Can't make this obsolete. easymenu depends on it. | 236 ;; Can't make this obsolete. easymenu depends on it. |
237 (make-compatible 'add-menu 'add-submenu) | 237 (make-compatible 'add-menu 'add-submenu) |
238 | 238 |
239 (define-obsolete-function-alias 'package-get-download-menu | 239 (define-obsolete-function-alias 'package-get-download-menu |
240 'package-ui-download-menu) | 240 'package-ui-download-menu) |
241 | |
242 (unless (featurep 'menubar) | |
243 ;; Don't provide the last three functions unless the menubar feature is | |
244 ;; available. This approach (with #'unintern) avoids warnings about lost | |
245 ;; docstrings since make-docfile doesn't parse bytecode. | |
246 (mapc #'unintern '(add-menu-item add-menu package-get-download-menu))) | |
241 | 247 |
242 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer | 248 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer |
243 | 249 |
244 (define-compatible-function-alias 'read-minibuffer | 250 (define-compatible-function-alias 'read-minibuffer |
245 'read-expression) ; misleading name | 251 'read-expression) ; misleading name |
343 | 349 |
344 (defun find-non-ascii-charset-string (string) | 350 (defun find-non-ascii-charset-string (string) |
345 "Return a list of charsets in the STRING except ascii. | 351 "Return a list of charsets in the STRING except ascii. |
346 It might be available for compatibility with Mule 2.3, | 352 It might be available for compatibility with Mule 2.3, |
347 because its `find-charset-string' ignores ASCII charset." | 353 because its `find-charset-string' ignores ASCII charset." |
348 (delq 'ascii (charsets-in-string string))) | 354 (delq 'ascii (and-fboundp #'charsets-in-string (charsets-in-string string)))) |
349 (make-obsolete 'find-non-ascii-charset-string | 355 (make-obsolete 'find-non-ascii-charset-string |
350 "use (delq 'ascii (charsets-in-string STRING)) instead.") | 356 "use (delq 'ascii (charsets-in-string STRING)) instead.") |
351 | 357 |
352 (defun find-non-ascii-charset-region (start end) | 358 (defun find-non-ascii-charset-region (start end) |
353 "Return a list of charsets except ascii in the region between START and END. | 359 "Return a list of charsets except ascii in the region between START and END. |
354 It might be available for compatibility with Mule 2.3, | 360 It might be available for compatibility with Mule 2.3, |
355 because its `find-charset-string' ignores ASCII charset." | 361 because its `find-charset-string' ignores ASCII charset." |
356 (delq 'ascii (charsets-in-region start end))) | 362 (delq 'ascii (and-fboundp #'charsets-in-region |
363 (charsets-in-region start end)))) | |
357 (make-obsolete 'find-non-ascii-charset-region | 364 (make-obsolete 'find-non-ascii-charset-region |
358 "use (delq 'ascii (charsets-in-region START END)) instead.") | 365 "use (delq 'ascii (charsets-in-region START END)) instead.") |
366 | |
367 ;; < 21.5 compatibility, eg. https://bugzilla.redhat.com/201524#c2 | |
368 (define-obsolete-function-alias 'string-to-char-list 'string-to-list) | |
359 | 369 |
360 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; window-system objects | 370 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; window-system objects |
361 | 371 |
362 ;; the functionality of column.el has been moved into C | 372 ;; the functionality of column.el has been moved into C |
363 ;; Function obsoleted for XEmacs 20.0/February 1997. | 373 ;; Function obsoleted for XEmacs 20.0/February 1997. |
383 ;; Keywords already do The Right Thing in XEmacs | 393 ;; Keywords already do The Right Thing in XEmacs |
384 (make-compatible 'define-widget-keywords "Just use them") | 394 (make-compatible 'define-widget-keywords "Just use them") |
385 | 395 |
386 (make-obsolete 'function-called-at-point 'function-at-point) | 396 (make-obsolete 'function-called-at-point 'function-at-point) |
387 | 397 |
398 ;; As of 21.5, #'throw is a special form. This makes bytecode using it | |
399 ;; compiled for 21.4 fail; making this function available works around that. | |
400 (defun obsolete-throw (tag value) | |
401 "Ugly compatibility hack. | |
402 | |
403 See the implementation of #'funcall in eval.c. This should be removed once | |
404 we no longer encounter bytecode from 21.4." | |
405 (throw tag value)) | |
406 | |
407 (make-obsolete | |
408 'obsolete-throw | |
409 "it says `obsolete' in the name, you know you shouldn't be using this.") | |
410 | |
388 (provide 'obsolete) | 411 (provide 'obsolete) |
389 ;;; obsolete.el ends here | 412 ;;; obsolete.el ends here |