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. 765c5165fdf27a12d312a


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 765c5165fdf27a12d312a4b1a314f2cb9a245737
Date: Tue, 12 Aug 2014 10:35:03 +0000

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  765c5165fdf27a12d312a4b1a314f2cb9a245737 (commit)
      from  4c8d64c0b9e62df7889530caef5019e200de8de8 (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 765c5165fdf27a12d312a4b1a314f2cb9a245737
Author: Mosè Giordano <address@hidden>
Date:   Tue Aug 12 12:33:28 2014 +0200

    Rename LaTeX-auto-insert-label and document its use for sections.
    
    * latex.el (LaTeX-insert-label): Rename from
    `LaTeX-auto-insert-label' and mention sections in the doc-string.
    (LaTeX-label): Update accordingly.
    
    * doc/auctex.texi (Sectioning): Mention `LaTeX-insert-label'.
    (Environments): Update `LaTeX-insert-label' name and document use
    for sectioning commands.
    (Environments, Completion): Prettify
    `TeX-complete-expert-commands' documentation by using a table
    environment.
    
    * doc/changes.texi: Rename `LaTeX-auto-insert-label' to
    `LaTeX-insert-label' and mention sections too.

diff --git a/ChangeLog b/ChangeLog
index 806e013..5f71fa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-08-12  Mosè Giordano  <address@hidden>
+
+       * latex.el (LaTeX-insert-label): Rename from
+       `LaTeX-auto-insert-label' and mention sections in the doc-string.
+       (LaTeX-label): Update accordingly.
+
+       * doc/auctex.texi (Sectioning): Mention `LaTeX-insert-label'.
+       (Environments): Update `LaTeX-insert-label' name and document use
+       for sectioning commands.
+       (Environments, Completion): Prettify
+       `TeX-complete-expert-commands' documentation by using a table
+       environment.
+
+       * doc/changes.texi: Rename `LaTeX-auto-insert-label' to
+       `LaTeX-insert-label' and mention sections too.
+
 2014-08-11  Mosè Giordano  <address@hidden>
 
        * tex-buf.el (TeX-command): Keep the frame and the buffer
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 37c7366..d85a4d3 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -734,6 +734,12 @@ Prefix to all section references.
 
 @end deffn
 
address@hidden LaTeX-insert-label
+The @code{LaTeX-insert-label} user option controls whether
address@hidden should automatically insert a label for the given
+sectioning command.  By default, a label for all sectioning commands
+will be prompted.  @xref{Environments}, for more information.
+
 The precise behavior of @code{LaTeX-section} is defined by the contents
 of @code{LaTeX-section-hook}.
 
@@ -853,33 +859,33 @@ as @samp{equation}, @samp{figure}, @samp{table}, 
address@hidden  When you
 insert one of the supported environments with @kbd{C-c C-e}, you will be
 automatically prompted for a label.  If you want to select the
 environments for which to automatically insert or not the label,
-customize the @code{LaTeX-auto-insert-label} variable.
address@hidden LaTeX-auto-insert-label
-Control whether @code{LaTeX-environment} (@kbd{C-c C-e}) should insert a
-label.  If nil, never inserts a label, if t always inserts a label and
-this the default.
+customize the @code{LaTeX-insert-label} variable.
address@hidden LaTeX-insert-label
+Control whether @code{LaTeX-section} (@kbd{C-c C-s}) or
address@hidden (@kbd{C-c C-e}) should insert a label.  If nil,
+never insert a label, if t always insert a label and this the default.
 
 This variable may also be a cons cell, to whitelist or blacklist the
-environments for which a label should or should not be inserted.  The
-car can be either nil or t.  In the former case,
address@hidden never inserts labels except for the
-environments listed in the cdr; in the latter case
address@hidden always inserts labels except for the
-environments listed in the cdr.  In any cases, you can manually insert
-at point a label inside an environment with @kbd{C-c C-m label
address@hidden, as usual.
+sections or environments for which a label should or should not be
+inserted.  The car can be either nil or t.  In the former case,
address@hidden and @code{LaTeX-environment} never insert labels
+except for the sections and environments listed in the cdr; in the
+latter case those functions always insert labels except for the sections
+and environments listed in the cdr.  In any cases, you can manually
+insert a label at point with @kbd{C-c C-m label @key{RET}}, as usual.
 
 For example, the value
 @lisp
-(t . "equation")
+(t . "paragraph" "equation")
 @end lisp
 makes @AUCTeX{} always prompt you for a label except for the
address@hidden environment.  Instead with the value
address@hidden section, and th @samp{equation} environment.  Instead
+with the value
 @lisp
-(nil . "caption" "figure")
+(nil . "part" "chapter" "caption" "figure")
 @end lisp
-you will be prompted for a label only for @samp{caption} and
address@hidden environments.
+you will be prompted for a label only for @samp{part} and @samp{chapter}
+sections, and @samp{caption} and @samp{figure} environments.
 @end defopt
 
 As a default selection, @AUCTeX{} will suggest the environment last
@@ -916,9 +922,14 @@ Complete macros and environments marked as expert commands.
 
 Possible values are nil, t, or a list of style names.
 
-  - nil           Don't complete expert commands (default).
-  - t             Always complete expert commands.
-  - (STYLES ...)  Only complete expert commands of STYLES.
address@hidden @asis
address@hidden nil
+Don't complete expert commands (default).
address@hidden t
+Always complete expert commands.
address@hidden (STYLES @dots{})
+Only complete expert commands of STYLES.
address@hidden table
 @end defopt
 
 
@@ -1315,9 +1326,14 @@ Complete macros and environments marked as expert 
commands.
 
 Possible values are nil, t, or a list of style names.
 
-  - nil           Don't complete expert commands (default).
-  - t             Always complete expert commands.
-  - (STYLES ...)  Only complete expert commands of STYLES.
address@hidden @asis
address@hidden nil
+Don't complete expert commands (default).
address@hidden t
+Always complete expert commands.
address@hidden (STYLES @dots{})
+Only complete expert commands of STYLES.
address@hidden table
 @end defopt
 
 
diff --git a/doc/changes.texi b/doc/changes.texi
index 3ce9d34..a717217 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -130,8 +130,9 @@ Now @kbd{C-c C-e document @key{RET}}, in an empty document, 
prompts for
 @samp{\usepackage} macros in addition to @samp{\documentclass}.
 
 @item
-You can customize for which environments a label should be automatically
-inserted or not through the user option @code{LaTeX-auto-insert-label}.
+You can customize for which sections and environments a label should be
+automatically inserted or not through the new user option
address@hidden
 @end itemize
 
 @heading News since 11.87
diff --git a/latex.el b/latex.el
index d1ac41f..52ea574 100644
--- a/latex.el
+++ b/latex.el
@@ -835,27 +835,28 @@ the label inserted, or nil if no label was inserted."
   :group 'LaTeX-label
   :type 'function)
 
-(defcustom LaTeX-auto-insert-label t
+(defcustom LaTeX-insert-label t
   "Control whether `LaTeX-label' function should insert a label.
 If nil, never inserts a label, if t always inserts a label.
 
 This variable may also be a cons cell, to whitelist or blacklist
-the environments for which a label should or should not be
-inserted.  The CAR can be either nil or t.  In the former case,
-`LaTeX-label' never inserts labels except for the environments
-listed in the CDR; in the latter case `LaTeX-label' always
-inserts labels except for the environments listed in the CDR."
+the sections or environments for which a label should or should
+not be inserted.  The CAR can be either nil or t.  In the former
+case, `LaTeX-label' never inserts labels except for the sections
+and environments listed in the CDR; in the latter case
+`LaTeX-label' always inserts labels except for the sections and
+environments listed in the CDR."
   :group 'LaTeX-label
   :type '(choice (const :tag "Insert labels" t)
                 (const :tag "Do not insert labels" nil)
-                (cons :tag "Whitelist or blacklist environments"
+                (cons :tag "Whitelist or blacklist"
                       (choice
                        (const
-                        :tag "Insert labels except for environments..." t)
+                        :tag "Insert labels except for sections and 
environments..." t)
                        (const
-                        :tag "Do not insert labels except for environments..."
+                        :tag "Do not insert labels except for sections and 
environments..."
                         nil))
-                      (repeat (string :tag "Environment")))))
+                      (repeat (string :tag "Section or Environment")))))
 
 (defcustom LaTeX-figure-label "fig:"
   "*Default prefix to figure labels."
@@ -945,18 +946,18 @@ either the prefix or a symbol referring to one."
 
 (defun LaTeX-label (environment)
   "Insert a label for ENVIRONMENT at point.
-`LaTeX-auto-insert-label' controls whether the label should
-actually be inserted.  If `LaTeX-label-function' is a valid
-function, LaTeX label will transfer the job to this function."
+`LaTeX-insert-label' controls whether the label should actually
+be inserted.  If `LaTeX-label-function' is a valid function,
+LaTeX label will transfer the job to this function."
   (if (cond
-       ;; `LaTeX-auto-insert-label' is boolean.
-       ((booleanp LaTeX-auto-insert-label)
-       LaTeX-auto-insert-label)
-       ;; `LaTeX-auto-insert-label' is a whitelist or a blacklist.
-       ((consp LaTeX-auto-insert-label)
-       (if (member environment (cdr LaTeX-auto-insert-label))
-           (null (car LaTeX-auto-insert-label))
-         (car LaTeX-auto-insert-label)))
+       ;; `LaTeX-insert-label' is boolean.
+       ((booleanp LaTeX-insert-label)
+       LaTeX-insert-label)
+       ;; `LaTeX-insert-label' is a whitelist or a blacklist.
+       ((consp LaTeX-insert-label)
+       (if (member environment (cdr LaTeX-insert-label))
+           (null (car LaTeX-insert-label))
+         (car LaTeX-insert-label)))
        ;; In any other cases, insert the label.
        (t))
       (let (label)

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

Summary of changes:
 ChangeLog        |   16 +++++++++++++
 doc/auctex.texi  |   64 +++++++++++++++++++++++++++++++++--------------------
 doc/changes.texi |    5 ++-
 latex.el         |   43 ++++++++++++++++++-----------------
 4 files changed, 81 insertions(+), 47 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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