Update of /project/clim-desktop/cvsroot/clim-desktop In directory clnet:/tmp/cvs-serv15722
Modified Files: swine.lisp Log Message: Make `definition-at-mark' behave as in SLIME (this probably requires more extensive redesign).
--- /project/clim-desktop/cvsroot/clim-desktop/swine.lisp 2006/04/23 15:34:12 1.3 +++ /project/clim-desktop/cvsroot/clim-desktop/swine.lisp 2006/04/30 12:10:05 1.4 @@ -43,13 +43,15 @@ (list obj)))
(defun definition-at-mark (mark syntax) - "Return the text of the definition at mark." - (let ((m (clone-mark mark))) - (end-of-definition m syntax) - (let ((end (offset m))) - (beginning-of-definition m syntax) - (buffer-substring (buffer mark) (offset m) end)))) - + "Return the text of the definition at mark." + (let* ((definition (form-toplevel (or (form-around syntax (offset mark)) + (form-after syntax (offset mark))) + syntax)) + (definition-pos (start-offset definition))) + (buffer-substring (buffer mark) + definition-pos + (end-offset definition)))) + (defun expression-at-mark (mark syntax) "Return the text of the expression at mark." (let ((m (clone-mark mark)))
clim-desktop-cvs@common-lisp.net