[Top][All Lists]

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

[elpa] externals/auctex 312c74a 17/69: Merge branch 'master' into simpli

From: Tassilo Horn
Subject: [elpa] externals/auctex 312c74a 17/69: Merge branch 'master' into simplify-TeX-parse-error
Date: Sat, 26 Mar 2016 21:36:33 +0000

branch: externals/auctex
commit 312c74a69ac6260bc82de4f377cf1813865ad2a5
Merge: 8b2550e 0da2913
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Merge branch 'master' into simplify-TeX-parse-error
 ChangeLog        |   16 ++++++++++++++++
 doc/auctex.texi  |    7 ++++++-
 doc/changes.texi |    2 +-
 latex.el         |   15 ++++++++++++++-
 4 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fb1e62f..2be1b61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-07-25  Tassilo Horn  <address@hidden>
+       * latex.el (LaTeX-largest-level-set): Adapt
+       `outline-heading-alist' according to largest level in order to
+       make `outline-promote' (and others) work correctly.
+2014-07-25  Mos� Giordano  <address@hidden>
+       * doc/auctex.texi (Adding Macros): Document `TeX-date-format'.
+       * doc/changes.texi: Mention `TeX-date-format'.
+       * latex.el (TeX-date-format): New customizable option.
+       Suggested by Uwe Brauer.
+       (TeX-arg-date): Use it.
 2014-07-17  Mos� Giordano  <address@hidden>
        * Makefile.in: Update copyright years.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 3961bb8..7261705 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4394,7 +4394,12 @@ Prompt for a @LaTeX{} length completing with known 
 Prompt for a @TeX{} macro with completion.
 @item TeX-arg-date
-Prompt for a date, defaulting to the current date.
address@hidden TeX-date-format
+Prompt for a date, defaulting to the current date.  The format of the
+date is specified by the @code{TeX-date-format} option.  If you want to
+change the format when the @samp{babel} package is loaded with a
+specific language, set @code{TeX-date-format} inside the appropriate
+language hook, for details @pxref{European}.
 @item TeX-arg-version
 Prompt for the version of a file, using as initial input the current
diff --git a/doc/changes.texi b/doc/changes.texi
index 5707cd0..b408b47 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -53,7 +53,7 @@ non-nil.  Completion for class options of the standard 
@LaTeX{} classes
 is provided as well.
-New user options @code{LaTeX-default-author},
+New user options @code{LaTeX-default-author}, @code{TeX-date-format},
 @code{TeX-insert-braces-alist}, @code{LaTeX-fontspec-arg-font-search},
 and @code{LaTeX-fontspec-font-list-default}.  A new possible value
 (@code{show-all-optional-args}) for
diff --git a/latex.el b/latex.el
index d9a383f..c798cda 100644
--- a/latex.el
+++ b/latex.el
@@ -280,6 +280,14 @@ SECTION has to be a string contained in 
 Additionally the function will invalidate the section submenu in
 order to let the menu filter regenerate it."
   (setq LaTeX-largest-level (LaTeX-section-level section))
+  (let ((offset (LaTeX-outline-offset)))
+    (when (> offset 0)
+      (let (lst)
+       (dolist (tup outline-heading-alist)
+         (setq lst (cons (cons (car tup)
+                               (+ offset (cdr tup)))
+                         lst)))
+       (setq outline-heading-alist (nreverse lst)))))
   (setq LaTeX-section-menu nil))
 (defun LaTeX-outline-offset ()
@@ -2251,12 +2259,17 @@ string."
                    nil t)
+(defcustom TeX-date-format "%Y/%m/%d"
+  "The default date format prompted by `TeX-arg-date'."
+  :group 'LaTeX-macro
+  :type 'string)
 (defun TeX-arg-date (optional &optional prompt)
   "Prompt for a date, defaulting to the current date.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
-  (let ((default (format-time-string "%Y/%m/%d" (current-time))))
+  (let ((default (format-time-string TeX-date-format (current-time))))
      (TeX-read-string (TeX-argument-prompt
                       optional prompt (format "Date (default %s)" default))

reply via email to

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