1180 |
(const links)) |
(const links)) |
1181 |
:group 'custom-buffer) |
:group 'custom-buffer) |
1182 |
|
|
1183 |
;; If we pass BUFFER to `bury-buffer', the buffer isn't removed from |
(defcustom custom-buffer-done-kill nil |
1184 |
;; the window. |
"*Non-nil means exiting a Custom buffer should kill it." |
1185 |
(defun custom-bury-buffer (buffer) |
:type 'boolean |
1186 |
(with-current-buffer buffer |
:version "21.4" |
|
(bury-buffer))) |
|
|
|
|
|
(defcustom custom-buffer-done-function 'custom-bury-buffer |
|
|
"*Function called to remove a Custom buffer when the user is done with it. |
|
|
Called with one argument, the buffer to remove." |
|
|
:type '(choice (function-item :tag "Bury buffer" custom-bury-buffer) |
|
|
(function-item :tag "Kill buffer" kill-buffer) |
|
|
(function :tag "Other")) |
|
|
:version "21.1" |
|
1187 |
:group 'custom-buffer) |
:group 'custom-buffer) |
1188 |
|
|
1189 |
(defcustom custom-buffer-indent 3 |
(defcustom custom-buffer-indent 3 |
1253 |
:group 'custom-buffer) |
:group 'custom-buffer) |
1254 |
|
|
1255 |
(defun Custom-buffer-done (&rest ignore) |
(defun Custom-buffer-done (&rest ignore) |
1256 |
"Remove current buffer by calling `custom-buffer-done-function'." |
"Exit current Custom buffer according to `custom-buffer-done-kill'." |
1257 |
(interactive) |
(interactive) |
1258 |
(funcall custom-buffer-done-function (current-buffer))) |
(quit-window custom-buffer-done-kill)) |
1259 |
|
|
1260 |
(defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box) |
(defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box) |
1261 |
'(("unspecified" . unspecified)))) |
'(("unspecified" . unspecified)))) |
1341 |
:tag "Finish" |
:tag "Finish" |
1342 |
:help-echo |
:help-echo |
1343 |
(lambda (&rest ignore) |
(lambda (&rest ignore) |
1344 |
(cond |
(if custom-buffer-done-kill |
1345 |
((eq custom-buffer-done-function |
"Kill this buffer" |
1346 |
'custom-bury-buffer) |
"Bury this buffer")) |
|
"Bury this buffer") |
|
|
((eq custom-buffer-done-function 'kill-buffer) |
|
|
"Kill this buffer") |
|
|
(t "Finish with this buffer"))) |
|
1347 |
:action #'Custom-buffer-done) |
:action #'Custom-buffer-done) |
1348 |
(widget-insert "\n\n") |
(widget-insert "\n\n") |
1349 |
(message "Creating customization items...") |
(message "Creating customization items...") |