summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-05-15 14:32:38 +0200
committerAlan Pearce2017-05-15 14:32:38 +0200
commit89c2e4af81f14a9037d73f6e025ed8a290f961d6 (patch)
treebe734ba8ee835a5f903d4bce03a90e1ec5860043
parentd9619a25b276c5aff47b70c15cf2942fa2b9313b (diff)
downloaddotfiles-89c2e4af81f14a9037d73f6e025ed8a290f961d6.tar.lz
dotfiles-89c2e4af81f14a9037d73f6e025ed8a290f961d6.tar.zst
dotfiles-89c2e4af81f14a9037d73f6e025ed8a290f961d6.zip
Emacs: Add "live coding" command
-rw-r--r--emacs/.emacs.d/init.org27
1 files changed, 27 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 373ab26..79aa7c5 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -2183,6 +2183,33 @@ I derived a mode for twig, in order to use its =mode-hook=.
 (add-to-list 'auto-mode-alist '("\\.html\\.twig\\'" . twig-mode))
 #+END_SRC
 
+** Live coding
+
+Sometimes I might want to show off my emacs usage.
+
+#+BEGIN_SRC emacs-lisp
+(defun live-coding ()
+  (interactive)
+  (ap/set-fonts "SF Mono" 18 nil nil t 0.1)
+  (global-command-log-mode 1))
+
+(defun live-coding-stop ()
+  (interactive)
+  (ap/set-fonts-according-to-system)
+  (global-command-log-mode -1))
+#+END_SRC
+
+*** command-log-mode
+
+#+BEGIN_SRC emacs-lisp
+(use-package command-log-mode
+  :defines command-log-mode-key-binding-open-log
+  :init (progn
+          (setq command-log-mode-key-binding-open-log nil
+                command-log-mode-auto-show t
+                command-log-mode-is-global t)))
+#+END_SRC
+
 * Spelling
 
 #+BEGIN_SRC emacs-lisp