Mercurial > hg > xemacs-beta
comparison lisp/obsolete.el @ 4222:38ef5a6da799
[xemacs-hg @ 2007-10-13 14:08:26 by aidan]
Fix the nomule package build; eliminate some non-X compile time warnings.
author | aidan |
---|---|
date | Sat, 13 Oct 2007 14:08:30 +0000 |
parents | db783273b399 |
children | 15d36164ebd7 |
comparison
equal
deleted
inserted
replaced
4221:807c86a7612a | 4222:38ef5a6da799 |
---|---|
220 parent) | 220 parent) |
221 (make-compatible 'set-keymap-parent 'set-keymap-parents) | 221 (make-compatible 'set-keymap-parent 'set-keymap-parents) |
222 | 222 |
223 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff | 223 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff |
224 | 224 |
225 (defun add-menu-item (menu-path item-name function enabled-p &optional before) | 225 (when (featurep 'menubar) |
226 "Obsolete. See the function `add-menu-button'." | 226 (defun add-menu-item (menu-path item-name function enabled-p &optional before) |
227 (or item-name (error "must specify an item name")) | 227 "Obsolete. See the function `add-menu-button'." |
228 (add-menu-button menu-path (vector item-name function enabled-p) before)) | 228 (or item-name (error "must specify an item name")) |
229 (make-obsolete 'add-menu-item 'add-menu-button) | 229 (add-menu-button menu-path (vector item-name function enabled-p) before)) |
230 | 230 (make-obsolete 'add-menu-item 'add-menu-button) |
231 (defun add-menu (menu-path menu-name menu-items &optional before) | 231 |
232 "See the function `add-submenu'." | 232 (defun add-menu (menu-path menu-name menu-items &optional before) |
233 (or menu-name (error "must specify a menu name")) | 233 "See the function `add-submenu'." |
234 (or menu-items (error "must specify some menu items")) | 234 (or menu-name (error "must specify a menu name")) |
235 (add-submenu menu-path (cons menu-name menu-items) before)) | 235 (or menu-items (error "must specify some menu items")) |
236 ;; Can't make this obsolete. easymenu depends on it. | 236 (add-submenu menu-path (cons menu-name menu-items) before)) |
237 (make-compatible 'add-menu 'add-submenu) | 237 ;; Can't make this obsolete. easymenu depends on it. |
238 | 238 (make-compatible 'add-menu 'add-submenu) |
239 (define-obsolete-function-alias 'package-get-download-menu | 239 |
240 'package-ui-download-menu) | 240 (define-obsolete-function-alias 'package-get-download-menu |
241 'package-ui-download-menu)) | |
241 | 242 |
242 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer | 243 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer |
243 | 244 |
244 (define-compatible-function-alias 'read-minibuffer | 245 (define-compatible-function-alias 'read-minibuffer |
245 'read-expression) ; misleading name | 246 'read-expression) ; misleading name |
343 | 344 |
344 (defun find-non-ascii-charset-string (string) | 345 (defun find-non-ascii-charset-string (string) |
345 "Return a list of charsets in the STRING except ascii. | 346 "Return a list of charsets in the STRING except ascii. |
346 It might be available for compatibility with Mule 2.3, | 347 It might be available for compatibility with Mule 2.3, |
347 because its `find-charset-string' ignores ASCII charset." | 348 because its `find-charset-string' ignores ASCII charset." |
348 (delq 'ascii (charsets-in-string string))) | 349 (delq 'ascii (and-fboundp #'charsets-in-string (charsets-in-string string)))) |
349 (make-obsolete 'find-non-ascii-charset-string | 350 (make-obsolete 'find-non-ascii-charset-string |
350 "use (delq 'ascii (charsets-in-string STRING)) instead.") | 351 "use (delq 'ascii (charsets-in-string STRING)) instead.") |
351 | 352 |
352 (defun find-non-ascii-charset-region (start end) | 353 (defun find-non-ascii-charset-region (start end) |
353 "Return a list of charsets except ascii in the region between START and END. | 354 "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, | 355 It might be available for compatibility with Mule 2.3, |
355 because its `find-charset-string' ignores ASCII charset." | 356 because its `find-charset-string' ignores ASCII charset." |
356 (delq 'ascii (charsets-in-region start end))) | 357 (delq 'ascii (and-fboundp #'charsets-in-region |
358 (charsets-in-region start end)))) | |
357 (make-obsolete 'find-non-ascii-charset-region | 359 (make-obsolete 'find-non-ascii-charset-region |
358 "use (delq 'ascii (charsets-in-region START END)) instead.") | 360 "use (delq 'ascii (charsets-in-region START END)) instead.") |
359 | 361 |
360 ;; < 21.5 compatibility, eg. https://bugzilla.redhat.com/201524#c2 | 362 ;; < 21.5 compatibility, eg. https://bugzilla.redhat.com/201524#c2 |
361 (define-obsolete-function-alias 'string-to-char-list 'string-to-list) | 363 (define-obsolete-function-alias 'string-to-char-list 'string-to-list) |