auctex
[Top][All Lists]
Advanced

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

[AUCTeX] font-latex-built-in-keyword-classes - minor errors and omission


From: Rasmus Villemoes
Subject: [AUCTeX] font-latex-built-in-keyword-classes - minor errors and omissions
Date: Wed, 06 Apr 2011 23:53:47 -0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Hi,

I believe there are a few minor errors in
font-latex-built-in-keyword-classes (font-latex.el). I use version
11.85, but I've just checked 11.86, and it seems to contain the same
definitions.

Errors:

("documentclass" "[{")
("usepackage" "[{")

These both take an optional trailing argument.

("renewenvironment" "*{[{{")

Should be the same as newenvironment, i.e., two optional arguments.

("sbox" "{")

\sbox "officially" takes two arguments, but it may be on purpose that
only the first is fontified as such.

("newcounter" "{[") is in the "function" section, but probably belongs
logically to the "variable" section (where setcounter and addtocounter
already live).

"include" is listed under "warning" and under "reference" (in the
latter as taking "{"); while "input" and "includeonly" are
"function"s, both taking a mandatory argument. Is there a reason
\include is fontified as a warning (while also being treated as a
"reference" command), and not simply treated the same as \input and
\includeonly?


Omissions:

Is there a good reason why \providecommand is not included by default?
Actually, there are a number of macros which I believe belong to the
built-in list:

"warning"

"makeatletter" "makeatother"
(when a user needs these in order to apply some patch or tweak, I
think it makes sense fontify these as warnings)

"variable"

("stepcounter" "{")
("refstepcounter" "{")
("arabic" "{") [also roman, Roman, alph, Alph, fnsymbol]
("settoheight" "{{") ("settodepth" "{{") [settowidth is included]

"function"

("parbox" "[[[{{")
("rule" "[{{")
("raisebox" "{[[{")
("providecommand" "*|{\\[[{")

When editing (or just viewing) .cls and .sty files, it would also be
nice if these (and perhaps some of the often-used @-macros) were recognized. 

("LoadClass" "[{[")
("RequirePackage" "[{[")
("ProvidesClass" "{[")
("ProvidesPackage" "{[")
("ProvidesFile" "{[")
("PassOptionsToPackage" "{{")
("PassOptionsToClass" "{{")
("LoadClassWithOptions" "{[")
("RequirePackageWithOptions" "{[")

I don't know if a very large list of keywords slows down fontification
too much. If that is the case, I'd like to ask: Is there a hook I can
use to add these keywords automatically when viewing .sty and .cls
files, but not .tex (or .ltx)? 

-- 
Rasmus Villemoes
<http://rasmusvillemoes.dk/>




reply via email to

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