Wilfred / helpful

A better Emacs *help* buffer
1.11k stars 62 forks source link

Use setopt for "set" button if available #332

Closed LemonBreezes closed 11 months ago

LemonBreezes commented 1 year ago

Hello. This PR allows for customizing the prompt which Helpful prefills when we click the "set" button. By default I've set helpful up to use setopt if available since setting some variables will not work if they are just set with setq.

I made it customizable so that Doom Emacs could set it to setq!.

Wilfred commented 11 months ago

Seems reasonable, thanks.

Why would Doom Emacs want to treat this differently? I don't understand what's different about that situation.

LemonBreezes commented 11 months ago

Seems reasonable, thanks.

Why would Doom Emacs want to treat this differently? I don't understand what's different about that situation.

To be honest, the primary reason is that setq! is guaranteed to be there for earlier Emacs versions (since we define it).