From 1f5f8bb2fb1bd6513fe42e26ffd9e3d4627ce1de Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Fri, 8 May 2020 23:05:57 -0600 Subject: [PATCH] emacs: add some project-specific key macros --- emacs/data.el | 17 +++++++++++++++++ emacs/init.el | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/emacs/data.el b/emacs/data.el index ad175bb..c959161 100644 --- a/emacs/data.el +++ b/emacs/data.el @@ -116,6 +116,23 @@ "Major mode for Lithium sound definitions." (setq font-lock-defaults '(agw-lithtxt-highlights))) +(fset 'agw-create-mthd-link + (kmacro-lambda-form [?i ?\[ escape ?l ?v ?f ?\( ?h ?y ?f ?\( ?i + ?\] ?\{ ?: ?# ?m ?t ?h ?d ?- escape ?p ?l + ?i ?\} escape ?v ?F ?- ?g ?u] + 0 + "%d")) + +(fset 'agw-create-memb-link + (kmacro-lambda-form [?v ?$ ?h ?y ?i ?\[ escape ?A ?\] ?\{ ?\} + escape ?i ?: ?# ?m ?e ?m ?b ?- escape ?p ?v + ?F ?- ?g ?u] + 0 + "%d")) + +(fset 'agw-create-back-link + (kmacro-lambda-form [?v ?f ?\] ?h ?y ?$ ?p ?v ?F ?- ?g ?u] 0 "%d")) + (provide 'agw-lithtxt-mode) ;; EOF diff --git a/emacs/init.el b/emacs/init.el index 7838222..4185d86 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -83,6 +83,10 @@ (agw-set-key "k" #'windmove-up) (agw-set-key "l" #'windmove-right) +(agw-set-key "m j" #'agw-create-back-link) +(agw-set-key "m k" #'agw-create-memb-link) +(agw-set-key "m l" #'agw-create-mthd-link) + (agw-set-key "a" #'org-archive-to-archive-sibling) (agw-set-key "A" #'org-force-cycle-archived)