[slime-devel] Some more variables for customizing Slime (patch)

Lars Magne Ingebrigtsen larsi at gnus.org
Thu Apr 29 09:37:13 UTC 2004


Hi.  I just started using Slime twenty minutes ago, and here's a
patch to, er, make it look like I want it to.

 
*** ChangeLog.~1.357.~	Thu Apr 29 00:25:05 2004
--- ChangeLog	Thu Apr 29 11:34:06 2004
***************
*** 1,3 ****
--- 1,12 ----
+ 2004-04-29  Lars Magne Ingebrigtsen  <larsi at netfonds.no>
+ 
+ 	* slime.el (slime-event-buffer-name): New variable.
+ 	(slime-events-buffer): Use it.
+ 	(slime-space-information-p): Ditto.
+ 	(slime-space): Use it.
+ 	(slime-reply-update-banner-p): Ditto.
+ 	(slime-repl-update-banner): Use it.
+ 
  2004-04-28   Helmut Eller  <e9626484 at stud3.tuwien.ac.at>
  
  	* swank-loader.lisp (*lisp-name*): Add versioning support for
*** slime.el.~1.282.~	Wed Apr 28 18:45:01 2004
--- slime.el	Thu Apr 29 11:33:59 2004
***************
*** 114,119 ****
--- 114,128 ----
    "Function to use for translating Lisp filenames to Emacs filenames.
  See also `slime-translate-to-lisp-filename-function'.")
  
+ (defvar slime-event-buffer-name "*slime-events*"
+   "The name of the Slime event buffer.")
+ 
+ (defvar slime-space-information-p t
+   "Whether the SPC key should offer information or not.")
+ 
+ (defvar slime-reply-update-banner-p t
+   "Whether Slime should keep a repl banner updated or not.")
+ 
  
  ;;; Customize group
  
***************
*** 1665,1672 ****
        (goto-char (point-max)))))
  
  (defun slime-events-buffer ()
!   (or (get-buffer "*slime-events*")
!       (let ((buffer (get-buffer-create "*slime-events*")))
          (with-current-buffer buffer
            (set (make-local-variable 'outline-regexp) "^(")
            (set (make-local-variable 'comment-start) ";")
--- 1674,1681 ----
        (goto-char (point-max)))))
  
  (defun slime-events-buffer ()
!   (or (get-buffer slime-event-buffer-name)
!       (let ((buffer (get-buffer-create slime-event-buffer-name)))
          (with-current-buffer buffer
            (set (make-local-variable 'outline-regexp) "^(")
            (set (make-local-variable 'comment-start) ";")
***************
*** 1821,1827 ****
                          (expand-file-name default-directory))))
      ;; Emacs21 has the fancy persistent header-line.
      (cond ((boundp 'header-line-format)
!            (setq header-line-format banner)
             (pop-to-buffer (current-buffer))
             (when (fboundp 'animate-string)
               ;; and dancing text
--- 1830,1837 ----
                          (expand-file-name default-directory))))
      ;; Emacs21 has the fancy persistent header-line.
      (cond ((boundp 'header-line-format)
!            (when slime-reply-update-banner-p
!              (setq header-line-format banner))
             (pop-to-buffer (current-buffer))
             (when (fboundp 'animate-string)
               ;; and dancing text
***************
*** 1830,1836 ****
                                 0 0)))
             (slime-repl-insert-prompt ""))
            (t
!            (slime-repl-insert-prompt (concat "; " banner))
             (pop-to-buffer (current-buffer))))))
  
  (defun slime-init-output-buffer (connection)
--- 1840,1849 ----
                                 0 0)))
             (slime-repl-insert-prompt ""))
            (t
!            (slime-repl-insert-prompt 
!             (if slime-reply-update-banner-p
!                 (concat "; " banner)
!               ""))
             (pop-to-buffer (current-buffer))))))
  
  (defun slime-init-output-buffer (connection)
***************
*** 3247,3253 ****
  more than one space."
    (interactive "p")
    (self-insert-command n)
!   (when (and (slime-connected-p)
  	     (or (not (slime-busy-p))
                   ;; XXX should we enable this?
                   ;; (not slime-use-sigint-for-interrupt))
--- 3260,3267 ----
  more than one space."
    (interactive "p")
    (self-insert-command n)
!   (when (and slime-space-information-p
!              (slime-connected-p)
  	     (or (not (slime-busy-p))
                   ;; XXX should we enable this?
                   ;; (not slime-use-sigint-for-interrupt))
***************
*** 5409,5415 ****
  
  (def-slime-selector-method ?v
    "the *slime-events* buffer."
!   "*slime-events*")
  
  (def-slime-selector-method ?l
    "the most recently visited lisp-mode buffer."
--- 5423,5429 ----
  
  (def-slime-selector-method ?v
    "the *slime-events* buffer."
!   slime-event-buffer-name)
  
  (def-slime-selector-method ?l
    "the most recently visited lisp-mode buffer."
***************
*** 6000,6006 ****
    "Kill all the slime related buffers. This is only used by the
    repl command sayoonara."
    (dolist (buf (buffer-list))
!     (when (or (member (buffer-name buf) '("*inferior-lisp*" "*slime-events*"))
                (string-match "\*slime-repl\[\d+\]\*" (buffer-name buf))
                (string-match "\*sldb .*\*" (buffer-name buf)))
        (kill-buffer buf))))
--- 6014,6021 ----
    "Kill all the slime related buffers. This is only used by the
    repl command sayoonara."
    (dolist (buf (buffer-list))
!     (when (or (member (buffer-name buf) '("*inferior-lisp*" 
!                                           slime-event-buffer-name))
                (string-match "\*slime-repl\[\d+\]\*" (buffer-name buf))
                (string-match "\*sldb .*\*" (buffer-name buf)))
        (kill-buffer buf))))

        
-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi at gnus.org * Lars Magne Ingebrigtsen





More information about the slime-devel mailing list