Mercurial > hg > xemacs-beta
comparison lisp/obsolete.el @ 4317:15d36164ebd7
Eliminate lost docstring warnings on 21.5.
2007-12-09 Aidan Kehoe <kehoea@parhasard.net>
* unicode.el (load-unicode-mapping-tables):
Call #'set-default-unicode-precedence wrapped with
#'declare-fboundp, to avoid warnings on non-Mule builds.
* unicode.el (ccl-encode-to-ucs-2):
* unicode.el (unicode-error-sequence-regexp-range):
* unicode.el (frob-unicode-errors-region):
* unicode.el (unicode-error-translate-region):
Unconditionally provide these functions and variables at top
level in the code, to make them available to make-docfile. For the
INITVALUE args to #'defvar, conditionalise on (featurep 'mule);
ditto for the code that tests the lookup tables and provides the
WGL4 characters as jit-ucs-charset-0 characters.
Unintern the function and variable symbols if (featurep 'mule) is
not true, so their function definitions and so on get garbage
collected at dump time in non-Mule builds.
* obsolete.el (add-menu-item):
* obsolete.el (add-menu):
* obsolete.el (add-menu):
* obsolete.el (package-get-download-menu):
Provide these functions at top level, in order to make them
available to make-docfile.c, which has trouble interpreting byte
code. Unintern their symbols if the menubar feature is not
available, which means they will be garbage collected on
non-menubar builds.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Dec 2007 14:55:03 +0100 |
parents | 38ef5a6da799 |
children | 8f1ee2d15784 |
comparison
equal
deleted
inserted
replaced
4316:2e528ccfe690 | 4317:15d36164ebd7 |
---|---|
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 (when (featurep 'menubar) | 225 (defun add-menu-item (menu-path item-name function enabled-p &optional before) |
226 (defun add-menu-item (menu-path item-name function enabled-p &optional before) | 226 "Obsolete. See the function `add-menu-button'." |
227 "Obsolete. See the function `add-menu-button'." | 227 (or item-name (error "must specify an item name")) |
228 (or item-name (error "must specify an item name")) | 228 (declare-fboundp (add-menu-button menu-path (vector item-name function enabled-p) before))) |
229 (add-menu-button menu-path (vector item-name function enabled-p) before)) | 229 (make-obsolete 'add-menu-item 'add-menu-button) |
230 (make-obsolete 'add-menu-item 'add-menu-button) | 230 |
231 | 231 (defun add-menu (menu-path menu-name menu-items &optional before) |
232 (defun add-menu (menu-path menu-name menu-items &optional before) | 232 "See the function `add-submenu'." |
233 "See the function `add-submenu'." | 233 (or menu-name (error "must specify a menu name")) |
234 (or menu-name (error "must specify a menu name")) | 234 (or menu-items (error "must specify some menu items")) |
235 (or menu-items (error "must specify some menu items")) | 235 (declare-fboundp (add-submenu menu-path (cons menu-name menu-items) before))) |
236 (add-submenu menu-path (cons menu-name menu-items) before)) | 236 ;; Can't make this obsolete. easymenu depends on it. |
237 ;; Can't make this obsolete. easymenu depends on it. | 237 (make-compatible 'add-menu 'add-submenu) |
238 (make-compatible 'add-menu 'add-submenu) | 238 |
239 | 239 (define-obsolete-function-alias 'package-get-download-menu |
240 (define-obsolete-function-alias 'package-get-download-menu | 240 'package-ui-download-menu) |
241 '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 (mapcar #'unintern '(add-menu-item add-menu package-get-download-menu))) | |
242 | 247 |
243 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer | 248 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer |
244 | 249 |
245 (define-compatible-function-alias 'read-minibuffer | 250 (define-compatible-function-alias 'read-minibuffer |
246 'read-expression) ; misleading name | 251 'read-expression) ; misleading name |