[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question regarding my emacs package
From: |
Madhu |
Subject: |
Re: question regarding my emacs package |
Date: |
Mon, 12 Jun 2023 18:22:25 +0530 |
* 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.
Do others not see this limitation in the compiler?
> Common Lisp has a problem with the interpretation of the lexical
> scoping of the initforms. C-h f cl-defstruct doesn't impose any
> conditions on the SDEFAULT form. Are there any guarantees or
> limitations on the forms that can go into SDEFAULT
- Re: question regarding my emacs package, (continued)
- Re: question regarding my emacs package, Philip Kaludercic, 2023/06/07
- Re: question regarding my emacs package, Philip Kaludercic, 2023/06/07
- Re: question regarding my emacs package, ram, 2023/06/08
- Re: question regarding my emacs package, Philip Kaludercic, 2023/06/07
- Re: question regarding my emacs package, ram, 2023/06/08
- Re: question regarding my emacs package, ram, 2023/06/08
- Re: question regarding my emacs package, ram, 2023/06/08
- Re: question regarding my emacs package, Philip Kaludercic, 2023/06/08
- Re: question regarding my emacs package, ram, 2023/06/09
- Re: question regarding my emacs package, Madhu, 2023/06/11
- Re: question regarding my emacs package,
Madhu <=
- Re: question regarding my emacs package, Andrea Corallo, 2023/06/12
- Re: question regarding my emacs package, Madhu, 2023/06/13
- Re: question regarding my emacs package, Andrea Corallo, 2023/06/13
- Re: question regarding my emacs package, Madhu, 2023/06/13
- Re: question regarding my emacs package, Michael Heerdegen, 2023/06/13
- Re: question regarding my emacs package, Mattias EngdegÄrd, 2023/06/14
- Re: question regarding my emacs package, Michael Heerdegen, 2023/06/15
- Re: question regarding my emacs package, Madhu, 2023/06/16
- Re: question regarding my emacs package, Michael Heerdegen, 2023/06/16
- Re: question regarding my emacs package, ram, 2023/06/17