[climacs-devel] Marks, Buffers and Panes

John Q Splittist splittist at yahoo.com
Wed Aug 17 15:13:59 UTC 2005


I am rewriting some of the commands to be available more generally as
functions, for the building up of further functions and commands. My
idea was that, instead of taking the GNU Emacs approach of having every
function operating on the current buffer, only to wrap it later in
something that dynamically changes what the 'current buffer' is,
functions should be passed a mark, and operate on the relevant buffer
etc from information gained from the mark.

In general this works very well - com-foo calls foo with (point
(current-window)), com-bar (numarg) calls bar with point and count, and
so on. Where it doesn't work is if foo or bar need to know what the
current syntax for a buffer is, because, for example, they call
end-of-definition, which specializes on syntax. The problem is that from
a supplied mark, the function foo can only access the implementation
buffer, not the enclosing delegating buffer, which is where the syntax is.

One answer would be to put a slot on delagatee buffers which points back
at their delegates. While convenient, I fear this breaks some part of
the abstraction. So I ask for comments.

JQS



More information about the climacs-devel mailing list