Created
September 23, 2012 10:00
-
-
Save vderyagin/3769558 to your computer and use it in GitHub Desktop.
RFC-3092 compatible metasyntactic variable name generator.
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
(eval-when-compile | |
(require 'cl-lib)) | |
(defun foo (count) | |
"Inserts at point position COUNT metasyntactic variable names separated by spaces. | |
Compatible with RFC-3092." | |
(interactive "p") | |
(insert | |
(mapconcat | |
'identity | |
(cl-loop | |
repeat count | |
with foos = '("bar" "baz" "qux" "quux" "corge" | |
"grault" "garply" "waldo" "fred" | |
"plugh" "xyzzy" "thud") | |
for foo = (nth (random (length foos)) foos) | |
collect foo) | |
" "))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment