Compare commits

...

4 Commits

Author SHA1 Message Date
contrapunctus e456bec299 Add newline to print debug template 2022-11-07 11:55:56 +05:30
contrapunctus 331d8e9297 Add :initform and define-presentation-method templates 2022-11-07 11:55:43 +05:30
contrapunctus fb9da3127e Add SLIME inspector keybinding 2022-11-07 11:54:54 +05:30
contrapunctus bc396c2457 Add Hydra keybinding for org-toggle-checkbox 2022-11-04 14:04:36 +05:30
2 changed files with 15 additions and 8 deletions

View File

@ -871,6 +871,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
(my-defhydra my-org-hydra (:color blue)
"Org"
("c" org-toggle-checkbox "checkbox")
("L" my-literate-elisp-hydra/body "literate-elisp")
("p" org-set-property "property")
("l" my-org-hydra-block/body "source block")
@ -1038,17 +1039,18 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
:CUSTOM_ID: hydra-common-lisp
:END:
#+BEGIN_SRC emacs-lisp
(my-defhydra my-cl-hydra (:color blue)
(my-defhydra my-common-lisp-hydra (:color blue)
"Common Lisp"
("R" slime-connect "connect")
("h" my-cl-help-hydra/body "Documentation")
("e" my-cl-hydra-eval/body "Eval")
("h" my-common-lisp-help-hydra/body "Documentation")
("e" my-common-lisp-hydra-eval/body "Eval")
("E" toggle-debug-on-error "tdoe")
("Q" toggle-debug-on-quit "tdoq")
("r" slime "REPL")
("j" slime-edit-definition "Jump to definition")
("p" slime-repl-set-package "Set package")
("n" imenus "imenus"))
("n" imenus "imenus")
("v" slime-inspect-presentation-at-point "inspect"))
#+END_SRC
**** eval
@ -1056,7 +1058,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
:CUSTOM_ID: eval-2
:END:
#+BEGIN_SRC emacs-lisp
(defhydra my-cl-hydra-eval (:color blue)
(defhydra my-common-lisp-hydra-eval (:color blue)
"Eval (CL)"
("b" slime-eval-buffer "buffer")
("e" slime-eval-defun "defun")
@ -1070,7 +1072,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
:CUSTOM_ID: help-1
:END:
#+BEGIN_SRC emacs-lisp
(defhydra my-cl-help-hydra (:color blue)
(defhydra my-common-lisp-help-hydra (:color blue)
("s" slime-documentation "slime")
("h" slime-documentation-lookup "CLHS")
("l" find-library "library")
@ -1178,7 +1180,7 @@ Don't try to check if there are files with a certain extension...it will lead to
(cp-guile/body)
(my-chicken-hydra/body)))
((derived-mode-p 'lisp-mode
'slime-repl-mode) (my-cl-hydra/body))
'slime-repl-mode) (my-common-lisp-hydra/body))
((derived-mode-p 'prolog-mode) (my-prolog-hydra/body))
((derived-mode-p 'org-mode) (my-org-hydra/body))
((derived-mode-p 'sh-mode) (my-shell-hydra/body))

View File

@ -29,6 +29,7 @@ slime-repl-mode lisp-mode
" :initarg :" (s slot) n>
" :accessor " (s slot) > ")")
(d ":documentation \"" (s "docstring") "\"")
(if ":initform " q)
(dg "(defgeneric " p " (" "))")
(qq "(ql:quickload '(" (p "packages") "))")
(dp "(defpackage :" (p "name")
@ -38,10 +39,14 @@ slime-repl-mode lisp-mode
(ln "(:local-nicknames (:" (p "nickname") " :" (p "package-name") ")" q ")")
(c "#+(or)")
;; print debugging
(pd "(format *debug-io* \"" q "\")")
(pd "(format *debug-io* \"" q "~%\")")
(im "(:import-from :" (s "package") " #:" (s "symbol") ")")
(di "(:default-initargs " (s "initarg") ")")
(qu "(ql:update-all-dists)" n> "(ql:update-client)")
(dpmp
"(define-presentation-method present "
n> "(object (type " (p "t") ") (stream " (p "t") ") view &key acceptably for-context-type)"
n> q ")")
sql-mode
(ct "CREATE TABLE " (s "table") " ("