Mercurial > hg > xemacs-beta
comparison lisp/custom/custom.el @ 124:9b50b4588a93 r20-1b15
Import from CVS: tag r20-1b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:39 +0200 |
parents | cca96a509cfe |
children | 34a5b81f86ba |
comparison
equal
deleted
inserted
replaced
123:c77884c6318d | 124:9b50b4588a93 |
---|---|
2 ;; | 2 ;; |
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. |
4 ;; | 4 ;; |
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
6 ;; Keywords: help, faces | 6 ;; Keywords: help, faces |
7 ;; Version: 1.74 | 7 ;; Version: 1.84 |
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ | 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ |
9 | 9 |
10 ;;; Commentary: | 10 ;;; Commentary: |
11 ;; | 11 ;; |
12 ;; If you want to use this code, please visit the URL above. | 12 ;; If you want to use this code, please visit the URL above. |
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 | 25 |
26 (defvar custom-define-hook nil | 26 ;; These autoloads should be deleted eventually. |
27 "Hook called after defining each customize option.") | |
28 | |
29 ;; These autoloads should be deleted when the file is added to Emacs | |
30 | |
31 (unless (fboundp 'load-gc) | 27 (unless (fboundp 'load-gc) |
32 ;; From cus-edit.el | 28 ;; From cus-edit.el |
33 (autoload 'customize "cus-edit" nil t) | 29 (autoload 'customize "cus-edit" nil t) |
34 (autoload 'customize-variable "cus-edit" nil t) | 30 (autoload 'customize-variable "cus-edit" nil t) |
31 (autoload 'customize-variable-other-window "cus-edit" nil t) | |
35 (autoload 'customize-face "cus-edit" nil t) | 32 (autoload 'customize-face "cus-edit" nil t) |
33 (autoload 'customize-face-other-window "cus-edit" nil t) | |
36 (autoload 'customize-apropos "cus-edit" nil t) | 34 (autoload 'customize-apropos "cus-edit" nil t) |
37 (autoload 'customize-customized "cus-edit" nil t) | 35 (autoload 'customize-customized "cus-edit" nil t) |
38 (autoload 'custom-buffer-create "cus-edit") | 36 (autoload 'custom-buffer-create "cus-edit") |
39 (autoload 'custom-make-dependencies "cus-edit") | 37 (autoload 'custom-make-dependencies "cus-edit") |
38 (autoload 'custom-menu-create "cus-edit") | |
39 (autoload 'customize-menu-create "cus-edit") | |
40 | |
40 ;; From cus-face.el | 41 ;; From cus-face.el |
41 (autoload 'custom-declare-face "cus-face") | 42 (autoload 'custom-declare-face "cus-face") |
42 (autoload 'custom-set-faces "cus-face")) | 43 (autoload 'custom-set-faces "cus-face")) |
44 | |
45 (defvar custom-define-hook nil | |
46 ;; Customize information for this option is in `cus-edit.el'. | |
47 "Hook called after defining each customize option.") | |
43 | 48 |
44 ;;; The `defcustom' Macro. | 49 ;;; The `defcustom' Macro. |
45 | 50 |
46 (defun custom-declare-variable (symbol value doc &rest args) | 51 (defun custom-declare-variable (symbol value doc &rest args) |
47 "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments." | 52 "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments." |
293 ((default-boundp symbol) | 298 ((default-boundp symbol) |
294 ;; Something already set this, overwrite it. | 299 ;; Something already set this, overwrite it. |
295 (set-default symbol (eval value)))) | 300 (set-default symbol (eval value)))) |
296 (setq args (cdr args))) | 301 (setq args (cdr args))) |
297 ;; Old format, a plist of SYMBOL VALUE pairs. | 302 ;; Old format, a plist of SYMBOL VALUE pairs. |
303 (message "Warning: old format `custom-set-variables'") | |
304 (ding) | |
305 (sit-for 2) | |
298 (let ((symbol (nth 0 args)) | 306 (let ((symbol (nth 0 args)) |
299 (value (nth 1 args))) | 307 (value (nth 1 args))) |
300 (put symbol 'saved-value (list value))) | 308 (put symbol 'saved-value (list value))) |
301 (setq args (cdr (cdr args))))))) | 309 (setq args (cdr (cdr args))))))) |
302 | 310 |