* core: eval-and-compile the functions used in eager macro expansion
This commit is contained in:
parent
866a2d5ae1
commit
7b738c2b0b
|
@ -890,17 +890,18 @@ 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
|
||||||
"Return a list of all the dotspacemacs variables as strings."
|
(defun dotspacemacs/get-variable-string-list ()
|
||||||
(all-completions "dotspacemacs" obarray
|
"Return a list of all the dotspacemacs variables as strings."
|
||||||
(lambda (x)
|
(all-completions "dotspacemacs" obarray
|
||||||
(and (boundp x)
|
(lambda (x)
|
||||||
;; avoid private variables to show up
|
(and (boundp x)
|
||||||
(not (string-match-p "--" (symbol-name x)))))))
|
;; avoid private variables to show up
|
||||||
|
(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,19 +805,20 @@ 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
|
||||||
"Given a string, return a spacemacs-buffer function name.
|
(defun spacemacs-buffer//startup-list-jump-func-name (str)
|
||||||
|
"Given a string, return a spacemacs-buffer function name.
|
||||||
|
|
||||||
Given: Return:
|
Given: Return:
|
||||||
\"[?]\" \"spacemacs-buffer/jump-to-[?]\"
|
\"[?]\" \"spacemacs-buffer/jump-to-[?]\"
|
||||||
\"Recent Files:\" \"spacemacs-buffer/jump-to-recent-files\""
|
\"Recent Files:\" \"spacemacs-buffer/jump-to-recent-files\""
|
||||||
(let ((s (downcase str)))
|
(let ((s (downcase str)))
|
||||||
;; remove last char if it's a colon
|
;; remove last char if it's a colon
|
||||||
(when (string-match ":$" s)
|
(when (string-match ":$" s)
|
||||||
(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)
|
||||||
|
|
Loading…
Reference in New Issue