Mercurial > hg > xemacs-beta
comparison lisp/cus-edit.el @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | 308d34e9f07d f00192e1cd49 |
children | 4dee0387b9de |
comparison
equal
deleted
inserted
replaced
5472:e79980ee5efe | 5473:ac37a5f7e5be |
---|---|
866 ;; The default behavior, which is to prompt for all faces, is also | 866 ;; The default behavior, which is to prompt for all faces, is also |
867 ;; used as a fall back when a prefix is given but there's no face | 867 ;; used as a fall back when a prefix is given but there's no face |
868 ;; under point: | 868 ;; under point: |
869 (let ((choice (completing-read "Customize face: (default all) " | 869 (let ((choice (completing-read "Customize face: (default all) " |
870 obarray 'find-face))) | 870 obarray 'find-face))) |
871 (if (zerop (length choice)) | 871 (if (eql (length choice) 0) |
872 nil | 872 nil |
873 (list (intern choice)))) | 873 (list (intern choice)))) |
874 (cond ((symbolp faces) | 874 (cond ((symbolp faces) |
875 ;; Customize only this one: | 875 ;; Customize only this one: |
876 (list (list faces))) | 876 (list (list faces))) |
880 "Customize face: (default all faces at point) " | 880 "Customize face: (default all faces at point) " |
881 (mapcar (lambda (face) | 881 (mapcar (lambda (face) |
882 (list (symbol-name face) face)) | 882 (list (symbol-name face) face)) |
883 faces) | 883 faces) |
884 nil t))) | 884 nil t))) |
885 (if (zerop (length choice)) | 885 (if (eql (length choice) 0) |
886 (list faces) | 886 (list faces) |
887 (list (intern choice))))))))) | 887 (list (intern choice))))))))) |
888 | 888 |
889 (defun customize-face-1 (face custom-buffer-create-fn) | 889 (defun customize-face-1 (face custom-buffer-create-fn) |
890 ;; Customize FACE in a buffer created with BUFFER-CREATE-FN. | 890 ;; Customize FACE in a buffer created with BUFFER-CREATE-FN. |
1180 (if (equal custom-display-global-buttons 'top) | 1180 (if (equal custom-display-global-buttons 'top) |
1181 (custom-buffer-create-buttons)) | 1181 (custom-buffer-create-buttons)) |
1182 (widget-insert "\n") | 1182 (widget-insert "\n") |
1183 (message "Creating customization items...") | 1183 (message "Creating customization items...") |
1184 (setq custom-options | 1184 (setq custom-options |
1185 (if (= (length options) 1) | 1185 (if (eql (length options) 1) |
1186 (mapcar (lambda (entry) | 1186 (mapcar (lambda (entry) |
1187 (widget-create (nth 1 entry) | 1187 (widget-create (nth 1 entry) |
1188 :documentation-shown t | 1188 :documentation-shown t |
1189 :custom-state 'unknown | 1189 :custom-state 'unknown |
1190 :tag (custom-unlispify-tag-name | 1190 :tag (custom-unlispify-tag-name |
2981 (mapcar (lambda (face) | 2981 (mapcar (lambda (face) |
2982 (list (symbol-name face))) | 2982 (list (symbol-name face))) |
2983 (face-list)) | 2983 (face-list)) |
2984 nil nil nil | 2984 nil nil nil |
2985 'face-history))) | 2985 'face-history))) |
2986 (unless (zerop (length answer)) | 2986 (unless (eql (length answer) 0) |
2987 (widget-value-set widget (intern answer)) | 2987 (widget-value-set widget (intern answer)) |
2988 (widget-apply widget :notify widget event) | 2988 (widget-apply widget :notify widget event) |
2989 (widget-setup)))) | 2989 (widget-setup)))) |
2990 | 2990 |
2991 ;;; The `hook' Widget. | 2991 ;;; The `hook' Widget. |
3170 widget 'custom-browse-group-tag) | 3170 widget 'custom-browse-group-tag) |
3171 buttons) | 3171 buttons) |
3172 (insert " " tag "\n") | 3172 (insert " " tag "\n") |
3173 (widget-put widget :buttons buttons)) | 3173 (widget-put widget :buttons buttons)) |
3174 ((and (eq custom-buffer-style 'tree) | 3174 ((and (eq custom-buffer-style 'tree) |
3175 (zerop (length members))) | 3175 (eql (length members) 0)) |
3176 (custom-browse-insert-prefix prefix) | 3176 (custom-browse-insert-prefix prefix) |
3177 (insert "[ ]-- ") | 3177 (insert "[ ]-- ") |
3178 ;; (widget-glyph-insert nil "[ ]" "empty") | 3178 ;; (widget-glyph-insert nil "[ ]" "empty") |
3179 ;; (widget-glyph-insert nil "-- " "horizontal") | 3179 ;; (widget-glyph-insert nil "-- " "horizontal") |
3180 (push (widget-create-child-and-convert | 3180 (push (widget-create-child-and-convert |
3183 (insert " " tag "\n") | 3183 (insert " " tag "\n") |
3184 (widget-put widget :buttons buttons)) | 3184 (widget-put widget :buttons buttons)) |
3185 ((eq custom-buffer-style 'tree) | 3185 ((eq custom-buffer-style 'tree) |
3186 (custom-browse-insert-prefix prefix) | 3186 (custom-browse-insert-prefix prefix) |
3187 (custom-load-widget widget) | 3187 (custom-load-widget widget) |
3188 (if (zerop (length members)) | 3188 (if (eql (length members) 0) |
3189 (progn | 3189 (progn |
3190 (custom-browse-insert-prefix prefix) | 3190 (custom-browse-insert-prefix prefix) |
3191 (insert "[ ]-- ") | 3191 (insert "[ ]-- ") |
3192 ;; (widget-glyph-insert nil "[ ]" "empty") | 3192 ;; (widget-glyph-insert nil "[ ]" "empty") |
3193 ;; (widget-glyph-insert nil "-- " "horizontal") | 3193 ;; (widget-glyph-insert nil "-- " "horizontal") |