#Emacs' undo-tree.el repository has got only 21 stars. Such a masterpiece, 21 only. Can't understand.
@arialdo vundo is better
@arialdo: i use this customization:
(setopt vundo-glyph-alist vundo-unicode-symbols)
(setq instead of setopt would probably work too)
@mekeor Beautiful. I found that option in the documentation. I did not know about setopt, and now I feel the urge to understand the difference between setopt and setq.
@arialdo @mekeor User options are a higher abstraction than variables. They can have custom setters and getters that execute actions when modified, which setq
would ignore. Examples of user options with side effects are minor modes, which when enabled using setopt
(setopt electric-pair-mode t)
will call the function initialising the minor mode.
It is also possible to have a user option that doesn't have any associated variable, where setting a user option just runs code (e.g. it could modify some more complex state). In these cases, it would be wrong to use setq
.
Also neat: setopt
does (weak) type checking to warn you if the value you are assigning doesn't match the type of the user option.