Re: [AUCTeX-devel] Some key binds in Texinfo mode

2019-01-10 Thread Ikumi Keita
Hi all,

> Ikumi Keita  writes:
> I think that the following for key binds are not useful and should be
> redefined in Texinfo mode:
> $ `TeX-insert-dollar'
> ^ `TeX-insert-sub-or-superscript'
> _ `TeX-insert-sub-or-superscript'
> \ `TeX-insert-backslash'

> In addition, I think it is "@" that deserves the binding
> `TeX-insert-backslash' in Texinfo mode.

Are there anyone against this proposal?  If none, I'll commit the
attached patch, with minor updates in documents against the previous
one.

Regards,
Ikumi Keita



0001-Override-some-bindings-in-TeX-mode-map-in-Texinfo-mo.patch.gz
Description: Texinfo keybind patch rev.2
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Some key binds in Texinfo mode

2019-01-10 Thread Arash Esbati
Ikumi Keita  writes:

>> Ikumi Keita  writes:
>> I think that the following for key binds are not useful and should be
>> redefined in Texinfo mode:
>> $ `TeX-insert-dollar'
>> ^ `TeX-insert-sub-or-superscript'
>> _ `TeX-insert-sub-or-superscript'
>> \ `TeX-insert-backslash'
>
>> In addition, I think it is "@" that deserves the binding
>> `TeX-insert-backslash' in Texinfo mode.
>
> Are there anyone against this proposal?  If none, I'll commit the
> attached patch, with minor updates in documents against the previous
> one.

Hi Keita,

thanks for the fix.  It looks good to me.

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-devel] New column specifiers w and W in array.sty

2019-01-10 Thread Arash Esbati
Hi all,

array.sty now comes with 2 new column specifiers w and W.  From the
manual:

w{align}{width}
Sets the cell content in a box of the specified width aligned
according to the align parameter which could be either l, c
or r.  Works essentially like \makebox[width][align]{cell}
so silently overprints if the cell content is wider than the
specified width. If that is not desired use W instead.

This can be easily added to array.el with:

@@ -95,7 +95,7 @@ and make it buffer local. "

;; `array.sty' adds some new column specification letters.
(set (make-local-variable 'LaTeX-array-column-letters)
-   (concat LaTeX-array-column-letters "m" "b"))
+   (concat LaTeX-array-column-letters "m" "b" "w" "W"))


The fun part begins with this sentence in the manual:

A declaration like w{l}{3cm} (or even shorter wl{3cm})

This notation confuses `LaTeX-array-count-columns' as it counts the l as
a new specifier and not as an argument to w.

My suggestion is to add the above patch to array.el and mention in the
News that AUCTeX supports only the version with braces.  This is
essentially what we do for `*' contructs in tables.

Any comments?

Best, Arash

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] New column specifiers w and W in array.sty

2019-01-10 Thread Mosè Giordano
Hi Arash,

On Thu, Jan 10, 2019 at 10:17 PM Arash Esbati  wrote:
>
> Hi all,
>
> array.sty now comes with 2 new column specifiers w and W.  From the
> manual:
>
> w{align}{width}
> Sets the cell content in a box of the specified width aligned
> according to the align parameter which could be either l, c
> or r.  Works essentially like \makebox[width][align]{cell}
> so silently overprints if the cell content is wider than the
> specified width. If that is not desired use W instead.
>
> This can be easily added to array.el with:
>
> @@ -95,7 +95,7 @@ and make it buffer local. "
>
> ;; `array.sty' adds some new column specification letters.
> (set (make-local-variable 'LaTeX-array-column-letters)
> -   (concat LaTeX-array-column-letters "m" "b"))
> +   (concat LaTeX-array-column-letters "m" "b" "w" "W"))
>
>
> The fun part begins with this sentence in the manual:
>
> A declaration like w{l}{3cm} (or even shorter wl{3cm})
>
> This notation confuses `LaTeX-array-count-columns' as it counts the l as
> a new specifier and not as an argument to w.
>
> My suggestion is to add the above patch to array.el and mention in the
> News that AUCTeX supports only the version with braces.

I agree on this!

> Any comments?

No, please go ahead!

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. f319b9f1189d21927c0577a3280db4c2c99928be

2019-01-10 Thread Ikumi Keita
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 
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
-@code{TeX-electric-escape}
+A faster alternative is to enable the option
+@code{TeX-electric-escape}.
 
 @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 e-@TeX{} extension is enabled for standard
 @LaTeX{} by default long ago.  @LaTeX{} variants such as Xe@LaTeX{} and
 Lua@LaTeX{} are not affected.
+
+@item
+Key binds in Texinfo mode are improved.  Typing @kbd{$}, @kbd{^},
+@kbd{_} 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
+@code{TeX-electric-macro} 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" 'texinfo-insert-@item)) ;*** Alias
 (define-key map "\C-c\C-s" 'Texinfo-insert-node)
 (define-key map "\C-c]" 'texinfo-insert-@end)
+
+;; 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

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-commit] GNU AUCTeX branch, master, updated. f319b9f1189d21927c0577a3280db4c2c99928be

2019-01-10 Thread Ikumi Keita
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 
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.

---

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

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


Re: [AUCTeX-devel] Some key binds in Texinfo mode

2019-01-10 Thread Ikumi Keita
Hi Arash,

> Arash Esbati  writes:
>> Are there anyone against this proposal?  If none, I'll commit the
>> attached patch, with minor updates in documents against the previous
>> one.

> Hi Keita,

> thanks for the fix.  It looks good to me.

Thanks, commited.

Bye,
Ikumi Keita

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


[AUCTeX-commit] GNU AUCTeX branch, master, updated. dcfdd6973d5471f68d9df9b530c0c4a2687febf4

2019-01-10 Thread Ikumi Keita
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  dcfdd6973d5471f68d9df9b530c0c4a2687febf4 (commit)
  from  f319b9f1189d21927c0577a3280db4c2c99928be (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 dcfdd6973d5471f68d9df9b530c0c4a2687febf4
Author: Ikumi Keita 
Date:   Sat Jan 5 19:38:43 2019 +0900

Fix test conditions on w32

* tests/tex/command-expansion.el (TeX-command-detokenize): Correct
`system-type' for w32.
(TeX-command-expand-skip-file-name, TeX-command-expand-active-master):
Skip tests on w32.

---

Summary of changes:
 tests/tex/command-expansion.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. dcfdd6973d5471f68d9df9b530c0c4a2687febf4

2019-01-10 Thread Ikumi Keita
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  dcfdd6973d5471f68d9df9b530c0c4a2687febf4 (commit)
  from  f319b9f1189d21927c0577a3280db4c2c99928be (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 dcfdd6973d5471f68d9df9b530c0c4a2687febf4
Author: Ikumi Keita 
Date:   Sat Jan 5 19:38:43 2019 +0900

Fix test conditions on w32

* tests/tex/command-expansion.el (TeX-command-detokenize): Correct
`system-type' for w32.
(TeX-command-expand-skip-file-name, TeX-command-expand-active-master):
Skip tests on w32.

diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
index dd1f09b..0de5831 100644
--- a/tests/tex/command-expansion.el
+++ b/tests/tex/command-expansion.el
@@ -88,7 +88,7 @@
   "Check whether \"\\input\" and \"\\detokenize\" are supplied when necessary."
   ;; Skip on w32 because the quoting style of `shell-quote-argument'
   ;; is different.
-  (skip-unless (not (eq system-type 'w32)))
+  (skip-unless (not (eq system-type 'windows-nt)))
   (should (string=
(let ((major-mode 'latex-mode)
 (TeX-engine 'default)
@@ -102,6 +102,9 @@
 File names obtained as expansion of \"%t\", \"%s\" and so on should be
 skipped for the following expansion to avoid possible endless loop.
 See ."
+  ;; Skip on w32 because the quoting style of `shell-quote-argument'
+  ;; is different.
+  (skip-unless (not (eq system-type 'windows-nt)))
   (let ((TeX-master "abc-def")
(TeX-expand-list '(("-" (lambda () ":")
 (should (string=
@@ -128,6 +131,9 @@ See 
."
 
 (ert-deftest TeX-command-expand-active-master ()
   "Test whether `TeX-active-master' is valid argument for 
`TeX-command-expand'."
+  ;; Skip on w32 because the quoting style of `shell-quote-argument'
+  ;; is different.
+  (skip-unless (not (eq system-type 'windows-nt)))
   (let ((TeX-master "abc")
TeX-current-process-region-p)
 (setq TeX-current-process-region-p nil)

---

Summary of changes:
 tests/tex/command-expansion.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 4fed4a7244db3e56685bd1192741c6445f2a74bc

2019-01-10 Thread Ikumi Keita
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  4fed4a7244db3e56685bd1192741c6445f2a74bc (commit)
   via  38f9d72455226e3f59048360d15c349c7cf7b1b9 (commit)
   via  49720cea6e3ffb4cf84453c4852435496593373b (commit)
  from  dcfdd6973d5471f68d9df9b530c0c4a2687febf4 (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 4fed4a7244db3e56685bd1192741c6445f2a74bc
Author: Ikumi Keita 
Date:   Mon Jan 7 19:05:33 2019 +0900

Remove combatibility code for older emasen

* tex.el (put): Don't put unnecessary property on
`TeX-source-correlate-mode'.
(TeX-clean): Remove fallback code for emacs 21.

diff --git a/tex.el b/tex.el
index 5303ece..3c3f176 100644
--- a/tex.el
+++ b/tex.el
@@ -1851,9 +1851,6 @@ SyncTeX are recognized."
 (make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode "11.86")
 (defalias 'tex-source-correlate-mode 'TeX-source-correlate-mode)
 (put 'TeX-source-correlate-mode 'safe-local-variable #'booleanp)
-;; We do not want the custom variable to require tex.el.  This is only
-;; necessary if AUCTeX was compiled with Emacs 21.
-(put 'TeX-source-correlate-mode 'custom-requests nil)
 (setq minor-mode-map-alist
   (delq (assq 'TeX-source-correlate-mode minor-mode-map-alist)
minor-mode-map-alist))
@@ -2215,14 +2212,11 @@ output files."
  (directory-files (or master-dir ".") nil regexp
 (if files
(when (or (not TeX-clean-confirm)
- (condition-case nil
- (dired-mark-pop-up " *Deletions*" 'delete
-(if (> (length files) 1)
-files
-  (cons t files))
-'y-or-n-p "Delete files? ")
-   (wrong-type-argument ; e.g. with Emacs 21
-(y-or-n-p (format "Delete %S? " (car files))
+ (dired-mark-pop-up " *Deletions*" 'delete
+(if (> (length files) 1)
+files
+  (cons t files))
+'y-or-n-p "Delete files? "))
  (dolist (file files)
(delete-file (concat master-dir file
   (message "No files to be deleted"

commit 38f9d72455226e3f59048360d15c349c7cf7b1b9
Author: Ikumi Keita 
Date:   Mon Jan 7 18:26:22 2019 +0900

Remove compatibility code for older emacsen

* font-latex.el (put):
* tex-style.el (put):
Use `booleanp' instead of `TeX-booleanp'.
* tex.el (put): Use `booleanp' instead of `TeX-booleanp'.
(TeX-booleanp): Remove.

diff --git a/font-latex.el b/font-latex.el
index 6d07ba8..bd504a8 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -857,7 +857,7 @@ script operators ^ and _ are not displayed."
   :group 'font-latex)
 (put 'font-latex-fontify-script 'safe-local-variable
  (lambda (val)
-   (or (TeX-booleanp val)
+   (or (booleanp val)
   (memq val '(multi-level invisible)
 
 (defcustom font-latex-fontify-script-max-level 3
diff --git a/tex-style.el b/tex-style.el
index 5971c9e..b1c32a4 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -234,7 +234,7 @@ It can be a list of themes or a function.  If it is the 
symbol
 This variable is intended to be used as a file local variable to
 override the autodetection of the biblatex backend.")
 (make-variable-buffer-local 'LaTeX-biblatex-use-Biber)
-(put 'LaTeX-biblatex-use-Biber 'safe-local-variable 'TeX-booleanp)
+(put 'LaTeX-biblatex-use-Biber 'safe-local-variable #'booleanp)
 
 ;; style/comment.el
 
diff --git a/tex.el b/tex.el
index 6acf13f..5303ece 100644
--- a/tex.el
+++ b/tex.el
@@ -1850,7 +1850,7 @@ SyncTeX are recognized."
 (defalias 'TeX-source-specials-mode 'TeX-source-correlate-mode)
 (make-obsolete 'TeX-source-specials-mode 'TeX-source-correlate-mode "11.86")
 (defalias 'tex-source-correlate-mode 'TeX-source-correlate-mode)
-(put 'TeX-source-correlate-mode 'safe-local-variable 'TeX-booleanp)
+(put 'TeX-source-correlate-mode 'safe-local-variable #'booleanp)
 ;; We do not want the custom variable to require tex.el.  This is only
 ;; necessary if AUCTeX was compiled with Emacs 21.
 (put 'TeX-source-correlate-mode 'custom-requests nil)
@@ -1995,7 +1995,7 @@ enabled and the `synctex' binary is available."
   :group 'TeX-command
   :set 'TeX-mode-set
   :type 'boolean)
-(put 'TeX-PDF-mode 'safe-local-variable 'TeX-booleanp)
+(put 'TeX-PDF-mode 'safe-local-variable #'booleanp)
 
 (define-minor-mode TeX-PDF-mode
   "Minor mode for using PDFTeX.
@@ -2093,7 +2093,

[AUCTeX-commit] GNU AUCTeX branch, master, updated. 4fed4a7244db3e56685bd1192741c6445f2a74bc

2019-01-10 Thread Ikumi Keita
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  4fed4a7244db3e56685bd1192741c6445f2a74bc (commit)
   via  38f9d72455226e3f59048360d15c349c7cf7b1b9 (commit)
   via  49720cea6e3ffb4cf84453c4852435496593373b (commit)
  from  dcfdd6973d5471f68d9df9b530c0c4a2687febf4 (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 4fed4a7244db3e56685bd1192741c6445f2a74bc
Author: Ikumi Keita 
Date:   Mon Jan 7 19:05:33 2019 +0900

Remove combatibility code for older emasen

* tex.el (put): Don't put unnecessary property on
`TeX-source-correlate-mode'.
(TeX-clean): Remove fallback code for emacs 21.

commit 38f9d72455226e3f59048360d15c349c7cf7b1b9
Author: Ikumi Keita 
Date:   Mon Jan 7 18:26:22 2019 +0900

Remove compatibility code for older emacsen

* font-latex.el (put):
* tex-style.el (put):
Use `booleanp' instead of `TeX-booleanp'.
* tex.el (put): Use `booleanp' instead of `TeX-booleanp'.
(TeX-booleanp): Remove.

commit 49720cea6e3ffb4cf84453c4852435496593373b
Author: Ikumi Keita 
Date:   Mon Jan 7 18:10:45 2019 +0900

Remove compatibility code for older emacsen

* context.el (ConTeXt-mode-common-initialization):
* latex.el (TeX-latex-mode):
* plain-tex.el (TeX-plain-tex-mode, ams-tex-mode):
* tex-info.el (TeX-texinfo-mode):
Use `run-mode-hooks' instead of `TeX-run-mode-hooks'.
* tex.el (TeX-run-mode-hooks): Remove.

---

Summary of changes:
 context.el|  2 +-
 font-latex.el |  2 +-
 latex.el  |  2 +-
 plain-tex.el  |  4 ++--
 tex-info.el   |  2 +-
 tex-style.el  |  2 +-
 tex.el| 29 -
 7 files changed, 15 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit