Mercurial > hg > xemacs-beta
comparison lisp/cus-edit.el @ 225:12579d965149 r20-4b11
Import from CVS: tag r20-4b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:11:40 +0200 |
parents | 2c611d1463a6 |
children | 0e522484dd2a |
comparison
equal
deleted
inserted
replaced
224:4663b37daab6 | 225:12579d965149 |
---|---|
1074 This works by calling the function specified by | 1074 This works by calling the function specified by |
1075 `custom-buffer-done-function'." | 1075 `custom-buffer-done-function'." |
1076 (interactive) | 1076 (interactive) |
1077 (funcall custom-buffer-done-function (current-buffer))) | 1077 (funcall custom-buffer-done-function (current-buffer))) |
1078 | 1078 |
1079 (defun custom-buffer-create-internal (options &optional description) | 1079 (defun custom-buffer-create-buttons () |
1080 (message "Creating customization buffer...") | |
1081 (custom-mode) | |
1082 (widget-insert "This is a customization buffer") | |
1083 (if description | |
1084 (widget-insert description)) | |
1085 (widget-insert ".\n\ | |
1086 Type RET or click button2 on an active field to invoke its action. | |
1087 Invoke ") | |
1088 (widget-create 'info-link | |
1089 :tag "Help" | |
1090 :help-echo "Read the online help" | |
1091 "(XEmacs)Easy Customization") | |
1092 (widget-insert " for more information.\n\n") | |
1093 (message "Creating customization buttons...") | 1080 (message "Creating customization buttons...") |
1094 (widget-insert "Operate on everything in this buffer:\n ") | 1081 (widget-insert "\nOperate on everything in this buffer:\n ") |
1095 (widget-create 'push-button | 1082 (widget-create 'push-button |
1096 :tag "Set" | 1083 :tag "Set" |
1097 :tag-glyph '("set-up" "set-down") | 1084 :tag-glyph '("set-up" "set-down") |
1098 :help-echo "\ | 1085 :help-echo "\ |
1099 Make your editing in this buffer take effect for this session" | 1086 Make your editing in this buffer take effect for this session" |
1140 :tag "Done" | 1127 :tag "Done" |
1141 :tag-glyph '("done-up" "done-down") | 1128 :tag-glyph '("done-up" "done-down") |
1142 :help-echo "Remove the buffer" | 1129 :help-echo "Remove the buffer" |
1143 :action (lambda (widget &optional event) | 1130 :action (lambda (widget &optional event) |
1144 (Custom-buffer-done))) | 1131 (Custom-buffer-done))) |
1145 (widget-insert "\n\n") | 1132 (widget-insert "\n")) |
1133 | |
1134 (defcustom custom-novice t | |
1135 "If non-nil, show help message at top of customize buffers." | |
1136 :type 'boolean | |
1137 :group 'custom-buffer) | |
1138 | |
1139 (defcustom custom-display-global-buttons 'top | |
1140 "If `nil' don't display the global buttons. If `top' display at the | |
1141 beginning of custom buffers. If `bottom', display at the end." | |
1142 :type '(choice (const top) | |
1143 (const bottom) | |
1144 (const :tag "don't" nil)) | |
1145 :group 'custom-buffer) | |
1146 | |
1147 (defun custom-buffer-create-internal (options &optional description) | |
1148 (message "Creating customization buffer...") | |
1149 (custom-mode) | |
1150 (widget-insert "This is a customization buffer") | |
1151 (if description | |
1152 (widget-insert description)) | |
1153 (when custom-novice | |
1154 (widget-insert ".\n\ | |
1155 Type RET or click button2 on an active field to invoke its action. | |
1156 Invoke ") | |
1157 (widget-create 'info-link | |
1158 :tag "Help" | |
1159 :help-echo "Read the online help" | |
1160 "(XEmacs)Easy Customization") | |
1161 (widget-insert " for more information.")) | |
1162 (widget-insert "\n") | |
1163 (if (equal custom-display-global-buttons 'top) | |
1164 (custom-buffer-create-buttons)) | |
1165 (widget-insert "\n") | |
1146 (message "Creating customization items...") | 1166 (message "Creating customization items...") |
1147 (setq custom-options | 1167 (setq custom-options |
1148 (if (= (length options) 1) | 1168 (if (= (length options) 1) |
1149 (mapcar (lambda (entry) | 1169 (mapcar (lambda (entry) |
1150 (widget-create (nth 1 entry) | 1170 (widget-create (nth 1 entry) |
1171 (widget-insert "\n")) | 1191 (widget-insert "\n")) |
1172 (widget-insert "\n"))) | 1192 (widget-insert "\n"))) |
1173 options)))) | 1193 options)))) |
1174 (unless (eq (preceding-char) ?\n) | 1194 (unless (eq (preceding-char) ?\n) |
1175 (widget-insert "\n")) | 1195 (widget-insert "\n")) |
1196 (if (equal custom-display-global-buttons 'bottom) | |
1197 (custom-buffer-create-buttons)) | |
1176 (display-message 'progress | 1198 (display-message 'progress |
1177 (format | 1199 (format |
1178 "Creating customization items %2d%%...done" 100)) | 1200 "Creating customization items %2d%%...done" 100)) |
1179 (unless (eq custom-buffer-style 'tree) | 1201 (unless (eq custom-buffer-style 'tree) |
1180 (mapc 'custom-magic-reset custom-options)) | 1202 (mapc 'custom-magic-reset custom-options)) |