* Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) @ 2015-09-22 1:12 Alexander Shukaev 2015-09-22 2:42 ` Emanuel Berg 2015-09-22 19:02 ` Stefan Monnier 0 siblings, 2 replies; 3+ messages in thread From: Alexander Shukaev @ 2015-09-22 1:12 UTC (permalink / raw) To: help-gnu-emacs Hello, When doing C-h v magit*section-map TAB, the corresponding completion list is shown. Is there an equivalent function which would accept such a wild card and return the same list? E.g. (var-symbols "magit*section-map") Regards, Alexander ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) 2015-09-22 1:12 Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) Alexander Shukaev @ 2015-09-22 2:42 ` Emanuel Berg 2015-09-22 19:02 ` Stefan Monnier 1 sibling, 0 replies; 3+ messages in thread From: Emanuel Berg @ 2015-09-22 2:42 UTC (permalink / raw) To: help-gnu-emacs Alexander Shukaev <haroogan@gmail.com> writes: > When doing C-h v magit*section-map TAB, the > corresponding completion list is shown. Is there an > equivalent function which would accept such a wild > card and return the same list? E.g. > > (var-symbols "magit*section-map") (defun get-regexp-vars (regexp) (let ((vars '())) (mapatoms (lambda (a) (when (and (boundp a) (string-match regexp (symbol-name a)) ) (push a vars) ))) vars)) ;; some testing (length (get-regexp-vars "gnus-.*")) ; 1109 (length (get-regexp-vars "w3m-.*")) ; 445 -- underground experts united http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) 2015-09-22 1:12 Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) Alexander Shukaev 2015-09-22 2:42 ` Emanuel Berg @ 2015-09-22 19:02 ` Stefan Monnier 1 sibling, 0 replies; 3+ messages in thread From: Stefan Monnier @ 2015-09-22 19:02 UTC (permalink / raw) To: help-gnu-emacs > When doing C-h v magit*section-map TAB, the corresponding completion > list is shown. Is there an equivalent function which would accept > such a wild card and return the same list? E.g. The function used internally by the completion engine is completion-all-completions. Stefan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-22 19:02 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-22 1:12 Return list of variables name symbols (or strings) in Emacs Lisp (programmatically) Alexander Shukaev 2015-09-22 2:42 ` Emanuel Berg 2015-09-22 19:02 ` Stefan Monnier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).