emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103612: cus-edit tweak for bug#2298.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103612: cus-edit tweak for bug#2298.
Date: Wed, 09 Mar 2011 19:44:33 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103612
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2011-03-09 19:44:33 -0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/cus-edit.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-10 03:41:17 +0000
+++ b/lisp/ChangeLog    2011-03-10 03:44:33 +0000
@@ -1,5 +1,8 @@
 2011-03-10  Glenn Morris  <address@hidden>
 
+       * cus-edit.el (Custom-newline): If no button at point, look
+       for a subgroup button at start-of-line.  (Bug#2298)
+
        * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes.
 
 2011-03-10  Julien Danjou  <address@hidden>

=== modified file 'lisp/cus-edit.el'
--- a/lisp/cus-edit.el  2011-03-06 02:04:41 +0000
+++ b/lisp/cus-edit.el  2011-03-10 03:44:33 +0000
@@ -4756,6 +4756,12 @@
   "Invoke button at POS, or refuse to allow editing of Custom buffer."
   (interactive "@d")
   (let ((button (get-char-property pos 'button)))
+    ;; If there is no button at point, then use the one at the start
+    ;; of the line, if it is a custom-group-link (bug#2298).
+    (or button
+       (if (setq button (get-char-property (line-beginning-position) 'button))
+           (or (eq (widget-type button) 'custom-group-link)
+               (setq button nil))))
     (if button
        (widget-apply-action button event)
       (error "You can't edit this part of the Custom buffer"))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]