Skip to content

Instantly share code, notes, and snippets.

Created Mar 6, 2009
What would you like to do?
;; fmakunboundで、(setf foo)を拾う
(defun slime-undefine-function (symbol-name)
"Unbind the function slot of SYMBOL-NAME."
(interactive (list (slime-read-function-name "fmakunbound: " t)))
(slime-eval-async `(swank:undefine-function ,symbol-name)
(lambda (result) (message "%s" result))))
(defun slime-function-name-at-point ()
(let ((name (thing-at-point 'list)))
(if (and name (eq 'setf (caar (read-from-string name))))
(format "%s" (car (read-from-string name)))
(defun slime-read-function-name (prompt &optional query)
(cond ((or current-prefix-arg query (not (slime-function-name-at-point)))
(slime-read-from-minibuffer prompt (slime-function-name-at-point)))
(t (slime-function-name-at-point)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment