From 5b70f9aac3fcebd3c6d7a76f2c1abde5aa1c4255 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Sun, 18 Mar 2018 12:11:56 -0400 Subject: [PATCH] Bubble up flash-hline --- global.org | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/global.org b/global.org index 147538d..3eb27e9 100644 --- a/global.org +++ b/global.org @@ -401,6 +401,24 @@ (insert (format "%S" value)))) (global-set-key (kbd "C-c C-x C-e") 'replace-last-sexp) #+END_SRC +* Specialties +** flash-hline + This function is defined to help in training with new keybindings. It + acts as a visual bell which flashes the current line. It is (arbitrarily) + bound to F15 which is supposed to be triggered by some illegal key hit + #+BEGIN_SRC emacs-lisp + (defun flash-hline () + "Flash the current line to emph some mistake" + (interactive) + (let ((fg (face-foreground 'default)) + (bg (face-background 'hl-line))) + (set-face-background 'hl-line fg) + (run-with-timer + 0.1 nil (lambda () + (set-face-background 'hl-line "#303030") )))) + + (global-set-key (kbd "") 'flash-hline) + #+END_SRC * Leftovers #+BEGIN_SRC emacs-lisp ;; * include other files @@ -464,19 +482,6 @@ ;; (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) - (defun flash-hline () - "Flash the current line to emph some mistake" - (interactive) - (let ((fg (face-foreground 'default)) - (bg (face-background 'hl-line))) - (set-face-background 'hl-line fg) - (run-with-timer - 0.1 nil (lambda () - (set-face-background 'hl-line "#303030") )))) - - (global-set-key (kbd "") 'flash-hline) - - ;;; Stefan Monnier . It is the opposite of fill-paragraph (defun unfill-paragraph (&optional region) "Takes a multi-line paragraph and makes it into a single line of text."