Skip to content

Instantly share code, notes, and snippets.

@g000001 g000001/gist:74892
Created Mar 6, 2009

Embed
What would you like to do?
(progn
;; 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)))
(slime-symbol-at-point))))
(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
You can’t perform that action at this time.