Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv23318/Drei
Modified Files: misc-commands.lisp Log Message: These commands were broken, now they work.
--- /project/mcclim/cvsroot/mcclim/Drei/misc-commands.lisp 2006/11/08 01:15:33 1.1 +++ /project/mcclim/cvsroot/mcclim/Drei/misc-commands.lisp 2006/11/18 20:52:52 1.2 @@ -50,26 +50,20 @@ (define-command (com-count-lines-page :name t :command-table info-table) () "Print the number of lines in the current page. Also prints the number of lines before and after point (as '(b + a)')." - (let* ((pane (current-window)) - (syntax (syntax (buffer pane))) - (point (point pane)) - (start (clone-mark point)) - (end (clone-mark point))) - (backward-page start syntax) - (forward-page end syntax) + (let* ((start (clone-mark *current-point*)) + (end (clone-mark *current-point*))) + (backward-page start *current-syntax* 1 nil) + (forward-page end *current-syntax* 1 nil) (let ((total (number-of-lines-in-region start end)) - (before (number-of-lines-in-region start point)) - (after (number-of-lines-in-region point end))) + (before (number-of-lines-in-region start *current-point*)) + (after (number-of-lines-in-region *current-point* end))) (display-message "Page has ~A lines (~A + ~A)" (1+ total) before after))))
(define-command (com-count-lines-region :name t :command-table info-table) () "Print the number of lines in the region. Also prints the number of objects (as 'o character[s]')." - (let* ((pane (current-window)) - (point (point pane)) - (mark (mark pane)) - (lines (number-of-lines-in-region point mark)) - (chars (abs (- (offset point) (offset mark))))) + (let* ((lines (number-of-lines-in-region *current-point* *current-mark*)) + (chars (abs (- (offset *current-point*) (offset *current-mark*))))) (display-message "Region has ~D line~:P, ~D character~:P." (1+ lines) chars)))
(set-key `(com-eval-expression ,*unsupplied-argument-marker* ,*numeric-argument-p*) @@ -82,4 +76,4 @@
(set-key 'com-count-lines-region 'info-table - '((#= :meta))) \ No newline at end of file + '((#= :meta)))