• Scheme
  • 27 lines
  • Pasted by anonymous on January 19, 2012
(defun llasram/fit-window-to-buffer (&optional window)
  (let ((window (or window (get-buffer-window))))
    (fit-window-to-buffer window
       (funcall temp-buffer-max-height (window-buffer window)))))

(defadvice slime-display-popup-buffer
  (after llasram/slime-fit-popup activate)
  "Fit SLIME most popup windows to necessary size."

(defadvice slime-initialize-macroexpansion-buffer
  (around llasram/slime-macroexpansion-other-window activate)
  "Prevent SLIME from switching windows for macroexpansion."

(defadvice slime-maybe-show-compilation-log
  (after llasram/slime-fit-popup-compilation activate)
  "Fit SLIME compilation windows to necessary size."
  (let ((window (get-buffer-window "*SLIME Compilation*")))
    (when window
      (with-struct (slime-compilation-result. successp)
        (if successp
            (delete-window window)
          (llasram/fit-window-to-buffer window))))))

Did you know? CLOSE

  • There are keyboard shortcuts!
    • When Creating A Paste
      • ALT+P Toggle Private
      • CTRL+Enter Create Paste
      • ALT+W Toggle word wrap
    • When Viewing A Paste
      • ALT+G Go to a line
      • ALT+CTRL+E Edit the paste
      • ALT+R Show the raw code
  • There are URL options!
    • When Creating A Paste
      • ?lang=Javascript to default to javascript
    • When Viewing A Paste
      • #L-N Jump to line number N