[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: which one to use: custom-set-variables, customize-set-variable, or c
From: |
Drew Adams |
Subject: |
RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value? |
Date: |
Sat, 12 Dec 2015 08:11:07 -0800 (PST) |
> d> And no, you do not ever need to "check each variable documentation to
> d> see the right way to set its value". (And you should anyway not rely
> d> on a variable's documentation for that.)
>
> How's it that possible? How can then I know when to use `setq',
> `setq-default' or `customize-set-variable'?
> t> I think Lele has a point here. Imagine some "simple" variable which
> t> becomes later (i.e. in a later Emacs version) a user option. The
> t> once "right" code in the Emacs init file becomes kind-of "wrong".
>
> Yes, exactly. Or a buffer-local setting, when it would be even more
> "wrong".
Perhaps I misunderstood. I thought you meant check the doc for a
description of what the :set function does, initialization, etc.
Anyway, what I meant is to not check _only the documentation_.
Check also the definition of the variable.
While the documentation should correctly report whether it is
an option, and whether it might have a buffer-local value, it
is still good, IMO, to check the defvar/defcustom.
As I said, you can certainly do as you suggest. My suggestion is
to clearly show in your init file how you are setting the value.
Including for different Emacs versions - so you are aware of such
changes when you read your code later. But it's just a suggestion.
- Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, Lele Gaifax, 2015/12/11
- RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, Drew Adams, 2015/12/11
- Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, Lele Gaifax, 2015/12/12
- RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?,
Drew Adams <=
- Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, tomas, 2015/12/13
- RE: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, Drew Adams, 2015/12/13
- Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, Lele Gaifax, 2015/12/14
- Re: which one to use: custom-set-variables, customize-set-variable, or customize-set-value?, B.V. Raghav, 2015/12/14