Commit 37a763ab authored by Robert Strandh's avatar Robert Strandh

Implemented the new buffer-modification protocol with both

update-syntax and update-syntax-for-display.
parent 482b4621
......@@ -181,6 +181,8 @@
(return-from find-bad-parse-tree parse-tree))))
(parse-trees state)))
(defgeneric empty-state-p (state))
(defmethod empty-state-p (state)
(maphash (lambda (key val)
(declare (ignore key))
......
......@@ -84,7 +84,7 @@
(:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain)
(:export #:syntax #:define-syntax
#:basic-syntax
#:update-syntax
#:update-syntax #:update-syntax-for-display
#:syntax-line-indentation
#:beginning-of-paragraph #:end-of-paragraph
#:forward-to-error #:backward-to-error))
......
......@@ -464,6 +464,7 @@
(setf (full-redisplay-p pane) nil))
(adjust-cache pane))
(fill-cache pane)
(update-syntax-for-display (buffer pane) (syntax (buffer pane)) (top pane) (bot pane))
(display-cache pane (if current-p +red+ +blue+)))
(defgeneric full-redisplay (pane))
......
......@@ -27,6 +27,8 @@
(defgeneric update-syntax (buffer syntax))
(defgeneric update-syntax-for-display (buffer syntax from to))
(defgeneric syntax-line-indentation (mark tab-width syntax)
(:documentation "Return the correct indentation for the line containing
the mark, according to the specified syntax."))
......@@ -68,6 +70,10 @@ the mark, according to the specified syntax."))
(declare (ignore buffer))
nil)
(defmethod update-syntax-for-display (buffer (syntax basic-syntax) from to)
(declare (ignore buffer from to))
nil)
(defmethod syntax-line-indentation (mark tab-width (syntax basic-syntax))
(declare (ignore mark tab-width))
0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment