emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#12670: closed (24.2.50; Uncustomizable defcustom)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12670: closed (24.2.50; Uncustomizable defcustom)
Date: Mon, 07 Jan 2013 11:27:05 +0000

Your message dated Mon, 07 Jan 2013 20:25:49 +0900
with message-id <address@hidden>
and subject line Re: bug#12670: 24.2.50; Uncustomizable defcustom
has caused the debbugs.gnu.org bug report #12670,
regarding 24.2.50; Uncustomizable defcustom
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12670: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12670
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.2.50; Uncustomizable defcustom Date: Thu, 18 Oct 2012 18:33:25 +0900 User-agent: Gnus/5.130006 (真 Gnus v0.6) Emacs/24.2.50 (i686-pc-cygwin)
Hi,

I realized that a certain defcustom form is unable to customize
a user option.  To reproduce this, evaluate the following form,
perform M-x customize-option, and press the [INS] button.

(defcustom foo nil
  "Doc"
  :type '(repeat (group (group :inline t (choice string function)))))

Then you will find a funny thing there and see it is unable to
edit.  After some investigations I found this is due to
`widget-default-get', that fails to get the default value of
components within an inlined form (I mean (bar :inline t ...)).

A patch is attached, not tested with all sorts of defcustom
forms though.

--- wid-edit.el~        2012-04-22 21:52:01.618551000 +0000
+++ wid-edit.el 2012-10-18 09:27:17.158803700 +0000
@@ -525,9 +525,18 @@
 (defun widget-default-get (widget)
   "Extract the default external value of WIDGET."
   (widget-apply widget :value-to-external
                (or (widget-get widget :value)
-                   (widget-apply widget :default-get))))
+                   (progn
+                     (when (widget-get widget :args)
+                       (let (args)
+                         (dolist (arg (widget-get widget :args))
+                           (setq args (append args
+                                              (if (widget-get arg :inline)
+                                                  (widget-get arg :args)
+                                                (list arg)))))
+                         (widget-put widget :args args)))
+                     (widget-apply widget :default-get)))))
 
 (defun widget-match-inline (widget vals)
   "In WIDGET, match the start of VALS."
   (cond ((widget-get widget :inline)

--- End Message ---
--- Begin Message --- Subject: Re: bug#12670: 24.2.50; Uncustomizable defcustom Date: Mon, 07 Jan 2013 20:25:49 +0900 User-agent: Gnus/5.130006 (真 Gnus v0.6) Emacs/24.3.50 (i686-pc-cygwin)
Chong Yidong wrote:
> Ah, OK.  Looks fine to me, please go ahead and commit to trunk.

Thanks.  Done.


--- End Message ---

reply via email to

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