From 1bc5f441f00a06e61087e59e94e8ce1642ffeea6 Mon Sep 17 00:00:00 2001 From: LemonBreezes Date: Thu, 23 Nov 2023 17:34:57 -0500 Subject: [PATCH] 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 --- lisp/doom-editor.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/doom-editor.el b/lisp/doom-editor.el index 9f79d7d57..2159b885c 100644 --- a/lisp/doom-editor.el +++ b/lisp/doom-editor.el @@ -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