|
From: | Stefan Monnier |
Subject: | Re: [PATCH] Proposal to change cursor appearance to indicate region activation |
Date: | Thu, 22 Jan 2015 23:55:44 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> +(defun maybe-disable--dynamic-cursor () > + (unless (eq (default-value 'cursor-type) > + (eval (car (get 'cursor-type 'standard-value)))) > + (global-dynamic-cursor-mode 0))) Hmm... that's rather ugly. I was thinking of rather doing something like: (defvar-local dynamic-cursor-mode--set nil "If non-nil, we've temporarily modified the cursor.") > + (if dynamic-cursor-mode (setq cursor-type t)) (when dynamic-cursor-mode (if (and dynamic-cursor-mode--set (eq cursor-type 'bar)) (setq cursor-type t)) (setq dynamic-cursor-mode--set nil)) and > + (if dynamic-cursor-mode (setq cursor-type 'bar)) (if (and dynamic-cursor-mode (eq cursor-type t)) (setq cursor-type 'bar dynamic-cursor-mode--set t)) So you don't need a buffer-local activation of dynamic-cursor-mode. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |