auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 7ff332397dad4bfe2afe6


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 7ff332397dad4bfe2afe62cec5a4577d92301182
Date: Tue, 4 May 2021 04:06:05 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  7ff332397dad4bfe2afe62cec5a4577d92301182 (commit)
      from  11936198e22ad783765b10765f68e3f6b8e5e095 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7ff332397dad4bfe2afe62cec5a4577d92301182
Author: Arash Esbati <arash@gnu.org>
Date:   Tue May 4 10:04:42 2021 +0200

    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.

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"))

-----------------------------------------------------------------------

Summary of changes:
 Makefile.in                    |  4 ++-
 doc/auctex.texi                | 35 ++++++++++++++-----
 style/{jura.el => brazil.el}   | 19 ++++------
 style/brazilian.el             | 77 +++++++++++++++++++++++++++++++++++++++++
 style/{jura.el => portuges.el} | 19 ++++------
 style/portuguese.el            | 78 ++++++++++++++++++++++++++++++++++++++++++
 tex.el                         |  1 +
 7 files changed, 200 insertions(+), 33 deletions(-)
 copy style/{jura.el => brazil.el} (72%)
 create mode 100644 style/brazilian.el
 copy style/{jura.el => portuges.el} (72%)
 create mode 100644 style/portuguese.el


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]