Skip to content

Instantly share code, notes, and snippets.

@AdrieanKhisbe
Created September 21, 2017 21:12
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 AdrieanKhisbe/81dbd538b6b8cca0b2dadd33ac24a6ed to your computer and use it in GitHub Desktop.
Save AdrieanKhisbe/81dbd538b6b8cca0b2dadd33ac24a6ed to your computer and use it in GitHub Desktop.
(defcustom snoopy-current-layout
'snoopy-qwerty-keyboard-digit-layout
"Snoopy current-layout"
:group 'snoopy
:type '(restricted-sexp
:match-alternatives
((lambda (s)
(message "VAR %s" s) ; debuging
(and (symbolp s) (fboundp s)
(string-prefix-p "snoopy-" (symbol-name s))
(string-suffix-p "-keyboard-digit-layout" (symbol-name s))))))
:set (lambda (symb val)
(set-default symb val)
(message "SEETING %s %s" symb val) ; debuging
(when (boundp 'snoopy-mode-map)
(setq snoopy-mode-map (snoopy-make-mode-map (symbol-value val)))
(setcdr (assoc 'snoopy-mode minor-mode-map-alist) snoopy-mode-map)))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment