aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-08-13 12:05:01 -0700
committercolin <colin@cicadas.surf>2023-08-13 12:05:01 -0700
commitacd71e2ebde2dac70a19646990a90a651ee0cc18 (patch)
treecb607e3adc0a8dbcbf2ed57e8079199debe9c630
parent88864af431dca424f9481be377cb98a3d2cff368 (diff)
add slime tweak to display random function doc at startup
-rw-r--r--init-el.org31
1 files changed, 31 insertions, 0 deletions
diff --git a/init-el.org b/init-el.org
index e067cff..dea1143 100644
--- a/init-el.org
+++ b/init-el.org
@@ -1290,6 +1290,8 @@ association one shell with each [[*Perspectives Leader Key Menu][perspective aka
<<common-lisp-editing-config>>
+<<slime-tweaks>>
+
<<coalton-config>>
#+end_src
@@ -1437,6 +1439,35 @@ from debian contrib
#+end_src
+*** SLIME-TWEAKS
+
+#+name: slime-tweaks
+#+begin_src elisp :noweb no-export
+
+(defun slime-random-words-of-encouragement ()
+ "Return a string of hackerish encouragement."
+ (slime-eval
+ '(swank:documentation-symbol
+ (cl:loop :for name :being :each :symbol :in (cl:find-package "CL")
+ :collect (cl:symbol-name name) :into names
+ :count 1 :into size
+ :finally
+ (cl:let* ((rs (cl:make-random-state))
+ (state (sb-kernel::random-state-state rs)))
+ (cl:dotimes (idx (cl:length state))
+ (cl:setf (cl:elt state idx)
+ (cl:mod (cl:+ (cl:get-universal-time)
+ (cl:elt state idx))
+ #xff)))
+ (cl:return (cl:elt names (cl:random size rs))))))))
+
+
+
+#+end_src
+
+#+RESULTS: slime-tweaks
+: slime-random-words-of-encouragement
+
*** Coalton