[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


first try debugging this with lazy-voice-lock and lazy-lock
turned off.
>>>>> "Tim" == Tim Cross <tcross@pobox.une.edu.au> writes:

    Tim> Hi Raman, I'm still working on the emacspeak-sql
    Tim> replacement which works with Alex Schroder's
    Tim> version of sql.el mode that comes with emacs
    Tim> 21. Its coming together pretty well and I will send
    Tim> you a copy once I'm confident it is working well
    Tim> and I've "voiceified" all the necessary functions
    Tim> etc.

    Tim> There is one problem which remains which I have not
    Tim> been able to resolve yet. As I mentioned on the
    Tim> list a couple of weeks back, there is a problem
    Tim> with font-lock in sql-mode buffers once an
    Tim> sql0interactive-mode buffer has been created which
    Tim> causes all the text from any -- (dash, dash)
    Tim> comments to the end of the buffer to be put into
    Tim> font-lock-comment-face when only the characters to
    Tim> the end of the line should have this attribute
    Tim> set. This only happens if you are running emacspeak
    Tim> and it occurs both under X and under a console. It
    Tim> also happens if there is nothing in
    Tim> emacspeak-sql.el except a (provides 'emacspeak-sql)
    Tim> line, so its not a problem with the code in
    Tim> emacspeak-sql.

    Tim> I have found a "solution" which appears to stop
    Tim> this problem. However, because I still don't really
    Tim> know what the cause is, I'm not confident this
    Tim> solution will always work and don't really know why
    Tim> it does. The solution is to put the following in
    Tim> the sql-mode hook

    Tim> (add-hook 'sql-mode-hook (function (lambda () (setq
    Tim> font-lock-defaults '(sql-mode-font-lock-keywords
    Tim> nil t ((?_ . "w") (?. . "w") (?- . ". 12b") (?\n
    Tim> . "> b")))))))

    Tim> The only difference between the font-lock-defaults
    Tim> I'm setting via the load hook and the ones Alex
    Tim> uses in sql.el is that I have added the syntax
    Tim> modifications to include the double dash comment
    Tim> marker, which Alex does within his code as part of
    Tim> the sql-mode-syntax-table modifications. I've tried
    Tim> to check the attributes of characters both with and
    Tim> without my load hook additions (using functions
    Tim> like describe-char-after and list-properties-at)
    Tim> and have not been able to identify any
    Tim> differences. Even when the whole buffer gets
    Tim> incorrectly fontified as a huge comment, C-j shows
    Tim> up as an end of comment marker.

    Tim> I suspect the problem is somehow related to comint
    Tim> mode and something emacspeak does in this mode as
    Tim> it only occurs after starting the comint based
    Tim> sql-interactive-mode buffer and it oly happens when
    Tim> emacspeak is loaded. although a guess at this
    Tim> stage, but its possible that it has something to do
    Tim> with codeing systems, unwanted interaction with
    Tim> built-in mule support that seems to be in all the
    Tim> emacs builds on many distributions or something
    Tim> which gets changed during one of the comint load
    Tim> hooks (which is what I'm looking at now).

    Tim> I did ask on the list if anyone else is using sql
    Tim> mode and if they have noticed similar problems with
    Tim> font-lock and emacspeak, but did not recieve any
    Tim> responses. I have contact the author of sql-mode
    Tim> and he has had no reports of any problems. I have
    Tim> found the problem occurs under emacs21 built for
    Tim> both debian, redhat and madrake systems and I
    Tim> believe I noticed the same problem when running
    Tim> emacs 20 as well.

    Tim> If you or anyone else on the list has any ideas on
    Tim> things to look at - especially if they are related
    Tim> to interactions between emacspeak and comint
    Tim> derived modes, I would certainly appreciate it.

    Tim> Tim

    Tim> -- Tim Cross E-Mail: tcross@pobox.une.edu.au
    Tim> Analyst/Programmer Phone: 6773 3210 Applications
    Tim> Group Mobile: 0412 969193 University of New England
    Tim> --- find / -iname microsoft -exec rm -rf {} \;

Best Regards,

Email:  raman@cs.cornell.edu
WWW: http://www.cs.cornell.edu/home/raman/             
AIM: TVRaman
PGP:    http://www.cs.cornell.edu/home/raman/raman.asc 

To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help"