[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Proposal to change cursor appearance to indicate region acti
From: |
Kelly Dean |
Subject: |
Re: [PATCH] Proposal to change cursor appearance to indicate region activation |
Date: |
Fri, 23 Jan 2015 11:40:55 +0000 |
Eli Zaretskii wrote:
>> +(add-hook 'emacs-startup-hook #'maybe-disable--dynamic-cursor)
>
> Isn't there a way to do this that avoids using hooks? I think using
> hooks in standard features should be avoided. Hooks are for
> customizing Emacs.
I don't know, but there's already a bunch of stuff in Emacs that uses
emacs-startup-hook and after-init-hook, so I assumed that's the way I'm
supposed to do it.
But Stefan and I agree that maybe-disable--dynamic-cursor in particular is
ugly, and I recommend not using it. I just wrote it to satisfy a requirement he
gave (avoiding trampling on the user's setting of cursor-type in his init file)
if dynamic-cursor defaults to t.
I recommend defaulting dynamic-cursor to nil, which avoids the need for
maybe-disable--dynamic-cursor, because the latter doesn't solve the general
problem (the user might set cursor-type even after startup) and Emacs provides
no way to solve it. I originally recommended defaulting dynamic-cursor to t,
because I missed the problem (the trampling) that he pointed out.