bug-recutils
[Top][All Lists]
Advanced

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

rec-mode: Symbol’s value as variable is void: res-type


From: Liliana Marie Prikler
Subject: rec-mode: Symbol’s value as variable is void: res-type
Date: Fri, 25 Mar 2022 14:26:34 +0100
User-agent: Evolution 3.42.1

Hi Giovanni,

I'm experiencing something similar (also using recutils with Guix).  It
turns out that the issue is in rec-field-type.  The original is written
as follows:

--8<---------------cut here---------------start------------->8---
    (if-let* ((descriptor (rec-current-record-descriptor))
              (types (rec-record-assoc "%type" descriptor))
              res-type)
      ...)
--8<---------------cut here---------------end--------------->8---


Inside my init.el, I redefined it to the following (using an override
advice):
--8<---------------cut here---------------start------------->8---
    (and-let* ((descriptor (rec-current-record-descriptor))
               (types (rec-record-assoc "%type" descriptor)))
      (let (res-type) 
        ...))
--8<---------------cut here---------------end--------------->8---

It appears as though the implementation assumes that if-let* can
introduce new variables, which at least in Emacs 27.2 it does not.  I
have yet to observe bugs in my implementation, but that doesn't mean
there are none, so use with care.

Cheers



reply via email to

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