diff options
| author | Glenn Morris | 2008-11-16 23:27:52 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-11-16 23:27:52 +0000 |
| commit | f6542587fda4c81987e3c4e90855fd754de110a4 (patch) | |
| tree | 23f4840d593c965cab428f7c262849215fec14b9 | |
| parent | c40788234e0c674f35d79eecd4bc47f2977c83a8 (diff) | |
| download | emacs-f6542587fda4c81987e3c4e90855fd754de110a4.tar.gz emacs-f6542587fda4c81987e3c4e90855fd754de110a4.zip | |
(custom-buffer-create-internal): Always insert the
in-buffer buttons, regardless of tool-bar. (Bug#1326)
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 65 |
2 files changed, 39 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e8fc9aade1f..44b76e67f29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-11-16 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * cus-edit.el (custom-buffer-create-internal): Always insert the | ||
| 4 | in-buffer buttons, regardless of tool-bar. (Bug#1326) | ||
| 5 | |||
| 1 | 2008-11-16 Chong Yidong <cyd@stupidchicken.com> | 6 | 2008-11-16 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * subr.el (read-passwd): Use read-event instead of | 8 | * subr.el (read-passwd): Use read-event instead of |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 3f2dcd20ccc..1d63ac63634 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -741,8 +741,7 @@ groups after non-groups, if nil do not order groups at all." | |||
| 741 | ;;; Custom Mode Commands. | 741 | ;;; Custom Mode Commands. |
| 742 | 742 | ||
| 743 | ;; This variable is used by `custom-tool-bar-map', or directly by | 743 | ;; This variable is used by `custom-tool-bar-map', or directly by |
| 744 | ;; `custom-buffer-create-internal' if the toolbar is not present and | 744 | ;; `custom-buffer-create-internal' if `custom-buffer-verbose-help' is non-nil. |
| 745 | ;; `custom-buffer-verbose-help' is non-nil. | ||
| 746 | 745 | ||
| 747 | (defvar custom-commands | 746 | (defvar custom-commands |
| 748 | '(("Set for current session" Custom-set t | 747 | '(("Set for current session" Custom-set t |
| @@ -1582,37 +1581,41 @@ possibly because you started Emacs with `-q'.") | |||
| 1582 | :help-echo "Read the Emacs manual." | 1581 | :help-echo "Read the Emacs manual." |
| 1583 | "(emacs)Top") | 1582 | "(emacs)Top") |
| 1584 | (widget-insert ".")) | 1583 | (widget-insert ".")) |
| 1585 | ;; Insert custom command buttons if the toolbar is not in use. | ||
| 1586 | |||
| 1587 | (widget-insert "\n") | 1584 | (widget-insert "\n") |
| 1588 | ;; tool-bar is not dumped in builds without x. | 1585 | ;; The custom command buttons are also in the toolbar, so for a |
| 1589 | (when (not (and (bound-and-true-p tool-bar-mode) (display-graphic-p))) | 1586 | ;; time they were not inserted in the buffer if the toolbar was in use. |
| 1590 | (if custom-buffer-verbose-help | 1587 | ;; But it can be a little confusing for the buffer layout to |
| 1591 | (widget-insert "\n | 1588 | ;; change according to whether or nor the toolbar is on, not to |
| 1589 | ;; mention that a custom buffer can in theory be created in a | ||
| 1590 | ;; frame with a toolbar, then later viewed in one without. | ||
| 1591 | ;; So now the buttons are always inserted in the buffer. (Bug#1326) | ||
| 1592 | ;;; (when (not (and (bound-and-true-p tool-bar-mode) (display-graphic-p))) | ||
| 1593 | (if custom-buffer-verbose-help | ||
| 1594 | (widget-insert "\n | ||
| 1592 | Operate on all settings in this buffer that are not marked HIDDEN:\n")) | 1595 | Operate on all settings in this buffer that are not marked HIDDEN:\n")) |
| 1593 | (let ((button (lambda (tag action active help icon) | 1596 | (let ((button (lambda (tag action active help icon) |
| 1594 | (widget-insert " ") | 1597 | (widget-insert " ") |
| 1595 | (if (eval active) | 1598 | (if (eval active) |
| 1596 | (widget-create 'push-button :tag tag | 1599 | (widget-create 'push-button :tag tag |
| 1597 | :help-echo help :action action)))) | 1600 | :help-echo help :action action)))) |
| 1598 | (commands custom-commands)) | 1601 | (commands custom-commands)) |
| 1599 | (apply button (pop commands)) ; Set for current session | 1602 | (apply button (pop commands)) ; Set for current session |
| 1600 | (apply button (pop commands)) ; Save for future sessions | 1603 | (apply button (pop commands)) ; Save for future sessions |
| 1601 | (if custom-reset-button-menu | 1604 | (if custom-reset-button-menu |
| 1602 | (progn | 1605 | (progn |
| 1603 | (widget-insert " ") | 1606 | (widget-insert " ") |
| 1604 | (widget-create 'push-button | 1607 | (widget-create 'push-button |
| 1605 | :tag "Reset buffer" | 1608 | :tag "Reset buffer" |
| 1606 | :help-echo "Show a menu with reset operations." | 1609 | :help-echo "Show a menu with reset operations." |
| 1607 | :mouse-down-action 'ignore | 1610 | :mouse-down-action 'ignore |
| 1608 | :action 'custom-reset)) | 1611 | :action 'custom-reset)) |
| 1609 | (widget-insert "\n") | 1612 | (widget-insert "\n") |
| 1610 | (apply button (pop commands)) ; Undo edits | 1613 | (apply button (pop commands)) ; Undo edits |
| 1611 | (apply button (pop commands)) ; Reset to saved | 1614 | (apply button (pop commands)) ; Reset to saved |
| 1612 | (apply button (pop commands)) ; Erase customization | 1615 | (apply button (pop commands)) ; Erase customization |
| 1613 | (widget-insert " ") | 1616 | (widget-insert " ") |
| 1614 | (pop commands) ; Help (omitted) | 1617 | (pop commands) ; Help (omitted) |
| 1615 | (apply button (pop commands))))) ; Exit | 1618 | (apply button (pop commands)))) ; Exit |
| 1616 | (widget-insert "\n\n")) | 1619 | (widget-insert "\n\n")) |
| 1617 | 1620 | ||
| 1618 | ;; Now populate the custom buffer. | 1621 | ;; Now populate the custom buffer. |