branch: elpa/evil
commit 3b678a221ee99cc6a95b01d7a3129ce5efc4c3da
Author: Tim Ruffing <[email protected]>
Commit: Tom Dalziel <[email protected]>
Document how to disable the cursor
Fixes #592.
---
evil-common.el | 6 +++++-
evil-core.el | 6 +++++-
evil-vars.el | 5 ++++-
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/evil-common.el b/evil-common.el
index 5ffc1313fe..4aa141676d 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -731,7 +731,11 @@ filename."
"Change the cursor's apperance according to SPECS.
SPECS may be a cursor type as per `cursor-type', a color
string as passed to `set-cursor-color', a zero-argument
-function for changing the cursor, or a list of the above."
+function for changing the cursor, or a list of the above.
+
+If SPECS is nil, this function does not have an effect;
+pass (list nil) instead to indicate a nil `cursor-type'
+\(i.e., to disable the cursor)."
(unless (and (not (functionp specs))
(listp specs)
(null (cdr-safe (last specs))))
diff --git a/evil-core.el b/evil-core.el
index 80e84c8ea5..ae3f9494a3 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -1231,7 +1231,11 @@ Use the command `%s' to change this variable." name
toggle))
,(format "Cursor for %s.
May be a cursor type as per `cursor-type', a color string as passed
to `set-cursor-color', a zero-argument function for changing the
-cursor, or a list of the above." name))
+cursor, or a list of the above.
+
+If set to nil, the value of `evil-default-cursor' is used; if you
+want the nil `cursor-type' (i.e., you want to disable the cursor),
+set this variable to (list nil)." name))
:entry-hook (defvar ,entry-hook nil
,(format "Hooks to run when entering %s."
name))
:exit-hook (defvar ,exit-hook nil
diff --git a/evil-vars.el b/evil-vars.el
index b400484c5a..291a91ab8e 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -198,7 +198,10 @@ value of `indent-tabs-mode'."
"The default cursor.
May be a cursor type as per `cursor-type', a color string as passed
to `set-cursor-color', a zero-argument function for changing the
-cursor, or a list of the above."
+cursor, or a list of the above.
+
+nil is interpreted as t; if you want the nil `cursor-type' (i.e.,
+you want to disable the cursor), set this variable to (list nil)."
:type '(set symbol (cons symbol symbol) string function)
:group 'evil)