Re: Save & load file
edgar <[email protected]> Wed, 15 Jul 2015 01:17:47 +0200
| Newsgroups | gmane.lisp.slime.devel |
|---|---|
| Message-ID | <20150715011747.7c5bb2e6@compaq-evo> |
Am Tue, 14 Jul 2015 16:58:31 -0500 schrieb Blake McBride <[email protected]>: > Greetings, > > Long-time lisp user, short time slime user here. There is something > I like to do frequently but seems to be a real hassle with slime. > I'm sure either there is a command to do what I want, or it is easy > for me to write one. I thought rather than going doen an ignorant > path, I'd ask the list. Sure appreciate any help. > > What I would like is a keyboard command that would: > > 1. save the current file being edited > > 2. load (not compile) that file without asking it's name A basic Emacs function doing both could look like this: (defun slime-save-and-load-file () (interactive "P") (let ((filename (buffer-file-name))) (if (not filename) (message "Buffer %s is not associated with a file." (buffer-name)) (save-buffer) (slime-load-file filename)))) - edgar