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


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. f319b9f1189d21927c0577a3280db4c2c99928be
Date: Fri, 11 Jan 2019 00:50:01 -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  f319b9f1189d21927c0577a3280db4c2c99928be (commit)
      from  ca16d88b58ba48f99a2e317824e50a8041e40f97 (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 f319b9f1189d21927c0577a3280db4c2c99928be
Author: Ikumi Keita <address@hidden>
Date:   Tue Dec 4 22:54:12 2018 +0900

    Override some bindings in `TeX-mode-map' in Texinfo mode
    
    * tex-info.el (Texinfo-mode-map): Bind `self-insert-command' to
    "$", "^", "_" and "\" because they are normal characters in Texinfo
    documents.
    Bind `TeX-insert-backslash' to "@" so that users benefit from
    `TeX-electric-macro' even in Texinfo mode.
    * tex.el (TeX-electric-escape): Update doc string.
    * doc/auctex.texi (Completion): Update description.
    * doc/changes.texi (News in 12.2): Mention the above changes.

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 0e0b6a4..8843fa9 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1332,13 +1332,14 @@ Note that for some macros, there are special 
mechanisms, e.g.
 Default macro to insert when invoking @code{TeX-insert-macro} first time.
 @end defopt
 
-A faster alternative is to bind the function @code{TeX-electric-macro}
-to @samp{\}.  This can be done by setting the variable
address@hidden
+A faster alternative is to enable the option
address@hidden
 
 @defopt TeX-electric-escape
-If this is non-nil when @AUCTeX{} is loaded, the @TeX{} escape
-character @samp{\} will be bound to @code{TeX-electric-macro}
+If this is non-nil, typing the @TeX{} escape character @kbd{\} will
+invoke the command @code{TeX-electric-macro}.
+
+In Texinfo mode, the command is invoked by @kbd{@@} instead.
 @end defopt
 
 The difference between @code{TeX-insert-macro} and
diff --git a/doc/changes.texi b/doc/changes.texi
index 3e3f417..ba38bf4 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -40,6 +40,16 @@ no longer works with @previewlatex{}.  We consider this 
incompatibility
 is permissible because address@hidden extension is enabled for standard
 @LaTeX{} by default long ago.  @LaTeX{} variants such as address@hidden and
 address@hidden are not affected.
+
address@hidden
+Key binds in Texinfo mode are improved.  Typing @kbd{$}, @kbd{^},
address@hidden and @kbd{\} now just self-inserts without pointless side effects
+in Texinfo mode.
+
+In addition, the option @code{TeX-electric-escape} is now effective in
+Texinfo mode.  When it is enabled, typing @kbd{@@} will invoke
address@hidden offering completion in similar style with
+other TeX modes of @AUCTeX{}.
 @end itemize
 
 @heading News in 12.1
diff --git a/tex-info.el b/tex-info.el
index 3fc868f..71e97c2 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -524,6 +524,18 @@ is assumed by default."
        (define-key map "\e\r" 'address@hidden)) ;*** Alias
     (define-key map "\C-c\C-s" 'Texinfo-insert-node)
     (define-key map "\C-c]" 'address@hidden)
+
+    ;; Override some bindings in `TeX-mode-map'
+    ;; FIXME: Inside @math{}, you can use all plain TeX math commands
+    ;; even in Texinfo documents.  Thus it might be nice to develop
+    ;; context sensitive command so that the following four keys
+    ;; inherit the command in `TeX-mode-map' inside @math{}.
+    (define-key map "$"  #'self-insert-command)
+    (define-key map "^"  #'self-insert-command)
+    (define-key map "_"  #'self-insert-command)
+    (define-key map "\\" #'self-insert-command)
+    ;; Users benefit from `TeX-electric-macro' even in Texinfo mode
+    (define-key map "@" #'TeX-insert-backslash)
     map)
   "Keymap for Texinfo mode.")
 
diff --git a/tex.el b/tex.el
index 1367d4f..625dd60 100644
--- a/tex.el
+++ b/tex.el
@@ -4798,7 +4798,9 @@ element to ALIST-VAR."
 ;;; Keymap
 
 (defcustom TeX-electric-escape nil
-  "If non-nil, ``\\'' will be bound to `TeX-electric-macro'."
+  "If non-nil, ``\\'' will offer on-the-fly completion.
+In Texinfo-mode, ``@'' will do that job instead and ``\\'' is not
+affected.  See `TeX-electric-macro' for detail."
   :group 'TeX-macro
   :type 'boolean)
 

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

Summary of changes:
 doc/auctex.texi  | 11 ++++++-----
 doc/changes.texi | 10 ++++++++++
 tex-info.el      | 12 ++++++++++++
 tex.el           |  4 +++-
 4 files changed, 31 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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