[climacs-devel] Line and column number display

John Q Splittist splittist at yahoo.com
Tue May 3 18:47:25 UTC 2005


More useless aesthetic fiddling (cf. my Isearch feedback code, in the 
moderator queue because I brilliantly managed to send it before my 
subscription verification): adding line and column numbers to the status 
display.

I've added 1 to the buffer-line-number return value, because a 
line-number of 0 seems wrong (and contrary to Emacs), but perhaps I've 
missed a trick here.

JQS

--- gui.lisp.~1.128.~	Sat Mar 19 22:08:31 2005
+++ gui.lisp	Tue May  3 19:43:44 2005
@@ -125,9 +125,13 @@
    (declare (ignore frame))
    (with-slots (climacs-pane) pane
       (let* ((buf (buffer climacs-pane))
-	    (name-info (format nil "   ~a   ~a   Syntax: ~a~a~a~a    ~a"
+	    (point-offset (offset (point climacs-pane)))
+	    (tab-width (tab-space-count (stream-default-view climacs-pane)))
+	    (name-info (format nil "   ~a   ~a ~10<(~a,~a)~>  Syntax: ~a~a~a~a 
    ~a"
  			       (if (needs-saving buf) "**" "--")
  			       (name buf)
+			       (1+ (buffer-line-number buf point-offset))
+			       (buffer-display-column buf point-offset tab-width)
  			       (name (syntax buf))
  			       (if (slot-value climacs-pane 'overwrite-mode)
  				   " Ovwrt"



More information about the climacs-devel mailing list