bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer'


From: Andrea Corallo
Subject: bug#67900: 30.0.50; Emacs Crahes When Executing Command `consult-buffer'
Date: Mon, 08 Jan 2024 05:35:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Chang Xiaoduan <drcxd@sina.com> writes:

> Hello Andrea,
>
> After some further test, I have found that the crash is reproducible
> when the declare form is absent from the function definition inside the
> macro definition.

You mean with the whole compilation unit is compiled at speed 2?

> #+begin_src emacs-lisp
> (defmacro consult--define-state (type)
>   "Define state function for TYPE."
>   (declare (speed 1))
>   `(defun ,(intern (format "consult--%s-state" type)) ()
>      ,(format "State function for %ss with preview.
> The result can be passed as :state argument to `consult--read'." type)
>      (declare (speed 1)) ;; If absent, crash is reproducible
>      (consult--state-with-return (,(intern (format "consult--%s-preview" 
> type)))
>                                  #',(intern (format "consult--%s-action" 
> type)))))
> #+end_src
>
> Even if I use `emacs-lisp-macroexpand' to expand all instances of this
> macro, and add declare form to these functions, missing the declare form
> in the function definition inside the macro definition still triggers
> the crash.

Mmmh not sure I understand, if you macro expanded all the instances of
this macro how can the macro matter given it's never called?

> In fact, if the functions generated from the macro expansion
> contains the declare form seems has nothing to do with the crash. Do you
> have any idea why this is happening and how it may be fixed?

I think we have to really understand what's happening here and if what
you've observed is reproducible cause it does not make much sense to me
ATM.

Thanks for your investigation

  Andrea





reply via email to

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