Last active
August 30, 2015 08:14
-
-
Save zkat/112527 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
(setq current-cl-package "COMMON-LISP-USER") | |
(defun erc-cmd-CLPACKAGE (&optional package &rest ignore) | |
(when package | |
(setq current-cl-package (upcase package))) | |
(erc-send-message (format "CL Package is: %s" current-cl-package))) | |
(defun erc-cmd-EVAL (&rest form) | |
"Eval FORM and send the result and the original form as: | |
FORM => (eval FORM)." | |
(let* ((form-string (mapconcat 'identity form " ")) | |
(result | |
(condition-case error | |
(cadr (slime-eval `(swank:eval-and-grab-output ,form-string) | |
current-cl-package)) | |
(error | |
(format "Error: %s" error))))) | |
(erc-send-message (format "%s => %s" form-string result)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment