]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex/style/ngerman.el
Remove version numbers in packages/ directory
[gnu-emacs-elpa] / packages / auctex / style / ngerman.el
1 ;;; ngerman.el --- Setup AUCTeX for editing German text.
2
3 ;;; Commentary:
4 ;;
5 ;; Cater for some specialities of `(n)german.sty', e.g. special quote
6 ;; and hyphen strings or that `"' makes the following letter an
7 ;; umlaut.
8
9 ;;; Code:
10
11 (defvar LaTeX-german-mode-syntax-table
12 (copy-syntax-table LaTeX-mode-syntax-table)
13 "Syntax table used in LaTeX mode when using `german.sty'.")
14
15 (modify-syntax-entry ?\" "w" LaTeX-german-mode-syntax-table)
16
17 (TeX-add-style-hook
18 "ngerman"
19 (lambda ()
20 (set-syntax-table LaTeX-german-mode-syntax-table)
21 ;; XXX: Handle former customizations of the now defunct
22 ;; German-specific variables. References to the respective
23 ;; variables are to be deleted in future versions. (now = 2005-04-01)
24 (unless (eq (car TeX-quote-language) 'override)
25 (let ((open-quote (if (and (boundp 'LaTeX-german-open-quote)
26 LaTeX-german-open-quote)
27 LaTeX-german-open-quote
28 "\"`"))
29 (close-quote (if (and (boundp 'LaTeX-german-close-quote)
30 LaTeX-german-close-quote)
31 LaTeX-german-close-quote
32 "\"'"))
33 (q-after-q (if (and (boundp 'LaTeX-german-quote-after-quote)
34 LaTeX-german-quote-after-quote)
35 LaTeX-german-quote-after-quote
36 t)))
37 (setq TeX-quote-language
38 `("ngerman" ,open-quote ,close-quote ,q-after-q))))
39 (setq LaTeX-babel-hyphen-language "ngerman")
40 ;; Fontification of quotation marks.
41 (when (fboundp 'font-latex-add-quotes)
42 (font-latex-add-quotes '("\"`" "\"'"))
43 (font-latex-add-quotes '("\">" "\"<" german)))
44 (run-hooks 'TeX-language-de-hook)))
45
46 ;;; ngerman.el ends here