<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Contact: stassats@gmail.com</description><title>Slime Tips</title><generator>Tumblr (3.0; @slime-tips)</generator><link>http://slime-tips.tumblr.com/</link><item><title>Exporting symbols, part 2</title><description>&lt;p&gt;&lt;a href="http://slime-tips.tumblr.com/post/10851398604/exporting-symbols"&gt;Earlier I wrote about exporting symbols&lt;/a&gt;, now there&amp;#8217;s a few new options.&lt;/p&gt;&#13;
&lt;p&gt;&lt;strong&gt;slime-export-symbol-representation-auto&lt;/strong&gt; default value &lt;em&gt;T&lt;/em&gt;.&lt;/p&gt;&#13;
&lt;p&gt;Automatically determines which exporting style to use,&amp;#160;: or #:, based on already exported symbols in the defpackage form. If both or neither are used, the default described in the previous post is applied.&lt;/p&gt;&#13;
&lt;p&gt;&lt;strong&gt; slime-export-save-file&lt;/strong&gt;, default value NIL&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#13;
&lt;p&gt;Automatically save the file in which the defpackage form is residing after an export operation.&lt;/p&gt;&#13;
&lt;p&gt;I often export something, and since the file is in the background, I forget to save it and it breaks the next recompile, or I even forget to commit it. &lt;/p&gt;&#13;
&lt;p&gt;&lt;em&gt;P.S. It appears that there was a bug when slime-export-symbol-representation-auto was set to T, it used &amp;#8220;:&amp;#8221; prefix by default, it&amp;#8217;s now fixed in CVS, and should be included in the next Quicklisp update.&lt;/em&gt;&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/36279729555</link><guid>http://slime-tips.tumblr.com/post/36279729555</guid><pubDate>Thu, 22 Nov 2012 16:49:00 +0400</pubDate></item><item><title>Smarter M-.</title><description>&lt;p&gt;In the latest CVS &lt;strong&gt;M-&lt;/strong&gt;. became slightly more convenient.&lt;br/&gt;It&amp;#8217;s now able to find definitions of symbols whose names are prefixed with punctuation, for example, some lisps produces warnings&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;em&gt;In FOO: Undeclared free variable X&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;And pressing &lt;strong&gt;M-&lt;/strong&gt;. on &lt;em&gt;FOO&lt;/em&gt; tried to find &amp;#8220;&lt;em&gt;FOO:&lt;/em&gt;&amp;#8221; before, now it sees that there&amp;#8217;s no symbol named &amp;#8220;&lt;em&gt;FOO:&lt;/em&gt;&amp;#8221;, it tries to find &amp;#8220;&lt;em&gt;FOO&lt;/em&gt;&amp;#8221;.&lt;br/&gt;&lt;br/&gt;This is controlled by two new variables, which can be customized in ~/.swank.lisp&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;*find-definitions-right-trim*&lt;/strong&gt;, default value &amp;#8220;,:.&amp;#8221;&lt;br/&gt;&lt;strong&gt;*find-definitions-left-trim*&lt;/strong&gt;, default value &amp;#8220;#:&amp;#8221;.&lt;br/&gt;&lt;br/&gt;All those are arguments to &lt;em&gt;cl:string-x-trim&lt;/em&gt;.&lt;br/&gt;&lt;br/&gt;With the default value for left-trim it&amp;#8217;s now possible to use &lt;strong&gt;M-&lt;/strong&gt;. on&lt;br/&gt;#: symbols in package definitions.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/22263094302</link><guid>http://slime-tips.tumblr.com/post/22263094302</guid><pubDate>Wed, 02 May 2012 21:45:00 +0400</pubDate></item><item><title>How to use ~/.swank.lisp</title><description>&lt;p&gt;For some people it&amp;#8217;s not obvious how to use ~/.swank.lisp to configure swank (the CL part of Slime).&lt;br/&gt;First, it&amp;#8217;s better to have &lt;em&gt;(in-package :swank)&lt;/em&gt; at the beginning.&lt;br/&gt;Then, instead of using &lt;strong&gt;SETF&lt;/strong&gt;, it&amp;#8217;s better to use &lt;strong&gt;DEFVAR&lt;/strong&gt; or &lt;strong&gt;DEFPARAMETER&lt;/strong&gt;, because ~/.swank.lisp is loaded before the contrib modules (in which some variables are defined) and &lt;strong&gt;SETF&lt;/strong&gt; will produce a warning (like in the previous tip) or may not work at all.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/18012685799</link><guid>http://slime-tips.tumblr.com/post/18012685799</guid><pubDate>Tue, 21 Feb 2012 20:03:16 +0400</pubDate></item><item><title>Object slots ordering in the inspector</title><description>&lt;p&gt;When inspecting an object inspector provides two options on how to sort and group the slots. By default it lists all the slots alphabetically. The other option is to list them in the way they are defined. It can also group the slots by the direct class they&amp;#8217;re defined in. Slots can be sorted or unsorted when you grouped by classes as well.&lt;br/&gt;Inspector provides two check-boxes to change the ordering at run-time&lt;/p&gt;
&lt;pre&gt; Group slots by inheritance [X]
 Sort slots alphabetically  [ ]&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;The default values of those can be set in ~/.swank.lisp&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;*inspector-slots-default-order*&lt;/strong&gt; to either &lt;em&gt;:unsorted &lt;/em&gt;or &lt;em&gt;:sorted&lt;/em&gt;. (&lt;em&gt;:sorted&lt;/em&gt; by default)&lt;br/&gt;and&lt;br/&gt;&lt;strong&gt;*inspector-slots-default-grouping*&lt;/strong&gt; to &lt;em&gt;:all&lt;/em&gt; or &lt;em&gt;:inheritance&lt;/em&gt;. (&lt;em&gt;:all&lt;/em&gt; by default)&lt;br/&gt;&lt;br/&gt;I set &lt;strong&gt;*inspector-slots-default-order* &lt;/strong&gt;to &lt;em&gt;:unsorted&lt;/em&gt;, and then it shows all the slots in the order they&amp;#8217;re defined in the source code (implementation or MOP can reorder them, but that usually doesn&amp;#8217;t happen).&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/17813152118</link><guid>http://slime-tips.tumblr.com/post/17813152118</guid><pubDate>Sat, 18 Feb 2012 11:58:41 +0400</pubDate></item><item><title>Reloading Slime without restarting Emacs</title><description>&lt;p&gt;After updating Slime it&amp;#8217;s usually needed to restart Emacs so that the changes take effect, but restarting Emacs is quite inconvenient. After adding the following code into .emacs, &lt;strong&gt;M-x slime-reload&lt;/strong&gt; will reload all the Emacs Lisp parts (CL side should be restarted with ,restart short-cut in the REPL).&lt;/p&gt;
&lt;pre&gt;(defun load-slime ()
  ;; here should be placed all the usual configuration code.
  ;; like loading contribs and setting variables
  (slime-setup '(slime-fancy ...)))

(load-slime)

(defun slime-reload ()
  (interactive)
  (mapc 'load-library
        (reverse (remove-if-not
                  (lambda (feature) (string-prefix-p "slime" feature))
                  (mapcar 'symbol-name features))))
  (setq slime-protocol-version (slime-changelog-date))

  (load-slime))
&lt;/pre&gt;</description><link>http://slime-tips.tumblr.com/post/11571143331</link><guid>http://slime-tips.tumblr.com/post/11571143331</guid><pubDate>Mon, 17 Oct 2011 18:35:00 +0400</pubDate></item><item><title>Failed FASLs</title><description>&lt;p&gt;When doing &lt;strong&gt;C-c C-k&lt;/strong&gt; and COMPILE-FILE returns failure-p, slime asks whether to load the resulting fasl, although the compilation process failed.&lt;br/&gt;The default action can be controlled by &lt;strong&gt;slime-load-failed-fasl&lt;/strong&gt; variable, it accepts the following values:&lt;br/&gt;&lt;strong&gt;never&lt;/strong&gt; don&amp;#8217;t load the fasl&lt;br/&gt;&lt;strong&gt;always&lt;/strong&gt; load the fasl&lt;br/&gt;&lt;strong&gt;ask&lt;/strong&gt; ask the user (default).&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;I have it set to &lt;strong&gt;always&lt;/strong&gt;.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11429724693</link><guid>http://slime-tips.tumblr.com/post/11429724693</guid><pubDate>Fri, 14 Oct 2011 11:33:57 +0400</pubDate></item><item><title>Keeping FASLs away</title><description>&lt;p&gt;&lt;strong&gt;C-c C-k&lt;/strong&gt; by default puts FASLs in the same directory as the .lisp file, which may be not very nice.&lt;/p&gt;
&lt;pre&gt;(setq slime-compile-file-options '(:fasl-directory "/tmp/slime-fasls/"))&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;will place fasls into &amp;#8220;/tmp/slime-fasls/&amp;#8221;.&lt;br/&gt;I also have&lt;/p&gt;
&lt;pre&gt;(make-directory "/tmp/slime-fasls/" t)&lt;/pre&gt;
&lt;p&gt;in my .emacs to make sure the directory exists (/tmp gets cleaned on each reboot).&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11398866534</link><guid>http://slime-tips.tumblr.com/post/11398866534</guid><pubDate>Thu, 13 Oct 2011 21:00:10 +0400</pubDate></item><item><title>Compilation policies</title><description>&lt;p&gt;&lt;strong&gt;C-u C-c C-c&lt;/strong&gt; and &lt;strong&gt;C-u C-c C-k&lt;/strong&gt; will compile code with DEBUG optimization set to 3.&lt;br/&gt;&lt;strong&gt;M–– C-c C-c &lt;/strong&gt;and &lt;strong&gt;M–– C-c C-k&lt;/strong&gt; will compile code with SPEED set to 3.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11349664665</link><guid>http://slime-tips.tumblr.com/post/11349664665</guid><pubDate>Wed, 12 Oct 2011 14:01:58 +0400</pubDate></item><item><title>Monitoring and controlling threads</title><description>&lt;p&gt;M-x &lt;em&gt;slime-list-threads&lt;/em&gt; (you can also access it through slime-selector shortcut &lt;strong&gt;t&lt;/strong&gt;) will list running threads by their names, and their statuses.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;The thread on the current line can be killed with &lt;strong&gt;k&lt;/strong&gt;, or if there&amp;#8217;s a lot of threads to kill, several lines can be selected and &lt;strong&gt;k&lt;/strong&gt; will kill all the threads in the selected region.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;strong&gt;g&lt;/strong&gt; will update the thread list, but when you have a lot of threads starting and stopping it may be too cumbersome to always press &lt;strong&gt;g&lt;/strong&gt;, so there&amp;#8217;s a variable &lt;em&gt;slime-threads-update-interval&lt;/em&gt;, when set to a number X the thread list will be automatically updated each X seconds, a reasonable value would be 0.5.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11313993519</link><guid>http://slime-tips.tumblr.com/post/11313993519</guid><pubDate>Tue, 11 Oct 2011 16:00:15 +0400</pubDate></item><item><title>Inspector navigation</title><description>&lt;p&gt;A couple of inspector commands:&lt;br/&gt;&lt;strong&gt;l&lt;/strong&gt;  go back to the previous inspected object.&lt;br/&gt;&lt;strong&gt;n&lt;/strong&gt;  go forward.&lt;br/&gt;&lt;strong&gt;g&lt;/strong&gt;  reinspect current object (&lt;strong&gt;g&lt;/strong&gt; is generally used for updating things throughout Emacs).&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11279470885</link><guid>http://slime-tips.tumblr.com/post/11279470885</guid><pubDate>Mon, 10 Oct 2011 21:48:33 +0400</pubDate></item><item><title>Disassembling and inspecting things</title><description>&lt;p&gt;While things can be inspected and disassembled by their name with slime-inspect (&lt;strong&gt;C-c I&lt;/strong&gt;) and slime-disassemble-symbol (&lt;strong&gt;C-c M-d&lt;/strong&gt;), it&amp;#8217;s often easier to do that through their definitions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;slime-inspect-definition&lt;/strong&gt; inspects the object defined by the definition at point (e.g. defun or defpackage), works on functions, variables, macros, packages, classes.&lt;br/&gt;&lt;strong&gt;slime-disassemble-definition&lt;/strong&gt; disassemble the object defined by the definition at point, works on functions and macros.&lt;br/&gt;&lt;br/&gt;Neither is bound to anything by default, but I bind them to &lt;strong&gt;C-c M-i&lt;/strong&gt; and &lt;strong&gt;C-c M-d&lt;/strong&gt; respectively.&lt;br/&gt;&lt;br/&gt;One limitation is that they don&amp;#8217;t work properly on DEFMETHOD, instead of finding a particular method they just use a generic function. I plan on fixing that someday.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11219462460</link><guid>http://slime-tips.tumblr.com/post/11219462460</guid><pubDate>Sun, 09 Oct 2011 12:06:05 +0400</pubDate></item><item><title>Cross referencing</title><description>&lt;p&gt;Slime has a nice cross referencing facility, for example, you can see what calls a particular function or expands a macro.&lt;br/&gt;It presents a list of places which reference a particular entity, from there you can recompile the thing which references by pressing &lt;strong&gt;C-c C-c&lt;/strong&gt; on that line. &lt;strong&gt;C-c C-k&lt;/strong&gt; will recompile all the references. This is useful when modifying macros, inline functions, or constants.&lt;br/&gt;&lt;br/&gt;Bindings:&lt;br/&gt;&lt;strong&gt;C-c C-w c&lt;/strong&gt; &lt;em&gt;slime-who-calls&lt;/em&gt; callers of a function&lt;br/&gt;&lt;strong&gt;C-c C-w m&lt;/strong&gt; &lt;em&gt;slime-who-macroexpands&lt;/em&gt; places where a macro is expanded&lt;br/&gt;&lt;strong&gt;C-c C-w r &lt;/strong&gt;&lt;em&gt;slime-who-references&lt;/em&gt; global variable references&lt;br/&gt;&lt;strong&gt;C-c C-w b&lt;/strong&gt; &lt;em&gt;slime-who-bind&lt;/em&gt; global variable bindings&lt;br/&gt;&lt;strong&gt;C-c C-w s&lt;/strong&gt; &lt;em&gt;slime-who-sets&lt;/em&gt; global variable setters&lt;br/&gt;&lt;strong&gt;C-c C-w a&lt;/strong&gt; &lt;em&gt;slime-who-specializes&lt;/em&gt; methods specialized on a symbol&lt;br/&gt;&lt;br/&gt;And when slime-asdf contrib is enabled&lt;br/&gt;&lt;strong&gt;C-c C-w d&lt;/strong&gt; &lt;em&gt;slime-who-depends-on&lt;/em&gt; list dependant ASDF systems&lt;br/&gt;&lt;br/&gt;And a general binding:&lt;br/&gt;&lt;strong&gt;M-?&lt;/strong&gt; or &lt;strong&gt;M-_&lt;/strong&gt; &lt;em&gt;slime-edit-uses&lt;/em&gt; combines all of the above, lists every kind of reference&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11174492567</link><guid>http://slime-tips.tumblr.com/post/11174492567</guid><pubDate>Sat, 08 Oct 2011 12:07:06 +0400</pubDate></item><item><title>Expanding format strings</title><description>&lt;p&gt;M-x &lt;strong&gt;slime-format-string-expand&lt;/strong&gt;: expands the format control string at point.&lt;/p&gt;
&lt;p&gt; &amp;#8221;~a, ~a.&amp;#8221; on SBCL yields&lt;/p&gt;
&lt;pre&gt;#'(LAMBDA
      (STREAM
       &amp;amp;OPTIONAL
       (#:FORMAT-ARG1502
        (ERROR 'SB-FORMAT:FORMAT-ERROR :COMPLAINT "required argument missing"
               :CONTROL-STRING "~a, ~a." :OFFSET 1))
       (#:FORMAT-ARG1503
        (ERROR 'SB-FORMAT:FORMAT-ERROR :COMPLAINT "required argument missing"
               :CONTROL-STRING "~a, ~a." :OFFSET 5))
       &amp;amp;REST SB-FORMAT::ARGS)
    (DECLARE (IGNORABLE STREAM))
    (BLOCK NIL
      (PRINC #:FORMAT-ARG1502 STREAM)
      (WRITE-STRING ", " STREAM)
      (PRINC #:FORMAT-ARG1503 STREAM)
      (WRITE-STRING "." STREAM))
    SB-FORMAT::ARGS)&lt;/pre&gt;</description><link>http://slime-tips.tumblr.com/post/11138987097</link><guid>http://slime-tips.tumblr.com/post/11138987097</guid><pubDate>Fri, 07 Oct 2011 17:16:12 +0400</pubDate></item><item><title>REPL history customization</title><description>&lt;p&gt;There are two useful features which are turned off by default&lt;br/&gt;&lt;strong&gt;slime-repl-history-remove-duplicates&lt;/strong&gt;, when set to T removes duplicate entries.&lt;br/&gt;&lt;strong&gt;slime-repl-history-trim-whitespaces&lt;/strong&gt;, when set to T strips whitespace characters from the beginning and the end.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11100467548</link><guid>http://slime-tips.tumblr.com/post/11100467548</guid><pubDate>Thu, 06 Oct 2011 18:16:58 +0400</pubDate></item><item><title>Clearing REPL</title><description>&lt;p&gt;&lt;strong&gt;C-c M-o&lt;/strong&gt; clears everything, only leaves a new prompt.&lt;br/&gt;&lt;strong&gt;C-c C-o&lt;/strong&gt; clears output of the previous command, for example, after evaluting (make-array 10000) there&amp;#8217;ll be a large array printed, and C-c C-o will only remove that array, leaving all previous command outputs untouched.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: &lt;strong&gt;C-c M-o&lt;/strong&gt; also clears presentations and *, **, ***, etc. variables (the latter feature was added just today), so that the objects bound by them can be GCed.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11057037397</link><guid>http://slime-tips.tumblr.com/post/11057037397</guid><pubDate>Wed, 05 Oct 2011 14:47:00 +0400</pubDate></item><item><title>Documentation look up</title><description>&lt;p&gt;&lt;strong&gt;C-c C-d h&lt;/strong&gt;  looks up documentation in CLHS. But it works only on symbols, so there are two more bindings:&lt;br/&gt;&lt;strong&gt;C-c C-d #&lt;/strong&gt;  for reader macros&lt;br/&gt;&lt;strong&gt;C-c C-d ~&lt;/strong&gt;  for format directives&lt;br/&gt;&lt;br/&gt;Other bindings which may be useful:&lt;br/&gt;&lt;strong&gt;C-c C-d d &lt;/strong&gt; describes a symbol using DESCRIBE&lt;br/&gt;&lt;strong&gt;C-c C-d f&lt;/strong&gt;   describes a function using DESCRIBE&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/11015048115</link><guid>http://slime-tips.tumblr.com/post/11015048115</guid><pubDate>Tue, 04 Oct 2011 11:34:00 +0400</pubDate></item><item><title>slime-selector</title><description>&lt;p&gt;Slime has many buffers, and sometimes it&amp;#8217;s not easy navigating between them, slime-selector simplifies this task.&lt;br/&gt;It&amp;#8217;s not bound to any key by default, I bind it globally to C-z&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;pre&gt;(global-set-key "\C-z" 'slime-selector)&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;Then it allows you to select a buffer by a letter.&lt;br/&gt;Some of the most useful shortcuts are listed here, the full list can be seen by pressing &amp;#8220;?&amp;#8221;.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;r&lt;/strong&gt;   Current active REPL&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;l&lt;/strong&gt;     Most recently visited lisp file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;d&lt;/strong&gt;   Debugger &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;c&lt;/strong&gt;   List of implementations slime is connected to&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;t&lt;/strong&gt;   Threads list&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;i&lt;/strong&gt;   *inferior-lisp* buffer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;s&lt;/strong&gt;     *slime-scratch* buffer (for writing one-off code)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;v&lt;/strong&gt;     Log of slime events (useful for debugging Slime problems)&lt;/li&gt;
&lt;/ul&gt;</description><link>http://slime-tips.tumblr.com/post/10980136698</link><guid>http://slime-tips.tumblr.com/post/10980136698</guid><pubDate>Mon, 03 Oct 2011 18:37:00 +0400</pubDate></item><item><title>Synchronizing packages</title><description>&lt;p&gt;C-c ~ (slime-sync-package-and-default-directory): When run in a buffer with a lisp file it will change the current package of the REPL to the package of that file and also set current directory of the REPL to the parent directory of the file.&lt;br/&gt;&lt;br/&gt;On success it will display&lt;/p&gt;
&lt;pre&gt;package: NEW-PACKAGE-NAME  directory: ~/&lt;/pre&gt;
&lt;p&gt; in the minibuffer, or&lt;/p&gt;
&lt;pre&gt;package: CURRENT-REPL-PACKAGE (package :foo doesn't exist)  directory: ~/&lt;/pre&gt;
&lt;p&gt;when specified in the file package doesn&amp;#8217;t exist yet.&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/10932170770</link><guid>http://slime-tips.tumblr.com/post/10932170770</guid><pubDate>Sun, 02 Oct 2011 17:18:00 +0400</pubDate></item><item><title>Viewing large arglists </title><description>&lt;p&gt;Arglists of some functions are quite long and they may not fit on the screen in one line, there are two ways to display them.&lt;br/&gt;&lt;br/&gt;First&lt;/p&gt;
&lt;pre&gt;(setq slime-autodoc-use-multiline-p t)&lt;/pre&gt;
&lt;p&gt;that&amp;#8217;ll make the minbuffer change its height automatically to accommodate several lines of text.&lt;br/&gt;&lt;br/&gt;But I find it annoying when the minibuffer jumps up and down, especially when I don&amp;#8217;t really want to read the whole arglist.&lt;br/&gt;&lt;br/&gt;For this case there&amp;#8217;s a binding C-c C-d A (not an easy one), it will redisplay the current arglist on several lines. And its effect is temporary.&lt;br/&gt;&lt;br/&gt;You can try it on &lt;em&gt;WRITE&lt;/em&gt; function&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/10887294446</link><guid>http://slime-tips.tumblr.com/post/10887294446</guid><pubDate>Sat, 01 Oct 2011 17:38:00 +0400</pubDate></item><item><title>Calling code</title><description>&lt;p&gt;C-c C-y (slime-call-defun):&lt;br/&gt;When the point is inside a defun and C-c C-y is pressed,&lt;br/&gt;&lt;br/&gt;(I&amp;#8217;ll use [] as an indication where the cursor is)&lt;/p&gt;
&lt;pre&gt;(defun foo ()
 nil[])&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;then &amp;#8220;(foo [])&amp;#8221; will be inserted into the REPL, so that you can write additional arguments and run it.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;If FOO was in a different package than the package of the REPL, (package:foo ) or (package::foo ) will be inserted.&lt;br/&gt;&lt;br/&gt;This feature is very useful for testing a function you just wrote.&lt;br/&gt;&lt;br/&gt;That works not only for &lt;em&gt;defun&lt;/em&gt;, but also for &lt;em&gt;defgeneric&lt;/em&gt;, &lt;em&gt;defmethod&lt;/em&gt;, &lt;em&gt;defmacro&lt;/em&gt;, and &lt;em&gt;define-compiler-macro&lt;/em&gt; in the same fashion as for defun.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;For &lt;em&gt;defvar&lt;/em&gt;, &lt;em&gt;defparameter&lt;/em&gt;, &lt;em&gt;defconstant&lt;/em&gt;: &amp;#8220;[] *foo*&amp;#8221; will be inserted (the cursor is poistioned before the symbol so that you can easily wrap it into a function call).&lt;br/&gt;&lt;br/&gt;For &lt;em&gt;defclass&lt;/em&gt;: (make-instance &amp;#8216;class-name )&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Inserting calls to frames in the debugger&lt;/strong&gt;&lt;br/&gt;C-y in SLDB on a frame will insert a call to that frame into the REPL, e.g.,&lt;br/&gt;(/ 0) =&amp;gt;&lt;br/&gt;&amp;#8230;&lt;br/&gt; 1: (CCL::INTEGER-/-INTEGER 1&amp;#160;0)&lt;br/&gt;&amp;#8230;&lt;br/&gt;C-y will insert (CCL::INTEGER-/-INTEGER 1&amp;#160;0)&lt;/p&gt;</description><link>http://slime-tips.tumblr.com/post/10860009191</link><guid>http://slime-tips.tumblr.com/post/10860009191</guid><pubDate>Sat, 01 Oct 2011 01:21:32 +0400</pubDate></item></channel></rss>
