auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 6b5f00bf: Unquote lambdas in font-latex.el & tex-bar.el; add


From: Tassilo Horn
Subject: Re: master 6b5f00bf: Unquote lambdas in font-latex.el & tex-bar.el; add some FIXMEs
Date: Tue, 30 Aug 2022 08:07:32 +0200
User-agent: mu4e 1.9.0; emacs 29.0.50

Arash Esbati <arash@gnu.org> writes:

> After this change, the compiler says:
>
>   In toplevel form:
>   tex-bar.el:481:34: Warning: reference to free variable
>   `LaTeX-symbols-active-menuitem'
>
> Is anybody familiar with this code in order to pacify this?
>
>   git grep LaTeX-symbols-active-menuitem
>
> doesn't show anything useful.

And neither does it seem to be generated by `LaTeX-install-toolbar'.  So
it's probably a bug which Stefan's change caught.

And when I enable latex-symbols-experimental in customize for
TeX-bar-LaTeX-buttons and then run LaTeX-install-toolbar, I get this
error:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument sequencep \,)
  #f(compiled-function (&rest ignore) #<bytecode -0x1ff31a58ef856dbb>)()
  toolbarx-eval-function-or-symbol(#f(compiled-function (&rest ignore) 
#<bytecode -0x1ff31a58ef856dbb>) #<subr 
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_8>)
  toolbarx-test-string-or-nil(#f(compiled-function (&rest ignore) #<bytecode 
-0x1ff31a58ef856dbb>))
  toolbarx-emacs-add-button(...)
  toolbarx-emacs-refresh-process-button-or-insert-list(...)
  toolbarx-emacs-refresh(nil)
  toolbarx-refresh(nil)
  toolbarx-install-toolbar(...)
  LaTeX-install-toolbar()
  funcall-interactively(LaTeX-install-toolbar)
  command-execute(LaTeX-install-toolbar record)
  execute-extended-command(nil "LaTeX-install-toolbar" nil)
  funcall-interactively(execute-extended-command nil "LaTeX-install-toolbar" 
nil)
  command-execute(execute-extended-command)
--8<---------------cut here---------------end--------------->8---

The byte-code of the erroring function is:

--8<---------------cut here---------------start------------->8---
byte code:
  doc:   ...
  args: (&rest rest)
0       constant  "Turn "
1       varref    LaTeX-symbols-toolbar-visible-flag
2       goto-if-nil 1
5       constant  "off "
6       goto      2
9:1     constant  "on "
10:2    constant  "the toolbar of LaTeX symbols (current class: "
11      varref    LaTeX-symbols-active-menuitem
12      sub1      
13      constant  (\, list-strings)      ; <=== Error here!
14      nth       
15      constant  ")"
16      concatN   5
18      return    
--8<---------------cut here---------------end--------------->8---

That's this :help function in LaTeX-symbols-toolbar-switch-contents:

--8<---------------cut here---------------start------------->8---
       :help ,(lambda (&rest _ignore)
                (concat "Turn "
                        (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
                        "the toolbar of LaTeX symbols (current class: "
                        (nth (1- LaTeX-symbols-active-menuitem)
                             (quote ,list-strings))
                        ")")))
--8<---------------cut here---------------end--------------->8---

The list-strings variable is let-bound around the complete defconst
LaTeX-symbols-toolbar-switch-contents.  I guess it should become
(quote ("foo" "bar" "baz")) instead of (quote \, list-strings).  Stefan,
what's the issue here?

Bye,
Tassilo



reply via email to

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