2

I have a custom variable

(defcustom myvar ....
  :type '(choice (const :tag "foo" 1) ...))

and I need to map it to

(widget-create ...
               '(item :tag "foo" :value 1)
               ...)

Obviously I can write something like

(mapcar (lambda (item)
          `(item :tag ,(third item) :value ,(fourth item)))
        (rest (custom-variable-type 'myvar)))

but I was wondering if there is something more "official".

  • No, there's nothing provided for this, AFAIK. – Drew May 4 '18 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.