[slime-cvs] CVS update: slime/slime.el
Helmut Eller
heller at common-lisp.net
Tue Mar 23 21:06:26 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv9785
Modified Files:
slime.el
Log Message:
(slime-easy-menu): Add some commands.
(slime-changelog-date): New variable. Initialized with the value
returned by the function of the same name. This detects incompatible
versions if Emacs has not been restarted after an upgrade.
(slime-check-protocol-version, slime-init-output-buffer): Use it.
(slime-events-buffer, slime-log-event): Use fundamental mode instead
of lisp-mode to avoid excessive font-locking for messages with lots of
strings.
Date: Tue Mar 23 16:06:26 2004
Author: heller
Index: slime/slime.el
diff -u slime/slime.el:1.239 slime/slime.el:1.240
--- slime/slime.el:1.239 Mon Mar 22 08:57:27 2004
+++ slime/slime.el Tue Mar 23 16:06:25 2004
@@ -534,10 +534,13 @@
[ "Compile Defun" slime-compile-defun ,C ]
[ "Compile/Load File" slime-compile-and-load-file ,C ]
[ "Compile File" slime-compile-file ,C ]
+ [ "Compile Region" slime-compile-region ,C ]
+ [ "Compile System" slime-load-system ,C ]
"--"
[ "Next Note" slime-next-note t ]
[ "Previous Note" slime-previous-note t ]
- [ "Remove Notes" slime-remove-notes t ])
+ [ "Remove Notes" slime-remove-notes t ]
+ [ "List Notes" slime-list-compiler-notes ,C ])
("Cross Reference"
[ "Who Calls..." slime-who-calls ,C ]
[ "Who References... " slime-who-references ,C ]
@@ -548,6 +551,10 @@
[ "List Callers..." slime-list-callers ,C ]
[ "List Callees..." slime-list-callees ,C ]
[ "Next Location" slime-next-location t ])
+ ("Editing"
+ [ "Close All Parens" slime-close-all-sexp t]
+ [ "Check Parens" check-parens t]
+ [ "Select Buffer" slime-selector t])
("Profiling"
[ "Toggle Profiling..." slime-toggle-profile-fdefinition ,C ]
[ "Profile Package" slime-profile-package ,C]
@@ -568,7 +575,7 @@
[ "Set Package in REPL" slime-repl-set-package ,C]
)))
-(easy-menu-define menubar-slime slime-mode-map "SLIME" slime-easy-menu)
+(easy-menu-define menubar-slime slime-mode-map "SLIME" slime-easy-menu)
(defun slime-add-easy-menu ()
(easy-menu-add slime-easy-menu 'slime-mode-map))
@@ -865,7 +872,7 @@
(defmacro slime-with-output-to-temp-buffer (name &rest body)
"Similar to `with-output-to-temp-buffer'.
-Also saves the window configuration, and inherts the current
+Also saves the window configuration, and inherits the current
`slime-connection' in a buffer-local variable."
(let ((config (gensym)))
`(let ((,config (current-window-configuration))
@@ -917,19 +924,19 @@
(ignore-errors
(save-restriction
(narrow-to-region (save-excursion (beginning-of-defun) (point))
- (line-end-position))
+ (point))
(save-excursion
(while t
(backward-up-list 1)
(when (looking-at "(")
(forward-char 1)
- (let ((name (slime-symbol-name-at-point)))
- (when name
- (push name result)))
+ (when-let (name (slime-symbol-name-at-point))
+ (push name result))
(backward-up-list 1))))))
(nreverse result)))
(defun slime-read-package-name (prompt &optional initial-value)
+ "Read a package name from the minibuffer, prompting with PROMPT."
(let ((completion-ignore-case t))
(completing-read prompt (mapcar (lambda (x) (cons x x))
(slime-eval
@@ -1080,7 +1087,8 @@
of the newest at compile time. If the function is interpreted read
the ChangeLog file at runtime."
(macrolet ((date ()
- (let* ((dir (or (and byte-compile-current-file
+ (let* ((dir (or (and (boundp 'byte-compile-current-file)
+ byte-compile-current-file
(file-name-directory
(file-truename
byte-compile-current-file)))
@@ -1093,12 +1101,14 @@
`(quote ,date))))
(date)))
+(defvar slime-changelog-date (slime-changelog-date))
+
(defun slime-check-protocol-version (lisp-version)
"Signal an error LISP-VERSION equal to `slime-changelog-date'"
- (unless (and lisp-version (equal lisp-version (slime-changelog-date)))
+ (unless (and lisp-version (equal lisp-version slime-changelog-date))
(slime-disconnect)
(let ((message (format "Protocol mismatch: Lisp: %s ELisp: %s"
- lisp-version (slime-changelog-date))))
+ lisp-version slime-changelog-date)))
(message "%s" message)
(ding)
(sleep-for 2)
@@ -1543,7 +1553,7 @@
;; trim?
(when (> (buffer-size) 100000)
(goto-char (/ (buffer-size) 2))
- (beginning-of-defun)
+ (re-search-forward "^(" nil t)
(delete-region (point-min) (point)))
(goto-char (point-max))
(save-excursion
@@ -1555,10 +1565,10 @@
(or (get-buffer "*slime-events*")
(let ((buffer (get-buffer-create "*slime-events*")))
(with-current-buffer buffer
- (lisp-mode)
(set (make-local-variable 'hs-block-start-regexp) "^(")
+ (set (make-local-variable 'comment-start) ";")
+ (set (make-local-variable 'comment-end) "")
(hs-minor-mode)
- (setq font-lock-defaults nil)
(current-buffer)))))
@@ -1723,7 +1733,7 @@
(when (fboundp 'animate-string)
;; and dancing text
(when (zerop (buffer-size))
- (animate-string (format "; SLIME %s" (slime-changelog-date))
+ (animate-string (format "; SLIME %s" slime-changelog-date)
0 0)))
(slime-repl-insert-prompt ""))
(t
More information about the slime-cvs
mailing list