emacs-devel
[Top][All Lists]
Advanced

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

Re: question regarding my emacs package


From: Andrea Corallo
Subject: Re: question regarding my emacs package
Date: Mon, 12 Jun 2023 12:40:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Madhu <enometh@meer.net> writes:

> * Madhu <m37csacjku.fsf@leonis4.robolove.meer.net> :
> Wrote on Sun, 11 Jun 2023 17:11:21 +0530:
>
>> [Question about cl-defstruct]
>>
>>
>> I tried loading the file from github on emacs master and it fails when
>> trying to compile
>>
>> ```
>> (defun breadcrumbs--drop ()
>>   "Track the buffer position as a `breadcrumbs--breadcrumb'.
>>
>> If this has already been tracked, move an existing one in `breadcrumbs-ring' 
>> to head."
>>   (let* ((breadcrumb (make-breadcrumbs--breadcrumb))
>>          (index (ring-member breadcrumbs-ring breadcrumb)))
>> ```
>>
>>
>> with
>> ```
>> Debugger entered--Lisp error: (wrong-type-argument stringp 
>> (buffer-file-name))
>>   make-breadcrumbs--breadcrumb--cmacro((make-breadcrumbs--breadcrumb))
>>   apply(make-breadcrumbs--breadcrumb--cmacro (make-breadcrumbs--breadcrumb) 
>> nil)
>>   macroexp--compiler-macro(make-breadcrumbs--breadcrumb--cmacro 
>> (make-breadcrumbs--breadcrumb))
>> ```
>>
>> The cl-defstruct slot has an initform "(buffer-file-name)" which seems
>> legit since it takes an optional argument.
>>
>> However when I change the form to (buffer-file-name nil) as below, it
>> loads
>>
>> ```
>> (cl-defstruct breadcrumbs--breadcrumb
>>   (buffer-file-name
>>    (buffer-file-name nil)
>>    :documentation "The file backing the breadcrumb.")
>> ```
>
>
> So with my emacs-30 nativecomp this just doesnt work. the
> buffer-file-name slot of the cl-defstruct has to be changed to
> buffer-file-name-1 (and the corresponding accessors to
> breadcrumbs--breadcrumb-buffer-file-name-1) throughout the file.

Does it works on the same Emacs codebase without native compilation?

Thanks

  Andrea



reply via email to

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