Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
Hi Tassilo,

> Tassilo Horn  writes:
> I've done that now, too.  I still can run LaTeX and call the Evince
> viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely on
> `file' anymore but use `TeX-active-master' as suggested by Al Haji-Ali),
> so it seems I haven't broken everything [but possibly something I didn't
> test]...

I tried it and got the following error when I did C-c C-m parbox RET RET:
Debugger entered--Lisp error: (void-variable exit-mark)
  TeX-argument-insert("" nil)
  TeX-arg-string(nil "Width")
  TeX-parse-argument(nil "Width")
  TeX-parse-arguments(([TeX-arg-tb] ["Height"] [TeX-arg-tb "Inner position"] 
"Width" t))
  TeX-parse-macro("parbox" ([TeX-arg-tb] ["Height"] [TeX-arg-tb "Inner 
position"] "Width" t))
  TeX-insert-macro("parbox")
  funcall-interactively(TeX-insert-macro "parbox")
  call-interactively(TeX-insert-macro nil nil)
  command-execute(TeX-insert-macro)

We still have to deal with the variable `exit-mark'.

Regards,
Ikumi Keita



[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 319dde171431ada3954b886f51a851858e25561e

2020-09-05 Thread Tassilo Horn
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, lexical-binding-attempt-1 has been updated
   via  319dde171431ada3954b886f51a851858e25561e (commit)
  from  220ab9ed1b45a4fe3298874af68e71cff2d7c6a5 (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 319dde171431ada3954b886f51a851858e25561e
Author: Tassilo Horn 
Date:   Sat Sep 5 13:25:12 2020 +0200

exit-mark, last-optional-rejected => TeX-{exit-mark,last-optional-rejected} 
and more

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 2c5f269..1fd92e8 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -5355,8 +5355,8 @@ If you add new hooks, you can assume that point is placed 
directly after
 the previous argument, or after the macro name if this is the first
 argument.  Please leave point located after the argument you are
 inserting.  If you want point to be located somewhere else after all
-hooks have been processed, set the value of @code{exit-mark}.  It will
-point nowhere, until the argument hook sets it.
+hooks have been processed, set the value of @code{TeX-exit-mark}.  It
+will point nowhere, until the argument hook sets it.
 
 Some packages provide macros that are rarely useful to non-expert users.
 Those should be marked as expert macros using
diff --git a/latex.el b/latex.el
index 020cd1c..0f9d333 100644
--- a/latex.el
+++ b/latex.el
@@ -1316,9 +1316,9 @@ Just like array and tabular."
   (save-excursion
 (LaTeX-find-matching-begin)
 (end-of-line)
-(let ((exit-mark (if (boundp 'exit-mark)
-exit-mark
-  (make-marker
+(let ((TeX-exit-mark (if (boundp 'TeX-exit-mark)
+TeX-exit-mark
+  (make-marker
   (TeX-parse-arguments args
 
 (defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals 
environment)
@@ -1397,17 +1397,21 @@ out."
   "A list of environments where items have a special syntax.
 The cdr is the name of the function, used to insert this kind of items.")
 
+(defvar LaTeX-insert-item-environment nil
+  "The environment to which an item is going to be inserted.
+Dynamically bound by `LaTeX-insert-item'.")
+
 (defun LaTeX-insert-item ()
   "Insert a new item in an environment.
 You may use `LaTeX-item-list' to change the routines used to insert the item."
   (interactive "*")
-  (let ((environment (LaTeX-current-environment)))
+  (let ((LaTeX-insert-item-environment (LaTeX-current-environment)))
 (when (and (TeX-active-mark)
   (> (point) (mark)))
   (exchange-point-and-mark))
 (unless (bolp) (LaTeX-newline))
-(if (assoc environment LaTeX-item-list)
-   (funcall (cdr (assoc environment LaTeX-item-list)))
+(if (assoc LaTeX-insert-item-environment LaTeX-item-list)
+   (funcall (cdr (assoc LaTeX-insert-item-environment LaTeX-item-list)))
   (TeX-insert-macro "item"))
 (indent-according-to-mode)))
 
@@ -6929,7 +6933,7 @@ functions `TeX-arg-color' (style/color.el) or
   (equal current-prefix-arg '(4)))
  (and (eq TeX-insert-macro-default-style 'mandatory-args-only)
   (null (equal current-prefix-arg '(4
- last-optional-rejected))
+ TeX-last-optional-rejected))
  ,@body))
 
 (defun LaTeX-extract-key-value-label (&optional key num)
diff --git a/style/bicaption.el b/style/bicaption.el
index 8622cd5..f29ccce 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -117,13 +117,13 @@ arguments."
 (when cap-box
   (let* ((TeX-arg-opening-brace "[")
 (TeX-arg-closing-brace "]")
-(last-optional-rejected nil)
+(TeX-last-optional-rejected nil)
 (width (LaTeX-check-insert-macro-default-style
 (completing-read (TeX-argument-prompt t nil "Width")
  (mapcar (lambda (elt) (concat TeX-esc 
(car elt)))
  (LaTeX-length-list)
-(last-optional-rejected (or (not width)
-(and width (string= width ""
+(TeX-last-optional-rejected (or (not width)
+(and width (string= width ""
 (inpos (LaTeX-check-insert-macro-default-style
 (if (and width (not (string-equal width "")))
 (completing-read (TeX-argument-prompt t nil "Inner 
position")
diff --git a/style/booktabs.el b/style/booktabs.el
index 5a58b28..f4e60db 100644
--- a/style/booktabs.el
+++ b/style/booktabs.el
@@ -57,7 +57,7 @@ PROMPT is the value of the prompt to be shown."
 '("toprule" [ "Th

[AUCTeX-commit] GNU AUCTeX branch, lexical-binding-attempt-1, updated. 319dde171431ada3954b886f51a851858e25561e

2020-09-05 Thread Tassilo Horn
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, lexical-binding-attempt-1 has been updated
   via  319dde171431ada3954b886f51a851858e25561e (commit)
  from  220ab9ed1b45a4fe3298874af68e71cff2d7c6a5 (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 319dde171431ada3954b886f51a851858e25561e
Author: Tassilo Horn 
Date:   Sat Sep 5 13:25:12 2020 +0200

exit-mark, last-optional-rejected => TeX-{exit-mark,last-optional-rejected} 
and more

---

Summary of changes:
 doc/auctex.texi|  4 ++--
 latex.el   | 18 +++---
 style/bicaption.el |  6 +++---
 style/booktabs.el  |  2 +-
 style/caption.el   |  6 +++---
 style/color.el |  4 ++--
 style/exam.el  | 20 
 style/floatrow.el  | 10 +-
 style/ifluatex.el  | 52 ++--
 style/xcolor.el| 14 +++---
 tex.el | 35 +--
 11 files changed, 93 insertions(+), 78 deletions(-)


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, lexical-binding-attempt-1, updated. 6fcbaf5ea64b76553ad29437d969c93a2a006cd9

2020-09-05 Thread Tassilo Horn
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, lexical-binding-attempt-1 has been updated
   via  6fcbaf5ea64b76553ad29437d969c93a2a006cd9 (commit)
  from  319dde171431ada3954b886f51a851858e25561e (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 6fcbaf5ea64b76553ad29437d969c93a2a006cd9
Author: Tassilo Horn 
Date:   Sat Sep 5 13:33:41 2020 +0200

Drop LaTeX-insert-item-environment, we don't need it

diff --git a/latex.el b/latex.el
index 0f9d333..2dc00ba 100644
--- a/latex.el
+++ b/latex.el
@@ -1397,21 +1397,17 @@ out."
   "A list of environments where items have a special syntax.
 The cdr is the name of the function, used to insert this kind of items.")
 
-(defvar LaTeX-insert-item-environment nil
-  "The environment to which an item is going to be inserted.
-Dynamically bound by `LaTeX-insert-item'.")
-
 (defun LaTeX-insert-item ()
   "Insert a new item in an environment.
 You may use `LaTeX-item-list' to change the routines used to insert the item."
   (interactive "*")
-  (let ((LaTeX-insert-item-environment (LaTeX-current-environment)))
+  (let ((environment (LaTeX-current-environment)))
 (when (and (TeX-active-mark)
   (> (point) (mark)))
   (exchange-point-and-mark))
 (unless (bolp) (LaTeX-newline))
-(if (assoc LaTeX-insert-item-environment LaTeX-item-list)
-   (funcall (cdr (assoc LaTeX-insert-item-environment LaTeX-item-list)))
+(if (assoc environment LaTeX-item-list)
+   (funcall (cdr (assoc environment LaTeX-item-list)))
   (TeX-insert-macro "item"))
 (indent-according-to-mode)))
 
diff --git a/style/exam.el b/style/exam.el
index 7a58e52..1dd7b2b 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -48,27 +48,24 @@
 (dolist (opt LaTeX-article-class-options)
   (add-to-list 'LaTeX-exam-class-options opt))
 
-;; Defined in latex.el and bound by `LaTeX-insert-item'.
-(defvar LaTeX-insert-item-environment)
-
 (defun LaTeX-exam-insert-item ()
-  "Insert a new item in an LaTeX-insert-item-environment from exam class.
+  "Insert a new item in the current environment from exam class.
 Item inserted depends on the environment."
-  (TeX-insert-macro
-   (cond ((string= LaTeX-insert-item-environment "questions")
-  "question")
- ((string= LaTeX-insert-item-environment "parts")
-  "part")
- ((string= LaTeX-insert-item-environment "subparts")
-  "subpart")
- ((string= LaTeX-insert-item-environment "subsubparts")
-  "subsubpart")
-((member LaTeX-insert-item-environment
-  '("choices" "oneparchoices"
-   "checkboxes" "oneparcheckboxes"))
- "choice")
- ;; Fallback
- (t "item"
+  (let ((env (LaTeX-current-environment)))
+(TeX-insert-macro
+ (cond ((string= env "questions")
+"question")
+   ((string= env "parts")
+"part")
+   ((string= env "subparts")
+"subpart")
+   ((string= env "subsubparts")
+"subsubpart")
+  ((member env '("choices" "oneparchoices"
+ "checkboxes" "oneparcheckboxes"))
+   "choice")
+   ;; Fallback
+   (t "item")
 
 (defun LaTeX-exam-insert-label (_optional &optional name type)
   "Indent the line and query/insert a label incl. the \"\\label\" macro.

---

Summary of changes:
 latex.el  | 10 +++---
 style/exam.el | 35 ---
 2 files changed, 19 insertions(+), 26 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, lexical-binding-attempt-1, updated. 6fcbaf5ea64b76553ad29437d969c93a2a006cd9

2020-09-05 Thread Tassilo Horn
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, lexical-binding-attempt-1 has been updated
   via  6fcbaf5ea64b76553ad29437d969c93a2a006cd9 (commit)
  from  319dde171431ada3954b886f51a851858e25561e (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 6fcbaf5ea64b76553ad29437d969c93a2a006cd9
Author: Tassilo Horn 
Date:   Sat Sep 5 13:33:41 2020 +0200

Drop LaTeX-insert-item-environment, we don't need it

---

Summary of changes:
 latex.el  | 10 +++---
 style/exam.el | 35 ---
 2 files changed, 19 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

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


Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Ikumi Keita  writes:

Hi Keita-san,

>> I've done that now, too.  I still can run LaTeX and call the Evince
>> viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely
>> on `file' anymore but use `TeX-active-master' as suggested by Al
>> Haji-Ali), so it seems I haven't broken everything [but possibly
>> something I didn't test]...
>
> I tried it and got the following error when I did C-c C-m parbox RET RET:
> Debugger entered--Lisp error: (void-variable exit-mark)
>   TeX-argument-insert("" nil)
>   TeX-arg-string(nil "Width")
>   TeX-parse-argument(nil "Width")
>   TeX-parse-arguments(([TeX-arg-tb] ["Height"] [TeX-arg-tb "Inner position"]
> "Width" t))
>   TeX-parse-macro("parbox" ([TeX-arg-tb] ["Height"] [TeX-arg-tb "Inner
> position"] "Width" t))
>   TeX-insert-macro("parbox")
>   funcall-interactively(TeX-insert-macro "parbox")
>   call-interactively(TeX-insert-macro nil nil)
>   command-execute(TeX-insert-macro)
>
> We still have to deal with the variable `exit-mark'.

I just did so (-> TeX-exit-mark), and also with last-optional-rejected
(-> TeX-last-optional-rejected).  Inserting a parbox works again. :-)

I'm sure there is other breakage hidden to be revealed.

Thanks for giving it a try!

  Tassilo




Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
Hi Tassilo,

> Tassilo Horn  writes:
> I just did so (-> TeX-exit-mark), and also with last-optional-rejected
> (-> TeX-last-optional-rejected).  Inserting a parbox works again. :-)

Now it works for me, too, thanks!

By the way, I think this part should be improved:
--
modified   latex.el
@@ -1316,9 +1316,9 @@ Just like array and tabular."
   (save-excursion
 (LaTeX-find-matching-begin)
 (end-of-line)
-(let ((exit-mark (if (boundp 'exit-mark)
-exit-mark
-  (make-marker
+(let ((TeX-exit-mark (if (boundp 'TeX-exit-mark)
+TeX-exit-mark
+  (make-marker
   (TeX-parse-arguments args
--
Shouldn't this boundp test be markerp because TeX-exit-mark is now bound
always?

Regards,
Ikumi Keita



Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Mosè Giordano
Hi Tassilo,

thank you so much for taking the time to look into this!

Running `make check` locally on this branch I get

SUMMARY OF TEST RESULTS
---
Files examined: 13
Ran 42 tests, 35 results as expected, 4 unexpected, 3 skipped
2 files contained unexpected results:
  tex/command-expansion.log
  japanese/preview-latex.log
make[1]: *** [Makefile:85: check-doit] Error 1

It's probably worth checking the failing tests, at least some of them
are related.

Bye,
Mosè

On Fri, 4 Sep 2020 at 17:37, Tassilo Horn  wrote:
>
> Hi all,
>
> on the new branch lexical-binding-attempt-1, I've squashed all
> "reference to free variable" warnings in latex.el and context.el by
> declaring them properly with defvars and with a prefix, and changing all
> users.
>
> This affects in latex.el
>
>   LaTeX-done-mark
>   LaTeX-level
>   LaTeX-name
>   LaTeX-title
>   LaTeX-toc
>
> and in context.el
>
>   ConTeXt-done-mark
>   ConTeXt-level
>   ConTeXt-name
>   ConTeXt-title
>   ConTeXt-reference
>
> which were previously neither prefixed nor declared.
>
> Of course, that is an incompatible change which will break user
> LaTeX-section-hook functions which accessed those unprefixed variables.
> But if we want to go lexical-binding (which I think we should), there's
> no way around that.
>
> Of course, I did not test too much (and ConTeXt not at all), so it would
> be great if you could give it a whirl.  There are chances that I might
> have changed an occurrence which I shouldn't have.
>
> We still have such issues in tex.el with the variable `file' and some
> others.  If someone wants to take care of that in a similar vein, feel
> free to give it a shot.
>
> Bye,
> Tassilo
>
>
>



Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
> Ikumi Keita  writes:
> By the way, I think this part should be improved:
> --
> modified   latex.el
> @@ -1316,9 +1316,9 @@ Just like array and tabular."
>(save-excursion
>  (LaTeX-find-matching-begin)
>  (end-of-line)
> -(let ((exit-mark (if (boundp 'exit-mark)
> -  exit-mark
> -(make-marker
> +(let ((TeX-exit-mark (if (boundp 'TeX-exit-mark)
> +  TeX-exit-mark
> +(make-marker
>(TeX-parse-arguments args
> --
> Shouldn't this boundp test be markerp because TeX-exit-mark is now bound
> always?

Or it can just be
   (or TeX-exit-mark
   (make-marker))
for simplicity.

Bye,
Ikumi Keita



Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Ikumi Keita  writes:

>> --
>> modified   latex.el
>> @@ -1316,9 +1316,9 @@ Just like array and tabular."
>>(save-excursion
>>  (LaTeX-find-matching-begin)
>>  (end-of-line)
>> -(let ((exit-mark (if (boundp 'exit-mark)
>> - exit-mark
>> -   (make-marker
>> +(let ((TeX-exit-mark (if (boundp 'TeX-exit-mark)
>> + TeX-exit-mark
>> +   (make-marker
>>(TeX-parse-arguments args
>> --
>> Shouldn't this boundp test be markerp because TeX-exit-mark is now bound
>> always?
>
> Or it can just be
>(or TeX-exit-mark
>(make-marker))
> for simplicity.

Right, just go ahead. ;-)

Bye,
Tassilo




Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Tassilo Horn
Mosè Giordano  writes:

Mosè,

> thank you so much for taking the time to look into this!

Thanks for the compliments. :-)

> Running `make check` locally on this branch I get
>
> SUMMARY OF TEST RESULTS
> ---
> Files examined: 13
> Ran 42 tests, 35 results as expected, 4 unexpected, 3 skipped
> 2 files contained unexpected results:
>   tex/command-expansion.log
>   japanese/preview-latex.log
> make[1]: *** [Makefile:85: check-doit] Error 1
>
> It's probably worth checking the failing tests, at least some of them
> are related.

I was too chickenhearted to run the tests.  I'll have a look at the
failing ones when I find some time.  (Of course, everybody is welcomed
to clean up after me.)

Bye,
Tassilo




[AUCTeX-commit] GNU AUCTeX branch, lexical-binding-attempt-1, updated. caf52d762545178268f5448c464e58cffaf5d5d2

2020-09-05 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, lexical-binding-attempt-1 has been updated
   via  caf52d762545178268f5448c464e58cffaf5d5d2 (commit)
  from  6fcbaf5ea64b76553ad29437d969c93a2a006cd9 (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 caf52d762545178268f5448c464e58cffaf5d5d2
Author: Ikumi Keita 
Date:   Sun Sep 6 00:18:33 2020 +0900

Arrange test condition

* latex.el (LaTeX-env-args): Just test nil or not since
`TeX-exit-mark' is now always bound.

---

Summary of changes:
 latex.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


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, lexical-binding-attempt-1, updated. caf52d762545178268f5448c464e58cffaf5d5d2

2020-09-05 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, lexical-binding-attempt-1 has been updated
   via  caf52d762545178268f5448c464e58cffaf5d5d2 (commit)
  from  6fcbaf5ea64b76553ad29437d969c93a2a006cd9 (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 caf52d762545178268f5448c464e58cffaf5d5d2
Author: Ikumi Keita 
Date:   Sun Sep 6 00:18:33 2020 +0900

Arrange test condition

* latex.el (LaTeX-env-args): Just test nil or not since
`TeX-exit-mark' is now always bound.

diff --git a/latex.el b/latex.el
index 2dc00ba..f74c76d 100644
--- a/latex.el
+++ b/latex.el
@@ -1316,9 +1316,8 @@ Just like array and tabular."
   (save-excursion
 (LaTeX-find-matching-begin)
 (end-of-line)
-(let ((TeX-exit-mark (if (boundp 'TeX-exit-mark)
-TeX-exit-mark
-  (make-marker
+(let ((TeX-exit-mark (or TeX-exit-mark
+(make-marker
   (TeX-parse-arguments args
 
 (defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals 
environment)

---

Summary of changes:
 latex.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

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


Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Ikumi Keita
> Tassilo Horn  writes:
>> Or it can just be
>> (or TeX-exit-mark
>> (make-marker))
>> for simplicity.

> Right, just go ahead. ;-)

Done.

Bye,
Ikumi Keita



Re: Onwards to lexical binding (attempt 1)

2020-09-05 Thread Arash Esbati
Hi Tassilo,

Tassilo Horn  writes:

> Tassilo Horn  writes:
>
>> We still have such issues in tex.el with the variable `file' and some
>> others.
>
> I've done that now, too.  I still can run LaTeX and call the Evince
> viewer (TeX-evince-sync-view and TeX-pdf-tools-sync-view don't rely on
> `file' anymore but use `TeX-active-master' as suggested by Al Haji-Ali),
> so it seems I haven't broken everything [but possibly something I didn't
> test]...

Many thanks for doing this.  I agree, we should take the step towards
lexical binding.  Should all style files also go in this direction?

I can silence some other compiler warnings in tex.el with this small
patch:

diff --git a/tex.el b/tex.el
index 41e41502..c797e286 100644
--- a/tex.el
+++ b/tex.el
@@ -107,6 +107,7 @@
 ;; Others:
 (defvar tex--prettify-symbols-alist)   ; tex-mode.el
 (defvar Info-file-list-for-emacs)  ; info.el
+(defvar dbus-debug) ; dbusbind.c and dbus.el

 (defgroup TeX-file nil
   "Files used by AUCTeX."
@@ -3618,11 +3619,11 @@ Unless optional argument COMPLETE is non-nil, ``: 
'' will be appended."
(TeX-parse-argument optional (car args))
   (TeX-parse-argument optional args

-(defun TeX-arg-literal (optional &rest args)
+(defun TeX-arg-literal (_optional &rest args)
   "Insert its arguments ARGS into the buffer.
 Used for specifying extra syntax for a macro.  The compatibility
 argument OPTIONAL is ignored."
-  (apply 'insert args))
+  (apply #'insert args))


 ;;; Font Locking

I'm not sure about this warning:

In toplevel form:
tex.el:2023:1: Warning: Unused lexical argument `viewer' Disable showing
Disable logging

which applies to

(defun TeX-source-specials-view-expand-options (&optional viewer)
  "Return source specials command line option for viewer command.
The return value depends on the values of
`TeX-source-correlate-mode' and
`TeX-source-correlate-method-active'.  If those are nil or not
`source-specials' respectively, an empty string will be
returned."
  (if (and TeX-source-correlate-mode
   (eq (TeX-source-correlate-method-active) 'source-specials))
  (concat TeX-source-specials-view-position-flags
  (when (TeX-source-correlate-server-enabled-p)
(concat " " TeX-source-specials-view-editor-flags)))
""))

Is prefixing viewer with _ also the solution here?  I'm not familiar
with the usage of this function.

Other warnings from latex.el can be fixed easily.

Best, Arash



[AUCTeX-commit] GNU AUCTeX branch, lexical-binding-attempt-1, updated. da14207f1dfb20327aedb58dee0753b9f684ea74

2020-09-05 Thread Arash Esbati
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, lexical-binding-attempt-1 has been updated
   via  da14207f1dfb20327aedb58dee0753b9f684ea74 (commit)
  from  caf52d762545178268f5448c464e58cffaf5d5d2 (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 da14207f1dfb20327aedb58dee0753b9f684ea74
Author: Arash Esbati 
Date:   Sat Sep 5 23:10:58 2020 +0200

; Silence the compiler

* latex.el (TeX-arg-conditional, TeX-arg-verb, TeX-arg-pair): Mark
unused parameters and adjust docstrings accordingly.

---

Summary of changes:
 latex.el | 24 +---
 1 file changed, 9 insertions(+), 15 deletions(-)


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, lexical-binding-attempt-1, updated. da14207f1dfb20327aedb58dee0753b9f684ea74

2020-09-05 Thread Arash Esbati
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, lexical-binding-attempt-1 has been updated
   via  da14207f1dfb20327aedb58dee0753b9f684ea74 (commit)
  from  caf52d762545178268f5448c464e58cffaf5d5d2 (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 da14207f1dfb20327aedb58dee0753b9f684ea74
Author: Arash Esbati 
Date:   Sat Sep 5 23:10:58 2020 +0200

; Silence the compiler

* latex.el (TeX-arg-conditional, TeX-arg-verb, TeX-arg-pair): Mark
unused parameters and adjust docstrings accordingly.

diff --git a/latex.el b/latex.el
index f74c76d..0032157 100644
--- a/latex.el
+++ b/latex.el
@@ -1961,14 +1961,12 @@ It will setup BibTeX to store keys in an auto file."
 
 ;;; Macro Argument Hooks
 
-(defun TeX-arg-conditional (optional expr then else)
+(defun TeX-arg-conditional (_optional expr then else)
   "Implement if EXPR THEN ELSE.
 
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument, otherwise as a mandatory one.
-
-If EXPR evaluate to true, parse THEN as an argument list, else parse
-ELSE as an argument list."
+If EXPR evaluate to true, parse THEN as an argument list, else
+parse ELSE as an argument list.  The compatibility argument
+OPTIONAL is ignored."
   (TeX-parse-arguments (if (eval expr) then else)))
 
 (defun TeX-arg-eval (optional &rest args)
@@ -2673,10 +2671,9 @@ the list of defined pagestyles."
   :group 'LaTeX-macro
   :type 'character)
 
-(defun TeX-arg-verb (optional &optional _ignore)
+(defun TeX-arg-verb (_optional &optional _ignore)
   "Prompt for delimiter and text.
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument, otherwise as a mandatory one.  IGNORE is ignored."
+The compatibility argument OPTIONAL and IGNORE are ignored."
   (let ((del (read-quoted-char
  (concat "Delimiter (default "
  (char-to-string LaTeX-default-verb-delimiter) "): "
@@ -2721,16 +2718,13 @@ argument in delimiters like \"\| \|\" or braces \"\{ 
\}\"."
 (unless (= del ?\{)
   (setq LaTeX-default-verb-delimiter del
 
-(defun TeX-arg-pair (optional first second)
+(defun TeX-arg-pair (_optional first second)
   "Insert a pair of number, prompted by FIRST and SECOND.
 
 The numbers are surounded by parenthesizes and separated with a
-comma.
-
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument, otherwise as a mandatory one."
+comma.  The compatibility argument OPTIONAL is ignored."
   (insert "(" (TeX-read-string (concat first  ": ")) ","
- (TeX-read-string (concat second ": ")) ")"))
+ (TeX-read-string (concat second ": ")) ")"))
 
 (defun TeX-arg-size (optional)
   "Insert width and height as a pair.

---

Summary of changes:
 latex.el | 24 +---
 1 file changed, 9 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX

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