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. c03ca2c9b12091aa1d62f


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. c03ca2c9b12091aa1d62f39f33f230746ab2fd3d
Date: Sat, 18 Nov 2017 17:01:08 -0500 (EST)

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  c03ca2c9b12091aa1d62f39f33f230746ab2fd3d (commit)
      from  842471c3f51bdb787825452753acdc68d0627a13 (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 c03ca2c9b12091aa1d62f39f33f230746ab2fd3d
Author: Arash Esbati <address@hidden>
Date:   Sat Nov 18 23:00:11 2017 +0100

    Improve style/epigraph.el
    
    * style/epigraph.el ("epigraph"): Leave point inside first pair of
    braces for \epigraph and \qitem.
    Use `LaTeX-add-lengths' for skips instead of `TeX-add-symbols'.
    Use `TeX-arg-length' instead of `TeX-arg-size' for \dropchapter.
    Append qitem macro to `LaTeX-item-regexp'.
    Improve fontification.

diff --git a/style/epigraph.el b/style/epigraph.el
index c25b148..1d10c6a 100644
--- a/style/epigraph.el
+++ b/style/epigraph.el
@@ -1,6 +1,6 @@
-;;; epigraph.el --- AUCTeX style for `epigraph.sty'
+;;; epigraph.el --- AUCTeX style for `epigraph.sty' v1.5c
 
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2017 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen <address@hidden>
 ;; Maintainer: address@hidden
@@ -26,7 +26,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `epigraph.sty'.
+;; This file adds support for `epigraph.sty' v1.5c from 2009/09/02.
 
 ;;; Code:
 
@@ -34,33 +34,57 @@
  "epigraph"
  (lambda ()
    (TeX-add-symbols
-    '("epigraph" t t)
-    '("qitem" t t)
-    '("epigraphhead" [ "Distance (a number)" ] t)
-    '("dropchapter" TeX-arg-size)
-    "epigraphwidth"
+    ;; 2.1 The epigraph command
+    '("epigraph" 2)
+    ;; 2.2 The epigraphs environment
+    '("qitem" 2)
+    ;; 2.3 General
     "textflush"
     "epigraphflush"
     "sourceflush"
     "epigraphsize"
-    "epigraphrule"
-    "beforeepigraphskip"
-    "afterepigraphskip"
+    ;; 2.4 Epigraphs before chapter headings
+    '("epigraphhead" [ "Distance (a number)" ] t)
+    '("dropchapter" TeX-arg-length)
     "undodrop"
-    "cleartoevenpage")
+    ;; \cleartoevenpage takes an optional argument.  Don't query for
+    ;; it, just insert the macro and leave the rest to the user
+    '("cleartoevenpage" 0))
 
+   ;; 2.2 The epigraphs environment
    (LaTeX-add-environments
     '("epigraphs" LaTeX-env-item))
 
-   (add-to-list 'LaTeX-item-list '("epigraphs" . LaTeX-epigraph-qitem))
-
+   ;; The value of these lengths can be changed with \setlength
+   (LaTeX-add-lengths "epigraphwidth" "epigraphrule"
+                     "beforeepigraphskip"
+                     "afterepigraphskip")
+
+   ;; Append epigraphs to `LaTeX-item-list':
+   (add-to-list 'LaTeX-item-list
+               '("epigraphs" . LaTeX-epigraph-qitem) t)
+
+   ;; Append qitem to `LaTeX-item-regexp':
+   (unless (string-match "qitem" LaTeX-item-regexp)
+     (set (make-local-variable 'LaTeX-item-regexp)
+         (concat
+          LaTeX-item-regexp
+          "\\|"
+          "qitem\\b"))
+     (LaTeX-set-paragraph-start))
+
+   ;; Fontification:
    (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
-     (font-latex-add-keywords '(("epigraph" "{{")
-                               ("qitem" "{{")
-                               ("dropchapter" "{")
-                               ("epigraphhead" "{")) 'function)
-     (font-latex-add-keywords '("cleartoevenpage") 'warning)))
+     (font-latex-add-keywords '(("epigraph"     "{{")
+                               ("qitem"        "{{")
+                               ("epigraphhead" "[{"))
+                             'textual)
+     (font-latex-add-keywords '(("dropchapter"  "{")
+                               ("undodrop"     ""))
+                             'variable)
+     (font-latex-add-keywords '("cleartoevenpage")
+                             'warning)))
  LaTeX-dialect)
 
 (defvar LaTeX-epigraph-package-options nil

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

Summary of changes:
 style/epigraph.el | 62 ++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 43 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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