summaryrefslogtreecommitdiff
path: root/elpa/auctex-13.1.3/style/ngerman.el
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-05-17 07:07:37 -0400
committermattkae <mattkae@protonmail.com>2022-05-17 07:07:37 -0400
commitbecff06c71d277647eda4378203d03ab36e141eb (patch)
treea1f73bba3676f34e0faf76764f5de963321f5576 /elpa/auctex-13.1.3/style/ngerman.el
parent3f4a0d5370ae6c34afe180df96add3b8522f4af1 (diff)
Evil mode and latex support
Diffstat (limited to 'elpa/auctex-13.1.3/style/ngerman.el')
-rw-r--r--elpa/auctex-13.1.3/style/ngerman.el46
1 files changed, 46 insertions, 0 deletions
diff --git a/elpa/auctex-13.1.3/style/ngerman.el b/elpa/auctex-13.1.3/style/ngerman.el
new file mode 100644
index 0000000..6081615
--- /dev/null
+++ b/elpa/auctex-13.1.3/style/ngerman.el
@@ -0,0 +1,46 @@
+;;; ngerman.el --- Setup AUCTeX for editing German text. -*- lexical-binding: t; -*-
+
+;;; Commentary:
+;;
+;; Cater for some specialities of `(n)german.sty', e.g. special quote
+;; and hyphen strings or that `"' makes the following letter an
+;; umlaut.
+
+;;; Code:
+
+(require 'tex)
+(require 'latex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-quotes
+ "font-latex"
+ (quotes))
+
+(declare-function font-latex-add-to-syntax-alist
+ "font-latex"
+ (list))
+
+(defvar LaTeX-german-mode-syntax-table
+ (copy-syntax-table LaTeX-mode-syntax-table)
+ "Syntax table used in LaTeX mode when using `german.sty'.")
+
+(modify-syntax-entry ?\" "w" LaTeX-german-mode-syntax-table)
+
+(TeX-add-style-hook
+ "ngerman"
+ (lambda ()
+ (set-syntax-table LaTeX-german-mode-syntax-table)
+ (unless (eq (car TeX-quote-language) 'override)
+ (setq TeX-quote-language '("ngerman" "\"`" "\"'" t)))
+ (setq LaTeX-babel-hyphen-language "ngerman")
+ ;; Fontification
+ (when (and (eq TeX-install-font-lock 'font-latex-setup)
+ (featurep 'font-latex))
+ (font-latex-add-quotes '("\"`" "\"'"))
+ (font-latex-add-quotes '("\">" "\"<" german))
+ ;; Prevent "| from leading to color bleed.
+ (font-latex-add-to-syntax-alist (list (cons ?\" "\\"))))
+ (run-hooks 'TeX-language-de-hook))
+ TeX-dialect)
+
+;;; ngerman.el ends here