Arne
Arne

Reputation: 2674

How to customize a list of directories in Emacs?

I have a customizable variable, containing a list of directories. I would like to be able to customize it using some INS and DEL buttons in Emacs custom mode, and if possible even use a file picker for customizations. So what I have so far now is:

(defcustom my-system-include-paths '( "./include/" "/opt/local/include" "/usr/include" )
  "This is a list of include paths."
  :group 'mygroup
  )

I imagine that I have to use the :type parameter, but I don't know how to use it.

Upvotes: 1

Views: 504

Answers (1)

Daimrod
Daimrod

Reputation: 5030

Emacs is self documented, use it.

M-:(info "(elisp) Composite Types")RET

(online)

e.g. you can define a list of directories like this:

(defcustom custom-directories nil
  "Custom variable"
  :type '(repeat directory))

Upvotes: 3

Related Questions