core/core-dotspacemacs.el: speedup dotspacemacs/get-variable-string-list

This commit is contained in:
Lin Sun 2022-11-19 00:00:25 +00:00 committed by Maxi Wolff
parent ecb87b53f7
commit 748ed30171
1 changed files with 2 additions and 4 deletions

View File

@ -892,13 +892,11 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preliminary tests."
(defun dotspacemacs/get-variable-string-list () (defun dotspacemacs/get-variable-string-list ()
"Return a list of all the dotspacemacs variables as strings." "Return a list of all the dotspacemacs variables as strings."
(all-completions "" obarray (all-completions "dotspacemacs" obarray
(lambda (x) (lambda (x)
(and (boundp x) (and (boundp x)
(not (keywordp x))
;; avoid private variables to show up ;; avoid private variables to show up
(not (string-match-p "--" (symbol-name x))) (not (string-match-p "--" (symbol-name x)))))))
(string-prefix-p "dotspacemacs" (symbol-name x))))))
(defun dotspacemacs/get-variable-list () (defun dotspacemacs/get-variable-list ()
"Return a list of all dotspacemacs variable symbols." "Return a list of all dotspacemacs variable symbols."