[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 7ff3323 03/34: Add support for (B
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 7ff3323 03/34: Add support for (Brazilian) Portuguese |
Date: |
Sun, 6 Jun 2021 11:40:00 -0400 (EDT) |
branch: externals/auctex
commit 7ff332397dad4bfe2afe62cec5a4577d92301182
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Add support for (Brazilian) Portuguese
* tex.el (TeX-quote-language-alist): Add entry for "portuguese".
* doc/auctex.texi (European): Document the features of new
language styles.
* Makefile.in (STYLESRC): Add entries for new styles.
* style/brazil.el:
* style/brazilian.el:
* style/portuges.el:
* style/portuguese.el: New files.
---
Makefile.in | 4 ++-
doc/auctex.texi | 35 ++++++++++++++++++------
style/brazil.el | 37 +++++++++++++++++++++++++
style/brazilian.el | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
style/portuges.el | 37 +++++++++++++++++++++++++
style/portuguese.el | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tex.el | 1 +
7 files changed, 260 insertions(+), 9 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 1eda319..3264b9e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -174,7 +174,9 @@ STYLESRC = style/prosper.el \
style/ltxguide.el style/revtex4-2.el style/overpic.el \
style/tex-live.el style/algorithm.el style/algpseudocode.el \
style/appendix.el style/scholax.el style/extramarks.el \
- style/truncate.el style/changes.el style/footnotehyper.el
+ style/truncate.el style/changes.el style/footnotehyper.el \
+ style/brazil.el style/brazilian.el style/portuguese.el \
+ style/portuges.el
STYLEELC = $(STYLESRC:.el=.elc)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index fbd64cb..5dea56f 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4482,8 +4482,11 @@ The following style files are recognized:
@vindex TeX-language-it-hook
@vindex TeX-language-is-hook
@vindex TeX-language-pl-hook
+@vindex TeX-language-pt-br-hook
+@vindex TeX-language-pt-hook
@vindex TeX-language-sk-hook
@vindex TeX-language-sv-hook
+@cindex Brazilian Portuguese
@cindex Bulgarian
@cindex Czech
@cindex Italian
@@ -4492,14 +4495,22 @@ The following style files are recognized:
@cindex English
@cindex German
@cindex Polish
+@cindex Portuguese
@cindex Slovak
@cindex Swedish
@table @file
+@item brazilian
+@itemx brazil
+Runs style hook @code{TeX-language-pt-br-hook}. Gives @samp{"} word
+syntax, makes the @key{"} key inserts @samp{``} or @samp{''} depending on
+context. Typing @key{"} twice will insert a literal @samp{"}. Typing
+@key{-} twice will insert @samp{"=}, three times @samp{--}.
+
@item bulgarian
-Runs style hook @code{TeX-language-bg-hook}. Gives @samp{"} word
-syntax, makes the @key{"} key insert a literal @samp{"}. Typing @key{"}
-twice will insert insert @samp{"`} or @samp{"'} depending on context.
-Typing @key{-} twice will insert @samp{"=}, three times @samp{--}.
+Runs style hook @code{TeX-language-bg-hook}. Gives @samp{"} word syntax,
+makes the @key{"} key insert a literal @samp{"}. Typing @key{"} twice
+will insert @samp{"`} or @samp{"'} depending on context. Typing @key{-}
+twice will insert @samp{"=}, three times @samp{--}.
@item czech
Runs style hook @code{TeX-language-cz-hook}. Pressing @key{"} will
@@ -4540,10 +4551,10 @@ key twice will give you opening or closing German
quotes (@samp{"`} or
@samp{--}.
@item icelandic
-Runs style hook @code{TeX-language-is-hook}. Gives @samp{"} word
-syntax, makes the @key{"} key insert a literal @samp{"}. Typing @key{"}
-twice will insert insert @samp{"`} or @samp{"'} depending on context.
-Typing @key{-} twice will insert @samp{"=}, three times @samp{--}.
+Runs style hook @code{TeX-language-is-hook}. Gives @samp{"} word syntax,
+makes the @key{"} key insert a literal @samp{"}. Typing @key{"} twice
+will insert @samp{"`} or @samp{"'} depending on context. Typing @key{-}
+twice will insert @samp{"=}, three times @samp{--}.
@item italian
Runs style hook @code{TeX-language-it-hook}. Pressing @key{"} will
@@ -4559,6 +4570,14 @@ Runs style hook @code{TeX-language-pl-hook}. Makes the
@key{"} key
insert a literal @samp{"}. Pressing @key{"} twice will insert @samp{,,}
or @samp{''} depending on context.
+@item portuguese
+@itemx portuges
+Runs style hook @code{TeX-language-pt-hook}. Gives @samp{"} word syntax,
+makes the @key{"} key inserts @samp{"<} or @samp{">} depending on context.
+Typing @key{"} twice will insert a literal @samp{"}. Typing @key{-} twice
+will insert @samp{"=}, three times @samp{--}. Note that the language name
+for customizing @code{TeX-quote-language-alist} is @samp{portuguese}.
+
@item slovak
Runs style hook @code{TeX-language-sk-hook}. Pressing @key{"} will
insert @samp{\uv@{} and @samp{@}} depending on context.
diff --git a/style/brazil.el b/style/brazil.el
new file mode 100644
index 0000000..353e771
--- /dev/null
+++ b/style/brazil.el
@@ -0,0 +1,37 @@
+;;; brazil.el --- Setup AUCTeX for editing Brazilian text. -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2021-05-02
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'tex)
+
+(TeX-add-style-hook
+ "brazil"
+ (lambda ()
+ (TeX-run-style-hooks "brazilian"))
+ TeX-dialect)
+
+;;; brazil.el ends here
diff --git a/style/brazilian.el b/style/brazilian.el
new file mode 100644
index 0000000..5124e66
--- /dev/null
+++ b/style/brazilian.el
@@ -0,0 +1,77 @@
+;;; brazilian.el --- Setup AUCTeX for editing Brazilian text. -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2021-05-02
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; Cater for some specialities of Brazilian and Portuguese languages
+;; provided by babel package, e.g. special quote and hyphen strings or
+;; `"' which is an active character.
+
+;; Thanks to Gustavo Barros <gusbrs.2016@gmail.com> for requesting
+;; this feature and reviewing the code.
+
+;;; 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-brazilian-mode-syntax-table
+ (copy-syntax-table LaTeX-mode-syntax-table)
+ "Syntax table used in LaTeX mode when using `brazilian' language.")
+
+(modify-syntax-entry ?\" "w" LaTeX-brazilian-mode-syntax-table)
+
+(TeX-add-style-hook
+ "brazilian"
+ (lambda ()
+ (set-syntax-table LaTeX-brazilian-mode-syntax-table)
+ (unless (eq (car TeX-quote-language) 'override)
+ (setq TeX-quote-language nil))
+ (setq LaTeX-babel-hyphen-language "brazilian")
+ (TeX-add-symbols
+ '("ord" 0)
+ '("ro" 0)
+ '("orda" 0)
+ '("ra" 0))
+ ;; Fontification
+ (when (and (eq TeX-install-font-lock 'font-latex-setup)
+ (featurep 'font-latex))
+ (font-latex-add-quotes '("\"<" "\">" french))
+ ;; Prevent "| from leading to color bleed.
+ (font-latex-add-to-syntax-alist (list (cons ?\" "\\"))))
+ (run-hooks 'TeX-language-pt-br-hook))
+ TeX-dialect)
+
+;;; brazilian.el ends here
diff --git a/style/portuges.el b/style/portuges.el
new file mode 100644
index 0000000..7c0cdb1
--- /dev/null
+++ b/style/portuges.el
@@ -0,0 +1,37 @@
+;;; portuges.el --- Setup AUCTeX for editing Portuges text. -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2021-05-02
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'tex)
+
+(TeX-add-style-hook
+ "portuges"
+ (lambda ()
+ (TeX-run-style-hooks "portuguese"))
+ TeX-dialect)
+
+;;; portuges.el ends here
diff --git a/style/portuguese.el b/style/portuguese.el
new file mode 100644
index 0000000..1e8b4c8
--- /dev/null
+++ b/style/portuguese.el
@@ -0,0 +1,78 @@
+;;; portuguese.el --- Setup AUCTeX for editing Portuguese text. -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2021-05-02
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; Cater for some specialities of Portuguese language provided by
+;; babel package, e.g. special quote and hyphen strings or `"' which
+;; is an active character.
+
+;; Thanks to Gustavo Barros <gusbrs.2016@gmail.com> for requesting
+;; this feature and reviewing the code.
+
+;;; 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-portuguese-mode-syntax-table
+ (copy-syntax-table LaTeX-mode-syntax-table)
+ "Syntax table used in LaTeX mode when using `portuguese' language.")
+
+(modify-syntax-entry ?\" "w" LaTeX-portuguese-mode-syntax-table)
+
+(TeX-add-style-hook
+ "portuguese"
+ (lambda ()
+ (set-syntax-table LaTeX-portuguese-mode-syntax-table)
+ (unless (eq (car TeX-quote-language) 'override)
+ (setq TeX-quote-language
+ `("portuguese" "\"<" "\">" ,TeX-quote-after-quote)))
+ (setq LaTeX-babel-hyphen-language "portuguese")
+ (TeX-add-symbols
+ '("ord" 0)
+ '("ro" 0)
+ '("orda" 0)
+ '("ra" 0))
+ ;; Fontification
+ (when (and (eq TeX-install-font-lock 'font-latex-setup)
+ (featurep 'font-latex))
+ (font-latex-add-quotes '("\"<" "\">" french))
+ ;; Prevent "| from leading to color bleed.
+ (font-latex-add-to-syntax-alist (list (cons ?\" "\\"))))
+ (run-hooks 'TeX-language-pt-hook))
+ TeX-dialect)
+
+;;; portuguese.el ends here
diff --git a/tex.el b/tex.el
index 06f0686..3b07c68 100644
--- a/tex.el
+++ b/tex.el
@@ -6032,6 +6032,7 @@ valid languages."
(const "french") ;; not frenchb or francais
(const "italian")
(const "polish")
+ (const "portuguese")
(const "slovak")
(const "swedish")
(string :tag "Other Language"))
- [AUCTeX-diffs] [elpa] externals/auctex 2959334 11/34: ; Improve previous commit again, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 2959334 11/34: ; Improve previous commit again, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a8e1a5d 18/34: Update documentation, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a6121fb 13/34: Fix fontification when $ is unclosed in buffer, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 1ded6fc 24/34: Fix markups in documents, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex afab0e0 17/34: Indent region (bug#48518), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 70907dd 09/34: Skip inline math $ inside comments (bug#48365), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 3c8e583 08/34: Introduce new variable `LaTeX-global-package-files', Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 8990190 16/34: Improve style/algorithm.el, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex b5f34a9 23/34: Followup my commit on May 6, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex bff3d85 01/34: ; Delete unnecessary escaping of characters, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 7ff3323 03/34: Add support for (Brazilian) Portuguese,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 2a4cbbb 21/34: Improve `TeX-electric-macro' in Texinfo mode, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex dfd6585 33/34: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 605cfc2 14/34: Add new test, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex bb1bb25 27/34: Remove backspace as paragraph separator, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 93d66d1 31/34: Adapt for Texinfo mode, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 154fc6e 28/34: Only re-fill \item contents if auto-fill-mode is active (bug#48760), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex cd63c11 32/34: Use own error description for LaTeX mode only, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a21c10a 29/34: Check for `auto-fill-function' before filling, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 34ab611 22/34: Improve completion, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex e7b25d1 26/34: Use #' rather than ' to quote function names, Tassilo Horn, 2021/06/06