Add the ->cube macro as a shortcut for single package cubes
This commit is contained in:
parent
6846577281
commit
dbb7415d3e
|
@ -51,6 +51,18 @@ For more info checkout [[https://github.com/gregsexton/origami.el]]"
|
||||||
(global-origami-mode t)))
|
(global-origami-mode t)))
|
||||||
|
|
||||||
|
|
||||||
|
(->cube helpful
|
||||||
|
"Helpful is an alternative to the built-in Emacs help that provides much more contextual information."
|
||||||
|
:init
|
||||||
|
(require 'helpful)
|
||||||
|
:config
|
||||||
|
(global-set-key (kbd "C-h f") #'helpful-callable)
|
||||||
|
(global-set-key (kbd "C-h v") #'helpful-variable)
|
||||||
|
(global-set-key (kbd "C-h k") #'helpful-key)
|
||||||
|
(global-set-key (kbd "C-h x") #'helpful-command)
|
||||||
|
(global-set-key (kbd "C-c C-d") #'helpful-at-point))
|
||||||
|
|
||||||
|
|
||||||
(defcube fg42/pinentry-cube
|
(defcube fg42/pinentry-cube
|
||||||
"Pinentry cube with setup the =pinentry= program to be used within FG42."
|
"Pinentry cube with setup the =pinentry= program to be used within FG42."
|
||||||
(:title "Pinentry cube"
|
(:title "Pinentry cube"
|
||||||
|
|
|
@ -33,8 +33,6 @@ For more info checkout [[https://github.com/wentasah/meson-mode]]"
|
||||||
:flag mesonbuild
|
:flag mesonbuild
|
||||||
:flag-default t)
|
:flag-default t)
|
||||||
(fpkg/use meson-mode
|
(fpkg/use meson-mode
|
||||||
:bind
|
|
||||||
(("C-c TAB" . origami-toggle-node))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(when-flag company
|
(when-flag company
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
(defun fg42/build-docs-for-cube (build-dir cube)
|
(defun fg42/build-docs-for-cube (build-dir cube)
|
||||||
"Build the given CUBE's doc in BUILD-DIR"
|
"Build the given CUBE's doc in BUILD-DIR."
|
||||||
(let* ((cubes-dir (expand-file-name "site/cubes/" build-dir))
|
(let* ((cubes-dir (expand-file-name "site/cubes/" build-dir))
|
||||||
(props (symbol-plist cube))
|
(props (symbol-plist cube))
|
||||||
(docs (plist-get props :docs))
|
(docs (plist-get props :docs))
|
||||||
|
|
|
@ -165,5 +165,17 @@ it is to use `fg42/after-cubes' macro.")
|
||||||
,@body)))
|
,@body)))
|
||||||
|
|
||||||
|
|
||||||
|
(defmacro ->cube (pkg docs &rest body)
|
||||||
|
"A wrapper to create a cube that use only a PKG.
|
||||||
|
It passes the BODY to `fpkg/use'."
|
||||||
|
(declare (indent defun) (doc-string 2))
|
||||||
|
`(defcube ,(intern (format "fg42/%s-cube" pkg))
|
||||||
|
,docs
|
||||||
|
(:title ,(format "%s cube" pkg)
|
||||||
|
:flag pkg
|
||||||
|
:flag-default t)
|
||||||
|
(fpkg/use ,pkg ,@body)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'fg42/cube)
|
(provide 'fg42/cube)
|
||||||
;;; cube.el ends here
|
;;; cube.el ends here
|
||||||
|
|
Loading…
Reference in New Issue