[climacs-cvs] CVS update: climacs/gui.lisp climacs/packages.lisp climacs/syntax.lisp
Robert Strandh
rstrandh at common-lisp.net
Sat Jan 1 10:06:24 UTC 2005
Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv19337
Modified Files:
gui.lisp packages.lisp syntax.lisp
Log Message:
Implemented page-down (C-v).
Date: Sat Jan 1 11:06:22 2005
Author: rstrandh
Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.38 climacs/gui.lisp:1.39
--- climacs/gui.lisp:1.38 Sat Jan 1 10:34:25 2005
+++ climacs/gui.lisp Sat Jan 1 11:06:21 2005
@@ -390,6 +390,10 @@
(define-named-command com-beginning-of-buffer ()
(beginning-of-buffer (point (win *application-frame*))))
+(define-named-command com-page-down ()
+ (let ((pane (win *application-frame*)))
+ (page-down pane (syntax pane))))
+
(define-named-command com-end-of-buffer ()
(end-of-buffer (point (win *application-frame*))))
@@ -503,6 +507,7 @@
(global-set-key '(#\x :meta) 'com-extended-command)
(global-set-key '(#\y :meta) 'com-kr-rotate) ;currently rotates only
(global-set-key '(#\w :meta) 'com-copy-out)
+(global-set-key '(#\v :control) 'com-page-down)
(global-set-key '(#\< :shift :meta) 'com-beginning-of-buffer)
(global-set-key '(#\> :shift :meta) 'com-end-of-buffer)
(global-set-key '(#\u :meta) 'com-browse-url)
Index: climacs/packages.lisp
diff -u climacs/packages.lisp:1.17 climacs/packages.lisp:1.18
--- climacs/packages.lisp:1.17 Sat Jan 1 10:34:25 2005
+++ climacs/packages.lisp Sat Jan 1 11:06:21 2005
@@ -60,6 +60,7 @@
(:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain)
(:export #:syntax #:basic-syntax #:texinfo-syntax
#:redisplay-pane #:redisplay-with-syntax #:full-redisplay
+ #:page-down
#:url))
(defpackage :climacs-kill-ring
Index: climacs/syntax.lisp
diff -u climacs/syntax.lisp:1.14 climacs/syntax.lisp:1.15
--- climacs/syntax.lisp:1.14 Sat Jan 1 10:34:25 2005
+++ climacs/syntax.lisp Sat Jan 1 11:06:21 2005
@@ -199,6 +199,7 @@
(declare (ignore x y w))
(let ((nb-lines-in-pane (max 1 (floor h (+ height (stream-vertical-spacing pane)))))
(nb-lines-on-display (1+ (number-of-lines-in-region top bot))))
+ (format *query-io* "~a ~a~%" (offset top) (offset bot))
;; adjust the region on display to fit the pane
(loop repeat (- nb-lines-on-display nb-lines-in-pane)
do (beginning-of-line bot)
@@ -226,6 +227,14 @@
do (incf (offset bot))
(end-of-line bot))))))))
+(defun page-down (pane syntax)
+ (position-window pane syntax)
+ (with-slots (top bot cache) syntax
+ (when (mark> (size (buffer bot)) bot)
+ (setf (offset top) (offset bot))
+ (beginning-of-line top)
+ (setf (offset (point pane)) (offset top))
+ (setf cache nil))))
;;; this one should not be necessary.
(defun round-up (x)
More information about the Climacs-cvs
mailing list