[climacs-devel] Re: Point - buffer or pane? (plus syntax resetting)
John Q Splittist
splittist at yahoo.com
Thu May 5 20:17:25 UTC 2005
Christophe Rhodes wrote:
> Aleksandar Bakic <a_bakic at yahoo.com> writes:
>>Sounds fine to me, but I need to check the archive first. I think
>>there were some discussions on where point and friends should
>>belong.
I remember something of the same, but I don't think it was on this list
-- perhaps one of the earlier cl-emacs efforts?
>> As for the syntax reset, I am not familiar enough with
>>syntax-related code to approve this change at the moment.
>
> From what I understand, I think that the change is right: buffers
> should keep their syntax even if they are buried and re-exposed. A
> simple test case: visit foo.html in HTML Syntax, then C-x b to
> *scratch*, then C-x b back to foo.html. I would expect the HTML
> syntax to be preserved, but at present it isn't.
I think it's safe to remove the syntax reset (ie. the setf on the
buffer's syntax slot) in com-switch-to-buffer (and com-find-file, FWIW)
-- even if you're switching to a new buffer (should a fresh buffer
really be created?) (or finding a new file) a buffer is initialised with
a fresh basic-syntax by an :after method on initialize-instance in
pane.lisp.
Which is a convoluted way of saying: since it's already impossible to
have a buffer without a syntax, the only command which should touch the
syntax is Set Syntax (at the moment); Switch To Buffer and Find File
should leave it alone.
JQS
More information about the climacs-devel
mailing list