[climacs-cvs] CVS climacs
thenriksen
thenriksen at common-lisp.net
Sun Apr 23 19:37:58 UTC 2006
Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv22484
Modified Files:
pane.lisp packages.lisp file-commands.lisp
Log Message:
Added code to clear the cache of panes (the previous `clear-pane'
invocation was apparently too naive).
--- /project/climacs/cvsroot/climacs/pane.lisp 2006/03/27 19:24:07 1.36
+++ /project/climacs/cvsroot/climacs/pane.lisp 2006/04/23 19:37:58 1.37
@@ -286,6 +286,14 @@
(:default-initargs
:default-view +climacs-textual-view+))
+(defgeneric clear-cache (pane)
+ (:documentation "Clear the cache for `pane.'"))
+
+(defmethod clear-cache ((pane climacs-pane))
+ (with-slots (cache) pane
+ (setf cache (let ((cache (make-instance 'standard-flexichain)))
+ (insert* cache 0 nil)
+ cache))))
(defmethod tab-width ((pane climacs-pane))
(tab-width (stream-default-view pane)))
--- /project/climacs/cvsroot/climacs/packages.lisp 2006/04/23 12:11:26 1.88
+++ /project/climacs/cvsroot/climacs/packages.lisp 2006/04/23 19:37:58 1.89
@@ -147,6 +147,7 @@
(:export #:climacs-buffer #:needs-saving #:filepath
#:read-only-p #:buffer-read-only
#:climacs-pane #:point #:mark
+ #:clear-cache
#:redisplay-pane #:full-redisplay
#:display-cursor
#:display-mark
--- /project/climacs/cvsroot/climacs/file-commands.lisp 2006/04/23 18:38:03 1.8
+++ /project/climacs/cvsroot/climacs/file-commands.lisp 2006/04/23 19:37:58 1.9
@@ -212,10 +212,10 @@
(switch-to-buffer existing-buffer)
(let ((buffer (make-buffer))
(pane (current-window)))
- ;; Clear the pane, otherwise residue from the
+ ;; Clear the panes cache; otherwise residue from the
;; previously displayed buffer may under certain
;; circumstances be displayed.
- (window-clear pane)
+ (clear-cache pane)
(setf (syntax buffer) nil)
(setf (offset (point (buffer pane))) (offset (point pane)))
(setf (buffer (current-window)) buffer)
More information about the Climacs-cvs
mailing list