From 89c2e4af81f14a9037d73f6e025ed8a290f961d6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 15 May 2017 14:32:38 +0200 Subject: Emacs: Add "live coding" command --- emacs/.emacs.d/init.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'emacs/.emacs.d/init.org') 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 -- cgit 1.4.1