tweak: helpful-set-variable-function: use setq!

helpful-set-variable-function defaults to setopt if it's available, setq
otherwise. `setopt` is superior for this use case because it uses
custom.el's mechanism for setting variables (thus respecting custom.el's
setters and type checks), however, it is unavailable in Emacs 28 and
earlier (`setopt` was introduced in 29).

Doom defines `setq!`, which is a drop-in replacement for setopt, and is
functional in Emacs 28, so it is the better option here.

Ref: #7527
This commit is contained in:
LemonBreezes 2023-11-23 17:34:57 -05:00 committed by Henrik Lissner
parent a180579d6f
commit 1bc5f441f0
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -584,7 +584,9 @@ current buffer."
filename))
(prog1 (apply fn args)
(when (buffer-live-p buf)
(with-current-buffer buf (goto-char pos)))))))))
(with-current-buffer buf (goto-char pos))))))))
:config
(setq helpful-set-variable-function #'setq!))
(use-package! smartparens