diff options
| author | Richard M. Stallman | 2006-08-31 23:16:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-08-31 23:16:03 +0000 |
| commit | adcc7a37ed52334adbbb5adc81f12bf51f1ac239 (patch) | |
| tree | 25bf8941cd63c9071232d99b802cb8c04fedf1a0 | |
| parent | da506c0e742b495a813083b253e610d2b0340f91 (diff) | |
| download | emacs-adcc7a37ed52334adbbb5adc81f12bf51f1ac239.tar.gz emacs-adcc7a37ed52334adbbb5adc81f12bf51f1ac239.zip | |
(custom-save-variables): Slight cleanup.
(Custom-no-edit): Renamed from custom-no-edit.
(Custom-newline): Renamed from custom-newline.
(custom-mode-map): Use new names.
| -rw-r--r-- | lisp/cus-edit.el | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 609b5572a08..e3c92d59b00 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4255,19 +4255,31 @@ This function does not save the buffer." | |||
| 4255 | (let ((spec (car-safe (get symbol 'theme-value))) | 4255 | (let ((spec (car-safe (get symbol 'theme-value))) |
| 4256 | (value (get symbol 'saved-value)) | 4256 | (value (get symbol 'saved-value)) |
| 4257 | (requests (get symbol 'custom-requests)) | 4257 | (requests (get symbol 'custom-requests)) |
| 4258 | (now (not (or (custom-variable-p symbol) | 4258 | (now (and (not (custom-variable-p symbol)) |
| 4259 | (and (not (boundp symbol)) | 4259 | (or (boundp symbol) |
| 4260 | (not (eq (get symbol 'force-value) | 4260 | (eq (get symbol 'force-value) |
| 4261 | 'rogue)))))) | 4261 | 'rogue)))) |
| 4262 | (comment (get symbol 'saved-variable-comment))) | 4262 | (comment (get symbol 'saved-variable-comment))) |
| 4263 | ;; Check `requests'. | 4263 | ;; Check REQUESTS for validity. |
| 4264 | (dolist (request requests) | 4264 | (dolist (request requests) |
| 4265 | (when (and (symbolp request) (not (featurep request))) | 4265 | (when (and (symbolp request) (not (featurep request))) |
| 4266 | (message "Unknown requested feature: %s" request) | 4266 | (message "Unknown requested feature: %s" request) |
| 4267 | (setq requests (delq request requests)))) | 4267 | (setq requests (delq request requests)))) |
| 4268 | ;; Is there anything customized about this variable? | ||
| 4268 | (when (or (and spec (eq (car spec) 'user)) | 4269 | (when (or (and spec (eq (car spec) 'user)) |
| 4269 | comment | 4270 | comment |
| 4270 | (and (null spec) (get symbol 'saved-value))) | 4271 | (and (null spec) (get symbol 'saved-value))) |
| 4272 | ;; Output an element for this variable. | ||
| 4273 | ;; It has the form (SYMBOL VALUE-FORM NOW REQUESTS COMMENT). | ||
| 4274 | ;; SYMBOL is the variable name. | ||
| 4275 | ;; VALUE-FORM is an expression to return the customized value. | ||
| 4276 | ;; NOW if non-nil means always set the variable immediately | ||
| 4277 | ;; when the customizations are reloaded. This is used | ||
| 4278 | ;; for rogue variables | ||
| 4279 | ;; REQUESTS is a list of packages to load before setting the | ||
| 4280 | ;; variable. Each element of it will be passed to `require'. | ||
| 4281 | ;; COMMENT is whatever comment the user has specified | ||
| 4282 | ;; with the customize facility. | ||
| 4271 | (unless (bolp) | 4283 | (unless (bolp) |
| 4272 | (princ "\n")) | 4284 | (princ "\n")) |
| 4273 | (princ " '(") | 4285 | (princ " '(") |
| @@ -4435,8 +4447,8 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4435 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. | 4447 | ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. |
| 4436 | (let ((map (make-keymap))) | 4448 | (let ((map (make-keymap))) |
| 4437 | (set-keymap-parent map widget-keymap) | 4449 | (set-keymap-parent map widget-keymap) |
| 4438 | (define-key map [remap self-insert-command] 'custom-no-edit) | 4450 | (define-key map [remap self-insert-command] 'Custom-no-edit) |
| 4439 | (define-key map "\^m" 'custom-newline) | 4451 | (define-key map "\^m" 'Custom-newline) |
| 4440 | (define-key map " " 'scroll-up) | 4452 | (define-key map " " 'scroll-up) |
| 4441 | (define-key map "\177" 'scroll-down) | 4453 | (define-key map "\177" 'scroll-down) |
| 4442 | (define-key map "\C-c\C-c" 'Custom-set) | 4454 | (define-key map "\C-c\C-c" 'Custom-set) |
| @@ -4448,12 +4460,12 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4448 | map) | 4460 | map) |
| 4449 | "Keymap for `custom-mode'.") | 4461 | "Keymap for `custom-mode'.") |
| 4450 | 4462 | ||
| 4451 | (defun custom-no-edit (pos &optional event) | 4463 | (defun Custom-no-edit (pos &optional event) |
| 4452 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4464 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4453 | (interactive "@d") | 4465 | (interactive "@d") |
| 4454 | (error "You can't edit this part of the Custom buffer")) | 4466 | (error "You can't edit this part of the Custom buffer")) |
| 4455 | 4467 | ||
| 4456 | (defun custom-newline (pos &optional event) | 4468 | (defun Custom-newline (pos &optional event) |
| 4457 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4469 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4458 | (interactive "@d") | 4470 | (interactive "@d") |
| 4459 | (let ((button (get-char-property pos 'button))) | 4471 | (let ((button (get-char-property pos 'button))) |