[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex f319b9f 60/67: Override some bindings in `TeX-mo
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex f319b9f 60/67: Override some bindings in `TeX-mode-map' in Texinfo mode |
Date: |
Fri, 8 Feb 2019 11:40:40 -0500 (EST) |
branch: externals/auctex
commit f319b9f1189d21927c0577a3280db4c2c99928be
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
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.
---
doc/auctex.texi | 11 ++++++-----
doc/changes.texi | 10 ++++++++++
tex-info.el | 12 ++++++++++++
tex.el | 4 +++-
4 files changed, 31 insertions(+), 6 deletions(-)
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)
- [elpa] externals/auctex 4fed4a7 64/67: Remove combatibility code for older emasen, (continued)
- [elpa] externals/auctex 4fed4a7 64/67: Remove combatibility code for older emasen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex de3b5f7 47/67: ; * doc/preview-latex.texi (preview-cache-preamble): Use @url{}., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 449ec06 43/67: ; Silence the compiler in styles for `reftex-compile-variables', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 761ffc3 27/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 33329c3 57/67: ; * doc/auctex.texi (Completion): Fix typo., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 2c73857 51/67: ; * style/pst-plot.el (LaTeX-pstplot-cleanup): Fix typo., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3b5cea2 56/67: Improve completion for \url between url.el and hyperref.el, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex bbe53ed 53/67: Fix document, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 6e8aa67 41/67: ; Silence the compiler in styles for `font-latex-add-quotes', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 5147a27 48/67: Revise description about CJK support, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex f319b9f 60/67: Override some bindings in `TeX-mode-map' in Texinfo mode,
Tassilo Horn <=
- [elpa] externals/auctex ca16d88 59/67: Update style/enumitem.el to package version 3.6, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 38d39a6 31/67: Remove compatibility face, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 9ae66cd 33/67: Remove TeX-replace-regexp-in-string, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 9d8369a 39/67: ; Silence the compiler in styles for `font-latex-update-font-lock', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 5827aeb 34/67: Remove TeX-mark-active, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex c893152 50/67: Redefine support for \url in hyperref, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3ce90db 36/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 4cfd116 65/67: Add support for w and W column specifiers, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 49720ce 62/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3aef308 58/67: Skip macros and environments from pythontex, Tassilo Horn, 2019/02/08