## Older changes in Lightning Completion/Ultra-TeX

#### Changes made 28 April 1998:

ultex.el:

Bug fix in ultex-make-ref-from-label.

ultex.el:

Bug fix.

#### Changes made 7 April 1998:

ultex.el:

Fixed a bug in ultex-grab-bibs, and reorganized some stuff.

#### Changes made 27 March 1998:

ultex.el:

There are about a dozen changes. From the user's point of view, the most important ones are: ultex-grab-defs now works recursively on all input and include files. ultex-grab-commands now recognizes \DeclareMathSymbol. And hitting TAB (which runs ultex-tab-resume) now works better at resuming completion.

As far as the recursive command-grabbing goes, if you have an \input{bozo} command and you don't want the file bozo to be scanned by Ultra-TeX, put a space or TAB at the beginning of the line (before the \input command).

#### Changes made 23 March 1998:

ultex.el:

Fixed bug in ultex-grab-commands, ultex-grab-labels.

#### Changes made 22 September 1997:

ultex-setup.el:

Made the font-lock stuff work with GNU Emacs 20.1 (at least on my machine). Some day soon I may rewrite ultex-setup.el (etc.) so that you can use the custom package to customize everything.

#### Changes made 1 August 1997:

ultex.el:

Fixed a little bug in ultex-grab-bibs. This only affects things when this function is called in a buffer which is not associated to any file. (That's why I said "little bug.")

#### Changes made between 1 March 1997 and 31 July 1997:

I've reorganized the distribution: now there is a main directory called ultratex-0.3 (0.3 is the version number); it has subdirectories lisp, texi, and user, which contain, respectively, the main lisp code, the documentation (in texinfo format), and sample user customization files. Changing to the main directory and typing make all will byte-compile the lisp files and format the documentation into both info files and dvi files.

aucify.el:

In response to changes in a recent version of AUC-TeX, I introduced a new variable, ultex-ignore-auctex-tex.el. If this is non-nil (the default), then the AUC-TeX file tex.el will not be loaded when requested by other files (such as tex-buf.el). If the only part of AUC-TeX that you use is the part that comes with Ultra-TeX (i.e., just the file tex-buf.el), then this change won't affect you. If you use more features of AUC-TeX than that, you should set this variable to be nil (although this may break some things in aucify.el). If I get a chance (or if Mark Hovey does), then we may clean this up a bit.

light.el:

Fixed a few bugs.

ultex.el:

Fixed a few bugs. Also, in ultex, added recognition for providecommand. ultra-tex-mode no longer runs text-mode-hook when it starts, because it shouldn't. It still runs tex-mode-hook, and of course ultra-tex-mode-hook. Furthermore, if you are typing on a line which has been commented out and you use a math-mode specific command (like a Greek key), ultra-tex won't beep at you. Similarly, if you use a math-mode specific command in the argument to \newcommand (etc.), it won't beep at you.

Other:

In response to unpopular demand (i.e., nobody has mentioned it, but I thought it was a good idea), I've started to include the files tex-buf.el and font-latex.el with the distribution. This way, users don't have to go around getting various things by ftp, and they get versions of these files that have been (at least cursorily) tested with Ultra-TeX.

#### Changes made between 15 February 1997 and 28 February 1997:

light.el:

I incorporated the stuff in the file bufcomp.el into light.el, and removed bufcomp.el from the package.

Things regarding the *Completions* buffer were fixed up a bit, so that they seem to work with XEmacs. I also fixed one or two bugs.

ultex18.el:

This is a new file. Various changes in ultex.el make it incompatible with GNU Emacs 18, so ultex18.el patches the problems. If you use GNU Emacs 18, just make sure that both ultex.el and ultex18.el are in your load-path; ultex-setup.el will figure out which version of Emacs you are using, and load the appropriate thing. (GNU Emacs 18 requires both of these files, by the way.) ultex.el:

The Greek keymap stuff was rewritten a bit. This shouldn't have too much of an impact on anyone, I hope.

There is a new variable, ultex-dont-use-completion. If for some odd reason, you want to use Ultra-TeX mode, but you don't want to use lightning completion, then set this variable to t--i.e., put a line like this in your .emacs (or .ultex) file:

(setq ultex-dont-use-completion t)

Then you never enter lightning completion mode; instead, the TAB key tries to complete on TeX commands, using a new function, ultex-try-to-complete. I don't know how well this works yet, so let me know if you find problems.

I've introduced three new variables, ultex-match-braces, ultex-match-brackets, and ultex-match-parens. The default values are t, nil, and nil, respectively. If ultex-match-braces is non-nil, then hitting { inserts {} into the buffer (and similarly for the other two variables). So the default behavior of ultra-tex regarding insertion of braces, brackets, and parentheses hasn't changed, but it's easier to modify that behavior.

#### Changes made between 17 January 1997 and 14 February 1997:

light.el:

Just a few bug fixes and things like that.

ultex.el:

There is a new variable, ultex-rescan-after-new-label. If this is non-nil, then every time you enter a new \label, Emacs rescans your file for labels. This way, if you change a label, Emacs won't complete on the old one.

There is a new function, ultex-dont-use-completion. If for some odd reason, you want to use Ultra-TeX mode, but you don't want to use lightning completion, then add this function to your ultra-tex-mode-hook--i.e., put a line like this in your .emacs (or .ultex) file:

(add-hook 'ultra-tex-mode-hook 'ultex-dont-use-completion)

Then you never enter lightning completion mode; instead, the TAB key tries to complete on TeX commands. I don't know how well this works yet, so let me know if you find problems.

#### Changes made between 10 December 1996 and 16 January 1997:

ultex.el:

I have enhanced the behavior of the dollar sign. For quite a while now, if you had $$with the cursor between the dollar signs, then hitting  would produce$$\n\n$$, and so on. This now works even if the math environment is not empty, so that if you have x=y with the point somewhere between the dollar signs, hitting  produces $$
x=y

Fonts are handled a little differently, to take into account the difference between Latex 2.09 with the old font selection scheme and Latex 2e (and probably Latex 2.09) with the new font selection scheme. It used to be that meta-shift-e (a.k.a. M-E) would insert {\em }, with the point just inside the right brace. Now it inserts \emph{}, with the point inside the braces. Similarly, M-B used to insert {\bf }; now it inserts \mathbf{} or \textbf{}, depending on whether you're in math mode or not.

Ultra-tex is better at scanning your file for things on which to complete, when it first opens the file. Some new LaTeX commands (like \DeclareMathOperator) have been taken into account; ultra-tex also completes citation keys. For example, if you have a bibliography in your tex file with commands

    \bibitem{bozo} blah blah blah
\bibitem{clown} blah blah blah

then \cite[]{bozo} and \cite[]{clown} will be added to the completion list (where the point goes inside the square brackets). The same holds if you are editing junk.tex and there is a file junk.bbl with \bibitem commands in it. (Caveat: these \bibitem commands need to appear between \begin{thebibliography} and \end{thebibliography} or else they will be ignored--this is true for both the tex file and the bbl file.) If your file junk.tex has a \bibliography command, such as
    \bibliography{bib-file}

then (assuming you have the environment variable BIBINPUTS set), ultra-tex should be able to find the file bib-file.bib, scan it for things like
    @article{bozo-clown,
author = "Bozo the Clown", etc.}

and then add \cite[]{bozo-clown} to its completion list.

Naturally, the "smart return key" knows about this sort of thing. If you have \cite[]{bozo}, and the cursor is in the empty square brackets, hitting RET deletes the brackets and moves you all the way past {bozo}. If you have \cite[Theorem A]{bozo}, hitting RET from anywhere inside the square brackets should move you all the way past {bozo}, without deleting the square brackets or their contents.