Created
September 21, 2017 21:12
-
-
Save AdrieanKhisbe/81dbd538b6b8cca0b2dadd33ac24a6ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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