Changeset 4131 for trunk/lisp/cus-edit.el
- Timestamp:
- 2006年07月29日 07時48分34秒 (2 years ago)
- Files:
-
- trunk/lisp/cus-edit.el (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/cus-edit.el
r4111 r4131 1088 1088 ;;;###autoload 1089 1089 (defvar customize-package-emacs-version-alist nil 1090 "Alist mapping versions of Emacs to versions of a package. 1091 These package versions are listed in the :package-version 1092 keyword used in `defcustom', `defgroup', and `defface'. Its 1093 elements look like this: 1090 "Alist mapping versions of a package to Emacs versions. 1091 We use this for packages that have their own names, but are released 1092 as part of Emacs itself. 1093 1094 Each elements looks like this: 1094 1095 1095 1096 (PACKAGE (PVERSION . EVERSION)...) 1096 1097 1097 For each PACKAGE, which is a symbol, there are one or more 1098 elements that contain a package version PVERSION with an 1099 associated Emacs version EVERSION. These versions are strings. 1100 For example, the MH-E package updates this alist with the 1101 following: 1098 Here PACKAGE is the name of a package, as a symbol. After 1099 PACKAGE come one or more elements, each associating a 1100 package version PVERSION with the first Emacs version 1101 EVERSION in which it (or a subsequent version of PACKAGE) 1102 was first released. Both PVERSION and EVERSION are strings. 1103 PVERSION should be a string that this package used in 1104 the :package-version keyword for `defcustom', `defgroup', 1105 and `defface'. 1106 1107 For example, the MH-E package updates this alist as follows: 1102 1108 1103 1109 (add-to-list 'customize-package-emacs-version-alist … … 1174 1180 1175 1181 (defun customize-package-emacs-version (symbol package-version) 1176 "Return Emacs version of SYMBOL. 1177 PACKAGE-VERSION has the form (PACKAGE . VERSION). The VERSION of 1178 PACKAGE is looked up in the associated list 1182 "Return the Emacs version in which SYMBOL's meaning last changed. 1183 PACKAGE-VERSION has the form (PACKAGE . VERSION). We use 1179 1184 `customize-package-emacs-version-alist' to find the version of 1180 Emacs that is associated with it."1185 Emacs that is associated with version VERSION of PACKAGE." 1181 1186 (let (package-versions emacs-version) 1182 1187 ;; Use message instead of error since we want user to be able to … … 1194 1199 "customize-package-emacs-version-alist"))) 1195 1200 (t 1196 (message "Package %s neglected to update %s"1201 (message "Package %s version %s lists no corresponding Emacs version" 1197 1202 (car package-version) 1198 "customize-package-emacs-version-alist")))1203 (cdr package-version)))) 1199 1204 emacs-version)) 1200 1205 … … 2669 2674 (cond 2670 2675 ((eq (caar tmp) 'user) 'saved) 2671 ((eq (caar tmp) 'changed) 'changed) 2676 ((eq (caar tmp) 'changed) 2677 (if (condition-case nil 2678 (and (null comment) 2679 (equal value 2680 (eval 2681 (car (get symbol 'standard-value))))) 2682 (error nil)) 2683 ;; The value was originally set outside 2684 ;; custom, but it was set to the standard 2685 ;; value (probably an autoloaded defcustom). 2686 'standard 2687 'changed)) 2672 2688 (t 'themed)) 2673 2689 'changed)) … … 4420 4436 (let ((map (make-keymap))) 4421 4437 (set-keymap-parent map widget-keymap) 4422 (define-key map [remap self-insert-command] 4423 'custom-no-edit) 4424 (define-key map "\^m" 'custom-no-edit) 4438 (define-key map [remap self-insert-command] 'custom-no-edit) 4425 4439 (define-key map " " 'scroll-up) 4426 4440 (define-key map "\177" 'scroll-down) … … 4434 4448 "Keymap for `custom-mode'.") 4435 4449 4436 (defun custom-no-edit ( )4437 " Refuse to allow editing of Custom buffer."4438 (interactive )4450 (defun custom-no-edit (pos &optional event) 4451 "Invoke button at POS, or refuse to allow editing of Custom buffer." 4452 (interactive "@d") 4439 4453 (error "You can't edit this part of the Custom buffer")) 4440 4454
