noctuid/link-hint.el

Avy settings bound by default

Closed this issue · 2 comments

Wouldn't it be better to have avy settings bound and defined as custom variables? They would take their respective avy setting value by default. For example:

(defcustom link-hint-avy-style avy-style 
  "The default method of displaying the overlays in link-hint.
See `avy-style' for more details."
  :type (custom-variable-type 'avy-style)

By doing this, users would be able to change link-hint behaviour through Customize interface.

The point is to use avy-style by default, so the user only has to configure these variables if they want them to be different from what they use for avy. With the current implementation, if the user changes avy-style, link-hint will use the new style. If it was a defcustom like that, it would not use the new style. I don't think there is a way to have an unbound value for a defcustom, is there? Maybe a special value could be used to mean "use avy setting" (nil won't work).

Ah, I see. I dont know a way to do that. I can only think of a very ugly solution: have a boolean variable that tells us if link-hint should use avy variables. Thanks for your answer!