comparison lisp/custom.el @ 17374:7cba1521d0ca

Delete the explicit autoload calls. (custom-help-menu): Don't use easymenu; make the keymap explicitly. (custom-menu-reset): Function deleted. Don't call it, either. (custom-help-menu): Variable deleted.
author Richard M. Stallman <rms@gnu.org>
date Thu, 10 Apr 1997 22:39:54 +0000
parents 1effe507ea85
children 30a567b89fb6
comparison
equal deleted inserted replaced
17373:4f931fa4c0be 17374:7cba1521d0ca
20 ;;; Code: 20 ;;; Code:
21 21
22 (require 'widget) 22 (require 'widget)
23 23
24 (define-widget-keywords :prefix :tag :load :link :options :type :group) 24 (define-widget-keywords :prefix :tag :load :link :options :type :group)
25
26 ;; These autoloads should be deleted when the file is added to Emacs
27
28 (unless (fboundp 'load-gc)
29 ;; From cus-edit.el
30 (autoload 'customize "cus-edit" nil t)
31 (autoload 'customize-variable "cus-edit" nil t)
32 (autoload 'customize-face "cus-edit" nil t)
33 (autoload 'customize-apropos "cus-edit" nil t)
34 (autoload 'customize-customized "cus-edit" nil t)
35 (autoload 'custom-buffer-create "cus-edit")
36 (autoload 'custom-menu-update "cus-edit")
37 (autoload 'custom-make-dependencies "cus-edit")
38 ;; From cus-face.el
39 (autoload 'custom-declare-face "cus-face")
40 (autoload 'custom-set-faces "cus-face"))
41 25
42 ;;; The `defcustom' Macro. 26 ;;; The `defcustom' Macro.
43 27
44 (defun custom-declare-variable (symbol value doc &rest args) 28 (defun custom-declare-variable (symbol value doc &rest args)
45 "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments." 29 "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments."
293 (defcustom custom-define-hook nil 277 (defcustom custom-define-hook nil
294 "Hook called after defining each customize option." 278 "Hook called after defining each customize option."
295 :group 'customize 279 :group 'customize
296 :type 'hook) 280 :type 'hook)
297 281
298 ;;; Menu support
299
300 (defconst custom-help-menu
301 `("Customize"
302 ,(if (string-match "XEmacs" emacs-version)
303 '("Emacs" :filter (lambda (&rest junk)
304 (cdr (custom-menu-create 'emacs))))
305 ["Update menu..." custom-menu-update t])
306 ["Group..." customize t]
307 ["Variable..." customize-variable t]
308 ["Face..." customize-face t]
309 ["Saved..." customize-customized t]
310 ["Apropos..." customize-apropos t])
311 "Customize menu")
312
313 (defun custom-menu-reset ()
314 "Reset customize menu."
315 (remove-hook 'custom-define-hook 'custom-menu-reset)
316 (if (string-match "XEmacs" emacs-version)
317 (when (fboundp 'add-submenu)
318 (add-submenu '("Options") custom-help-menu))
319 (define-key global-map [menu-bar help-menu customize-menu]
320 (cons (car custom-help-menu)
321 (easy-menu-create-keymaps (car custom-help-menu)
322 (cdr custom-help-menu))))))
323
324 (if (string-match "XEmacs" emacs-version)
325 (autoload 'custom-menu-create "cus-edit")
326 (custom-menu-reset))
327
328 ;;; The End. 282 ;;; The End.
329 283
330 (provide 'custom) 284 (provide 'custom)
331 285
332 ;; custom.el ends here 286 ;; custom.el ends here