Mercurial > hg > xemacs-beta
comparison lisp/custom/cus-edit.el @ 197:acd284d43ca1 r20-3b25
Import from CVS: tag r20-3b25
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:00:02 +0200 |
parents | a2f645c6b9f8 |
children | eb5470882647 |
comparison
equal
deleted
inserted
replaced
196:58e0786448ca | 197:acd284d43ca1 |
---|---|
2273 (custom-load-widget widget) | 2273 (custom-load-widget widget) |
2274 (let* ((symbol (widget-value widget)) | 2274 (let* ((symbol (widget-value widget)) |
2275 (spec (or (get symbol 'saved-face) | 2275 (spec (or (get symbol 'saved-face) |
2276 (get symbol 'face-defface-spec) | 2276 (get symbol 'face-defface-spec) |
2277 ;; Attempt to construct it. | 2277 ;; Attempt to construct it. |
2278 (list (list t (custom-face-attributes-get | 2278 (list (list t (face-custom-attributes-get |
2279 symbol (selected-frame)))))) | 2279 symbol (selected-frame)))))) |
2280 (form (widget-get widget :custom-form)) | 2280 (form (widget-get widget :custom-form)) |
2281 (indent (widget-get widget :indent)) | 2281 (indent (widget-get widget :indent)) |
2282 (edit (widget-create-child-and-convert | 2282 (edit (widget-create-child-and-convert |
2283 widget | 2283 widget |
2928 :group 'customize) | 2928 :group 'customize) |
2929 | 2929 |
2930 (defun custom-save-delete (symbol) | 2930 (defun custom-save-delete (symbol) |
2931 "Delete the call to SYMBOL form `custom-file'. | 2931 "Delete the call to SYMBOL form `custom-file'. |
2932 Leave point at the location of the call, or after the last expression." | 2932 Leave point at the location of the call, or after the last expression." |
2933 (set-buffer (find-file-noselect custom-file)) | 2933 (let ((find-file-hooks nil)) |
2934 (set-buffer (find-file-noselect custom-file))) | |
2934 (goto-char (point-min)) | 2935 (goto-char (point-min)) |
2935 (catch 'found | 2936 (catch 'found |
2936 (while t | 2937 (while t |
2937 (let ((sexp (condition-case nil | 2938 (let ((sexp (condition-case nil |
2938 (read (current-buffer)) | 2939 (read (current-buffer)) |
3034 (defun custom-save-all () | 3035 (defun custom-save-all () |
3035 "Save all customizations in `custom-file'." | 3036 "Save all customizations in `custom-file'." |
3036 (let ((inhibit-read-only t)) | 3037 (let ((inhibit-read-only t)) |
3037 (custom-save-variables) | 3038 (custom-save-variables) |
3038 (custom-save-faces) | 3039 (custom-save-faces) |
3039 (with-current-buffer (find-file-noselect custom-file) | 3040 (let ((find-file-hooks nil)) |
3040 (save-buffer)))) | 3041 (with-current-buffer (find-file-noselect custom-file) |
3042 (save-buffer))))) | |
3041 | 3043 |
3042 | 3044 |
3043 ;;; The Customize Menu. | 3045 ;;; The Customize Menu. |
3044 | 3046 |
3045 ;;; Menu support | 3047 ;;; Menu support |
3072 ;; XEmacs can create menus dynamically. | 3074 ;; XEmacs can create menus dynamically. |
3073 (defun custom-group-menu-create (widget symbol) | 3075 (defun custom-group-menu-create (widget symbol) |
3074 "Ignoring WIDGET, create a menu entry for customization group SYMBOL." | 3076 "Ignoring WIDGET, create a menu entry for customization group SYMBOL." |
3075 `( ,(custom-unlispify-menu-entry symbol t) | 3077 `( ,(custom-unlispify-menu-entry symbol t) |
3076 :filter (lambda (&rest junk) | 3078 :filter (lambda (&rest junk) |
3077 (cdr (custom-menu-create ',symbol))))) | 3079 (let ((item (custom-menu-create ',symbol))) |
3080 (if (listp item) | |
3081 (cdr item) | |
3082 (list item)))))) | |
3078 | 3083 |
3079 ;;;###autoload | 3084 ;;;###autoload |
3080 (defun custom-menu-create (symbol) | 3085 (defun custom-menu-create (symbol) |
3081 "Create menu for customization group SYMBOL. | 3086 "Create menu for customization group SYMBOL. |
3082 The menu is in a format applicable to `easy-menu-define'." | 3087 The menu is in a format applicable to `easy-menu-define'." |