OVH Cloud OVH Cloud

defcustom

2 réponses
Avatar
Ph. Ivaldi
Bonsoir,

Que me conseillez vous comme syntaxe pour remplacer `setq' par
`defcustom' dans une affectation de ce type:

(setq pi-template-alist
'(("[Mm]akefile\\'" . "mk")
(emacs-lisp-mode . "el")
("\\.tex$" . "tex")
("\\.cls$" . "cls")
...))

--
Merci de votre attention,
Philippe Ivaldi.
http://piprim.tuxfamily.org/

2 réponses

Avatar
Ralf Angeli
* Ph. Ivaldi (2007-02-11) writes:

Que me conseillez vous comme syntaxe pour remplacer `setq' par
`defcustom' dans une affectation de ce type:

(setq pi-template-alist
'(("[Mm]akefile'" . "mk")
(emacs-lisp-mode . "el")
(".tex$" . "tex")
(".cls$" . "cls")
...))



(defcustom foo
'((a . 1) (b . 2))
"Alist of ..."
:type 'alist)

Cf. (info "(elisp)Simple Types")

--
Ralf
Avatar
Ph. Ivaldi
Le 11 février 2007 à 11h18:20,
Ralf Angeli écrivit :

(defcustom foo
'((a . 1) (b . 2))
"Alist of ..."
:type 'alist)



Tout simplement...
Merci.
--
Philippe Ivaldi.
http://piprim.tuxfamily.org/