Skip to content

Instantly share code, notes, and snippets.

@xmaillard
Created December 30, 2014 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xmaillard/31a301c178e8d4944e18 to your computer and use it in GitHub Desktop.
Save xmaillard/31a301c178e8d4944e18 to your computer and use it in GitHub Desktop.
This is how defcustom can look like at worst !
```emacslisp
(defcustom twittering-edit-skeleton 'none
"*A symbol specifying an effective skeleton.
It must be one of a symbol in `twittering-edit-skeleton-alist'.
When entering `twittering-edit-mode', the skeletons in the specified
entry in `twittering-edit-skeleton-alist' are performed."
:group 'twittering-mode
:type (if (> (length (mapcar #'car twittering-edit-skeleton-alist)) 0)
`(choice ,@(mapcar (lambda (s) `(const ,s))
(mapcar #'car twittering-edit-skeleton-alist)))
'symbol))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment