[climacs-devel] keyboard macros, display protocol

Christophe Rhodes csr21 at cam.ac.uk
Thu May 4 13:17:26 UTC 2006


Christophe Rhodes <csr21 at cam.ac.uk> writes:

> The point here is that there should be a complete separation between
> the bookkeeping done at each command, and the bookkeeping done for
> each redisplay, as commands and displays are not one-to-one.

Maybe to put people on the same page, I attach two diffs.  The first
is an implementation of low-display-mark and high-display-mark, and
use in the adjust-cache function used in basic-syntax.  The second is
essentially a complete removal of the cache for basic-syntax:
essentially, empty-cache will be run at each redisplay of a pane.

I favour the second patch, reworked for clarity, as a solution to the
problem, as it does not introduce knowledge into the buffer about what
is going to happen next: indeed, there are uses of climacs buffers
that do not involve a traditional display, such as a web application
we use to present tablature.  This will make basic-syntax a lot more
basic, but the essential functionality of cacheing lines and
incremental redisplay that was in basic-syntax is in fact available in
fundamental-syntax.

This raises another (low-urgency, probably) issue, though: at present,
it's not possible to extend syntaxes other than in interesting ways.
The display methods (e.g. redisplay-pane-with-syntax) will depend on
the invariants of their syntax being preserved, so it's not possible
to specialize e.g. update-syntax on a subclass of a syntax which uses
update-syntax itself to preserve invariants, without duplicating that
method (or explicitly doing call-next-method).  I think that
update-syntax, and probably update-syntax-for-display, should be
generic functions with progn :most-specific-last method combination to
solve this problem.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: climacs-display-cache.diff
URL: <https://mailman.common-lisp.net/pipermail/climacs-devel/attachments/20060504/58db7e6a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: climacs-basic-syntax.diff
URL: <https://mailman.common-lisp.net/pipermail/climacs-devel/attachments/20060504/58db7e6a/attachment-0001.ksh>
-------------- next part --------------

Cheers,

Christophe


More information about the climacs-devel mailing list