[slime-cvs] CVS update: slime/slime.el

Helmut Eller heller at common-lisp.net
Mon Feb 23 22:14:56 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv11850

Modified Files:
	slime.el 
Log Message:
(slime-find-unbalanced-parenthesis): Delete it.  Emacs 21 has already
check-parens.

Date: Mon Feb 23 17:14:56 2004
Author: heller

Index: slime/slime.el
diff -u slime/slime.el:1.215 slime/slime.el:1.216
--- slime/slime.el:1.215	Mon Feb 23 16:13:21 2004
+++ slime/slime.el	Mon Feb 23 17:14:56 2004
@@ -457,7 +457,6 @@
     ;; "Other"
     ("\I"  slime-inspect :prefixed t :inferior t :sldb t)
     ("\C-]" slime-close-all-sexp :prefixed t :inferior t :sldb t)
-    ([(control c) (control \))] slime-find-unbalanced-parenthesis)
     ("\C-xt" slime-list-threads :prefixed t :inferior t :sldb t)
     ("\C-xc" slime-list-connections :prefixed t :inferior t :sldb t)))
 
@@ -4902,39 +4901,6 @@
       (skip-chars-forward " \t\n)")
       (skip-chars-backward " \t\n")
       (delete-region point (point)))))
-
-(defun slime-find-unbalanced-parenthesis ()
-  "Verify that parentheses in the current buffer are balanced.
-If they are not, position point at the first syntax error found."
-  (interactive)
-  (let ((saved-point (point))
-        (state (parse-partial-sexp (point-min) (point-max) -1)))
-    (destructuring-bind (depth innermost-start last-terminated-start
-                               in-string in-comment after-quote 
-                               minimum-depth comment-style 
-                               comment-or-string-start &rest _) state
-      (cond ((and (zerop depth) 
-                  (not in-string) 
-                  (or (not in-comment) 
-                      (and (eq comment-style nil) 
-                           (eobp)))
-                  (not after-quote))
-             (goto-char saved-point)
-             (message "All parentheses appear to be balanced."))
-            ((plusp depth)
-             (goto-char innermost-start)
-             (error "Missing )"))
-            ((minusp depth)
-             (error "Extra )"))
-            (in-string
-             (goto-char comment-or-string-start)
-             (error "String not terminated"))
-            (in-comment
-             (goto-char comment-or-string-start)
-             (error "Comment not terminated"))
-            (after-quote
-             (error "After quote"))
-            (t (error "Shouldn't happen: parsing state: %S" state))))))
 
 ;;; Test suite
 





More information about the slime-cvs mailing list