[hydra] refactor duplicate calls to my-compile-project

This commit is contained in:
contrapunctus 2021-08-08 23:38:50 +05:30
parent e20ed27cab
commit 2e50afd431
1 changed files with 11 additions and 12 deletions

View File

@ -1526,6 +1526,15 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
#+END_SRC
*** org
#+BEGIN_SRC emacs-lisp
(defun my-compile-org-lp ()
(interactive)
(my-compile-project
"Makefile"
(format "ORG_PATH=%S make -k %s"
(shell-quote-argument
(expand-file-name "~/.emacs.d/elisp-git/org-mode/lisp/"))
"compile")))
(my-defhydra my-org-hydra (:color blue)
"Org"
("p" org-set-property "property")
@ -1533,12 +1542,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
("t" my-org-hydra-set-tags "tags")
("C-t" org-todo "todo" :color red)
("n" my-org-hydra-nav/body "navigation")
("b" (my-compile-project
"Makefile"
(format "ORG_PATH=%S make -k %s"
(shell-quote-argument
(expand-file-name "~/.emacs.d/elisp-git/org-mode/lisp/"))
"compile")) "compile")
("b" my-compile-org-lp "compile")
("C-b" contrapunctus-async-tangle "babel-tangle")
("E" toggle-debug-on-error "tdoe")
@ -1592,12 +1596,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
(my-defhydra my-elisp-hydra (:color blue)
"Emacs Lisp"
("c" my-elisp-bytecomp-hydra/body "byte compile")
("b" (my-compile-project
"Makefile"
(format "ORG_PATH=%S make -k %s"
(shell-quote-argument
(expand-file-name "~/.emacs.d/elisp-git/org-mode/lisp/"))
"compile")) "compile")
("b" my-compile-org-lp "compile")
("C-b" contrapunctus-async-tangle "babel-tangle")
("e" my-elisp-hydra-eval/body "Eval")
("E" my-elisp-hydra-debug/body "Debug")