[Top][All Lists]

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

RE: info faces for strings and quotations

From: Drew Adams
Subject: RE: info faces for strings and quotations
Date: Wed, 6 Oct 2004 14:36:40 -0700

Thanks, Bob. I'm glad someone played with the code and reported on what it does. The incidents you mention where highlighting was not correct are the kinds of thing I found too. I missed the last incident you mentioned. I did run quickly through all the nodes of 33 manuals late last night, and I probably missed a few others, as well. I wasn't hoping to be exhaustive in my report, but to give a good idea of 1) the relative frequency of problems (small) and 2) the kinds of problems encountered.
The problems you mention fall into this class: `...' highlighting does not allow for unescaped enclosed ' marks, as in `foobar 'baz'. Highlighting here will be only around the word (and space) "foobar ". So, in particular, it will fail on single-quoted Lisp sexps with quotes in them, such as `(foobar 'baz)'. I think this is something we can live with.
The Info buffer fails to highlight properly when the Info file is produced from a correct Texinfo source... `(apply 'max numbers-list)'  Using the patch, only `apply' is highlighted.
That's what I reported too. I guess you are confirming this and also reporting that the Info text was correctly generated from Texinfo source. Yes, there is nothing wrong with the Info text -- the highlighting fails on it; that's all.
There are also problems with @samp, which also puts single quotes around its arguments, as in `Symbol's function definition is void: this'. Only `Symbol' is highlighted. 
Yes, for the same reason. I guess you are also saying something about the mapping from Texinfo @samp. Again, there is nothing wrong with the Info text.
The highlighting is not very smart, but it works most of the time. Note too that, in this case, it would in fact be more proper (from a doc point of view), to use double-quotes around the English _expression_ that is being discussed -- and in that case the highlighting works as it should. I'm not saying that using @samp is wrong here; I'm just saying that in technical documentation double-quotes would normally be used here.
FYI, here is the paragraph you cited, with double-quotes instead of single-quotes, as it would appear highlighted:
The error message can be understood: "Symbol's function definition is void: this".  The symbol (that is, the word `this') lacks instructions for the computer to carry out.
Don't get me wrong -- I'm not suggesting that this Info text needs to be changed, or that any text should be changed just to fit the highlighting code!  I'm simply saying: 1) yes, the highlighting code fails on text like this, 2) this particular text would perhaps be better using double-quotes, anyway (for reasons unrelated to highlighting), and 3) if the text used double-quotes there would be no highlighting problem here.
Another common case that I reported on last night was backslashes between single-quotes, where the backslashes were not escaping anything. I've fixed the regexp to treat this, and have sent a new patch to the list (separately).
Thanks for spending time on this and reporting carefully.
 - Drew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]