如何设置defcustom变量

cnd*_*cnd 8 emacs elisp

有cperl模式

以及我在源代码中看到的设置:

(defcustom cperl-indent-parens-as-block nil
  "*Non-nil means that non-block ()-, {}- and []-groups are indented as blocks,
but for trailing \",\" inside the group, which won't increase indentation.
One should tune up `cperl-close-paren-offset' as well."
  :type 'boolean
  :group 'cperl-indentation-details)
Run Code Online (Sandbox Code Playgroud)

我试图使用,(custom-set-variable '(cperl-indent-parens-as-block t))但这不起作用,所以如何将其更改t为全局设置?

Dmi*_*try 10

该函数被称为...-variables:

(custom-set-variables '(cperl-indent-parens-as-block t))
Run Code Online (Sandbox Code Playgroud)

或者您可以使用setq,因为变量没有定义setter:

(setq cperl-indent-parens-as-block t)
Run Code Online (Sandbox Code Playgroud)