diff options
| author | Glenn Morris | 2011-03-09 19:44:33 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-03-09 19:44:33 -0800 |
| commit | 5772caab78b85b6ae1215fbc5d63cbb4571bcf28 (patch) | |
| tree | f2c29c81a3aa02137449a78eab4f7ad32b384b4e | |
| parent | ccb55d277abd81b09891917b8e4cfc7a69c5a6af (diff) | |
| download | emacs-5772caab78b85b6ae1215fbc5d63cbb4571bcf28.tar.gz emacs-5772caab78b85b6ae1215fbc5d63cbb4571bcf28.zip | |
cus-edit tweak for bug#2298.
* lisp/cus-edit.el (Custom-newline): If no button at point, look for a
subgroup button at start-of-line.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 63e132e9550..bd8bf932799 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-03-10 Glenn Morris <rgm@gnu.org> | 1 | 2011-03-10 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * cus-edit.el (Custom-newline): If no button at point, look | ||
| 4 | for a subgroup button at start-of-line. (Bug#2298) | ||
| 5 | |||
| 3 | * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. | 6 | * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. |
| 4 | 7 | ||
| 5 | 2011-03-10 Julien Danjou <julien@danjou.info> | 8 | 2011-03-10 Julien Danjou <julien@danjou.info> |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 88821652784..203043ebd97 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4756,6 +4756,12 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4756 | "Invoke button at POS, or refuse to allow editing of Custom buffer." | 4756 | "Invoke button at POS, or refuse to allow editing of Custom buffer." |
| 4757 | (interactive "@d") | 4757 | (interactive "@d") |
| 4758 | (let ((button (get-char-property pos 'button))) | 4758 | (let ((button (get-char-property pos 'button))) |
| 4759 | ;; If there is no button at point, then use the one at the start | ||
| 4760 | ;; of the line, if it is a custom-group-link (bug#2298). | ||
| 4761 | (or button | ||
| 4762 | (if (setq button (get-char-property (line-beginning-position) 'button)) | ||
| 4763 | (or (eq (widget-type button) 'custom-group-link) | ||
| 4764 | (setq button nil)))) | ||
| 4759 | (if button | 4765 | (if button |
| 4760 | (widget-apply-action button event) | 4766 | (widget-apply-action button event) |
| 4761 | (error "You can't edit this part of the Custom buffer")))) | 4767 | (error "You can't edit this part of the Custom buffer")))) |