* core: eval-and-compile the functions used in eager macro expansion
This commit is contained in:
parent
866a2d5ae1
commit
7b738c2b0b
2 changed files with 21 additions and 19 deletions
|
@ -890,7 +890,8 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preliminary tests."
|
||||||
(when (configuration-layer/package-used-p 'spaceline)
|
(when (configuration-layer/package-used-p 'spaceline)
|
||||||
(spacemacs//restore-buffers-powerline)))
|
(spacemacs//restore-buffers-powerline)))
|
||||||
|
|
||||||
(defun dotspacemacs/get-variable-string-list ()
|
(eval-and-compile
|
||||||
|
(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 "dotspacemacs" obarray
|
(all-completions "dotspacemacs" obarray
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
@ -898,9 +899,9 @@ Called with `C-u C-u' skips `dotspacemacs/user-config' _and_ preliminary tests."
|
||||||
;; 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)))))))
|
||||||
|
|
||||||
(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."
|
||||||
(mapcar 'intern (dotspacemacs/get-variable-string-list)))
|
(mapcar 'intern (dotspacemacs/get-variable-string-list))))
|
||||||
|
|
||||||
(defmacro dotspacemacs|symbol-value (symbol)
|
(defmacro dotspacemacs|symbol-value (symbol)
|
||||||
"Return the value of SYMBOL corresponding to a dotspacemacs variable.
|
"Return the value of SYMBOL corresponding to a dotspacemacs variable.
|
||||||
|
|
|
@ -805,7 +805,8 @@ If MESSAGEBUF is not nil then MSG is also written in message buffer."
|
||||||
(when messagebuf
|
(when messagebuf
|
||||||
(message "(Spacemacs) %s" msg)))))
|
(message "(Spacemacs) %s" msg)))))
|
||||||
|
|
||||||
(defun spacemacs-buffer//startup-list-jump-func-name (str)
|
(eval-and-compile
|
||||||
|
(defun spacemacs-buffer//startup-list-jump-func-name (str)
|
||||||
"Given a string, return a spacemacs-buffer function name.
|
"Given a string, return a spacemacs-buffer function name.
|
||||||
|
|
||||||
Given: Return:
|
Given: Return:
|
||||||
|
@ -817,7 +818,7 @@ Given: Return:
|
||||||
(setq s (substring s nil (1- (length s)))))
|
(setq s (substring s nil (1- (length s)))))
|
||||||
;; replace any spaces with a dash
|
;; replace any spaces with a dash
|
||||||
(setq s (replace-regexp-in-string " " "-" s))
|
(setq s (replace-regexp-in-string " " "-" s))
|
||||||
(concat "spacemacs-buffer/jump-to-" s)))
|
(concat "spacemacs-buffer/jump-to-" s))))
|
||||||
|
|
||||||
(defmacro spacemacs-buffer||add-shortcut
|
(defmacro spacemacs-buffer||add-shortcut
|
||||||
(shortcut-char search-label &optional no-next-line)
|
(shortcut-char search-label &optional no-next-line)
|
||||||
|
|
Reference in a new issue