Browse Source

Add paredit and rainbow delimeter to elisp cube

v3
Sameer Rahmani 2 years ago
parent
commit
2031df182b
  1. 9
      core/cubes/elisp.el
  2. 8
      core/cubes/elisp/core.el
  3. 12
      core/fg42/cube.el

9
core/cubes/elisp.el

@ -28,10 +28,15 @@ @@ -28,10 +28,15 @@
(require 'fg42/cube)
(autoload 'fg42/elisp-hook-handler "cubes/elisp/core")
(package-as-cube paredit)
(defcube fg42/elisp-cube ()
:requires '()
:requires '(paredit)
;;:modes '((emacs-lisp-mode . f42/elisp-cube-after-load))
;;:hooks (list (lambda (system) '(emacs-lisp-mode-hook . fssd)))
:hooks '((emacs-lisp-mode-hook . fg42/elisp-hook-handler))
;;:auto-modes (list (lambda (system) '("\\.el\\'" . fg42/elisp-cube-mmm)))
;;:init #'iii
:dependencies '((:name rainbow-delimiters :version :latest)))

8
core/cubes/elisp/core.el

@ -27,7 +27,13 @@ @@ -27,7 +27,13 @@
;;; Code:
(defun fg42/elisp-hook-handler ()
"Configure the elisp mode."
(require 'rainbow-delimiters)
(require 'paredit)
(rainbow-delimiters-mode t)
(paredit-mode t)
(message "Elisp cube is done"))
(provide 'cubes/elisp/core)

12
core/fg42/cube.el

@ -45,6 +45,18 @@ @@ -45,6 +45,18 @@
,@body)))))
(defmacro package-as-cube (name &rest body)
"Define a cube based on a package with the given NAME and BODY."
`(defun ,name (&optional __version__)
(lambda (system)
(cons
system
(list
:name ',name
:dependencies (list (list :name ',name :version (or __version__ :latest)))
,@body)))))
(defmacro active-cube? (name &rest body)
"Run the BODY if the given cube NAME is activated."
(declare (indent defun))

Loading…
Cancel
Save