[Openmcl-cvs-notifications] r11894 - /trunk/source/cocoa-ide/hemlock/src/listener.lisp

rme at clozure.com rme at clozure.com
Sat Apr 4 16:09:08 EDT 2009


Author: rme
Date: Sat Apr  4 16:09:08 2009
New Revision: 11894

Log:
Editor Evaluate Region: if no region is active, and point is not
before an open paren or after a close paren, try to evaluate the
thing that point is before/in/after.

It can choke if point is within or after something like #\c or
#&NSFontAttributeName (although if point is before such a thing, it
works).

Modified:
    trunk/source/cocoa-ide/hemlock/src/listener.lisp

Modified: trunk/source/cocoa-ide/hemlock/src/listener.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/cocoa-ide/hemlock/src/listener.lisp (original)
+++ trunk/source/cocoa-ide/hemlock/src/listener.lisp Sat Apr  4 16:09:08 20=
09
@@ -474,13 +474,18 @@
       (when (valid-spot point nil)      ; not in the middle of a comment
         (cond ((eql (next-character point) #\()
                (with-mark ((m point))
-                 (if (list-offset m 1)
+                 (if (form-offset m 1)
                    (eval-region (region point m)))))
               ((eql (previous-character point) #\))
                (with-mark ((m point))
-                 (if (list-offset m -1)
-                   (eval-region (region m point))))))))))
-           =

+                 (if (form-offset m -1)
+                   (eval-region (region m point)))))
+	      (t
+	       (with-mark ((start point)
+			   (end point))
+		 (when (mark-symbol start end)
+		   (eval-region (region start end))))))))))
+
 (defcommand "Editor Re-evaluate Defvar" (p)
   "Evaluate the current or next top-level form if it is a DEFVAR.  Treat t=
he
    form as if the variable is not bound.  This occurs in the editor Lisp."



More information about the Openmcl-cvs-notifications mailing list