From f4e9116bfbaac8c9d210c17ad488e0982291245f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anler=20Hern=C3=A1ndez=20Peral?= Date: Mon, 10 Sep 2018 12:28:45 +0200 Subject: [PATCH] Add a separate var for controlling mode lighter Define the `evil-escape-lighter` custom var so users of the mode are able to customize the lighter for the mode which is by default the value defined in `evil-escape-key-sequence`. --- evil-escape.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/evil-escape.el b/evil-escape.el index b6c870d..7e3bb79 100644 --- a/evil-escape.el +++ b/evil-escape.el @@ -1,4 +1,4 @@ -;;; evil-escape.el --- Escape from anything with a customizable key sequence + ;;; evil-escape.el --- Escape from anything with a customizable key sequence ;; Copyright (C) 2014-2015 syl20bnr ;; @@ -102,6 +102,11 @@ :type 'key-sequence :group 'evil-escape) +(defcustom evil-escape-lighter '(concat " " evil-escape-key-sequence) + "The lighter for the evil escape mode." + :type 'sexp + :group 'evil-escape) + (defcustom evil-escape-delay 0.1 "Max time delay between two key presses." :type 'number @@ -141,7 +146,7 @@ key first." (define-minor-mode evil-escape-mode "Buffer-local minor mode to escape insert state and everything else with a key sequence." - :lighter (:eval (concat " " evil-escape-key-sequence)) + :lighter (:eval evil-escape-lighter) :group 'evil :global t (if evil-escape-mode