emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: Proposal to change cursor appearance to indicate region


From: Stefan Monnier
Subject: Re: [PATCH] Re: Proposal to change cursor appearance to indicate region activation
Date: Thu, 22 Jan 2015 09:25:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> +(defcustom dynamic-cursor-mode 't
> +  "If non-nil, `cursor-type' is set dynamically to reflect `mark-active'."
> +  :type 'boolean
> +  :version "25.1"
> +  :group 'editing-basics)

I'd rather see a `define-minor-mode' here, especially since you already
chose a "...-mode" name.  Nitpick: no need to quote t.

> @@ -4430,6 +4436,7 @@
>       ((eq transient-mark-mode 'lambda)
>        (setq transient-mark-mode nil)))
>      (setq mark-active nil)
> +    (if dynamic-cursor-mode (setq cursor-type 't))
>      (run-hooks 'deactivate-mark-hook)
>      (redisplay--update-region-highlight (selected-window))))
>
> @@ -4445,3 +4452,4 @@
> +      (if dynamic-cursor-mode (setq cursor-type 'bar))
>        (run-hooks 'activate-mark-hook))))
>
>  (defun set-mark (pos)

But if the user has set cursor-type in his .emacs, we'll now overwrite
his choice.  So we can't enable this code by default.  Two options:
- keep the default as nil.
- change the code to only modify the cursor-type if it hasn't been changed.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]