all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Getting custom variables in a group
@ 2018-04-30 22:25 Eric Abrahamsen
  2018-05-01  0:34 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2018-04-30 22:25 UTC (permalink / raw)
  To: emacs-devel

I'm having an oddly hard time finding out programatically all the custom
variables in a custom group (recursively), or which group a custom
variable belongs to. I would have thought the latter would be a symbol
property, but it isn't.

Obviously `customize-group' must be able to find out, but when I
followed the code, the trail went cold in the widget jungle. I simply
don't see how it gets the list of options to display.

Right now I'm doing this, which I guess works okay, but it seems a bit hacky:

(let (target-syms)
  (mapatoms
   (lambda (sym)
     (when (and (custom-variable-p sym)
		(string-match-p "^gnus-\\|^message-"
				(symbol-name sym)))
       (push sym target-syms))))
  target-syms)




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-01  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-30 22:25 Getting custom variables in a group Eric Abrahamsen
2018-05-01  0:34 ` Stefan Monnier
2018-05-01  1:24   ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.