Hi Tassilo,

>Can't you just add that to acronym.el?  I've tried the attached version,
>and I don't get an error when it's loaded.  The only changes are that
>the `TeX-auto-add-type' is before adding the entry to
>`LaTeX-auto-regexp-list', and I use `add-to-list' instead of `setq' and
>`append', so that loading the acronym.el multiple times won't create
>multiple entries in `LaTeX-auto-regexp-list'.
Thanks!

>However, even though I get no errors, the completion of existing
>acronyms doesn't work.  When I open your acrotest.tex,
>(TeX-acronym-list) always returns nil...
In my .emacs I have
  (setq TeX-auto-save t)
  (setq TeX-parse-self t)
After having opened, modified and saved `acrotest.tex' I get the attached 
`auto/acrotest.el' file (actually, one also needs to revert and re-save the 
buffer in order to get the `LaTeX-add-acronyms' stuff).  The `LaTeX-add-
acronyms' function is before running `acronym.el' style, so when opening 
`acrotest.tex' the next time Emacs can't find `LaTeX-add-acronyms' function if
  (TeX-auto-add-type "acronym" "LaTeX")
is in `acronym.el' style.  If I understand correctly, `latex.el' is evaluated 
before auto/*.el files, this is why I suggested to move  that line into `latex.
el'.

Actually, moving the whole stuff before `TeX-add-style-hook' into `latex.el' 
fixes all the problems, in this way `TeX-acronym-list' has the correct value
  (("CDMA" "GSM" "NA" "NAD+" "NUA" "TDMA" "UA" "lox" "lh2" "IC" "BUT")
  nil)
just after opening `acrotest.tex'.

I don't know whether `latex.el' would be an appropriate place, `tex-style.el' 
seemed to me a more appropriate one (though it only provides customizable 
variables for styles), but it is required by `latex.el'.  What do you suggest?

>
>Bye,
>Tassilo
>

Bye,
Mosè Giordano
(TeX-add-style-hook "acrotest"
 (lambda ()
    (LaTeX-add-acronyms
     "CDMA"
     "GSM"
     "NA"
     "NAD+"
     "NUA"
     "TDMA"
     "UA"
     "lox"
     "lh2"
     "IC"
     "BUT")
    (LaTeX-add-labels
     "Chem")
    (TeX-run-style-hooks
     "acronym"
     "withpage"
     "printonlyused"
     "hyperref"
     "colorlinks"
     "latex2e"
     "art10"
     "article"
     "")))

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to