noctuid / link-hint.el

Pentadactyl-like Link Hinting in Emacs with Avy
GNU General Public License v3.0
162 stars 22 forks source link

Avy settings bound by default #188

Closed xFA25E closed 3 years ago

xFA25E commented 3 years ago

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.

noctuid commented 3 years ago

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).

xFA25E commented 3 years ago

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!