Skip to content

expressions inside setq #523

@jgarte

Description

@jgarte

Hi, I get this error when opening emacs:

Error (leaf): Error occurs in leaf block: scheme
Error (leaf): Attempt modify list;  Please check your specification
Error (leaf): Error occurs in leaf block: scheme
Error (leaf): Attempt modify list;  Please check your specification

I'd like to do something like the following:

(leaf scheme
  :doc "the universe is made of atoms and pairs"
    :setq
     ((home-sweet-home . (getenv "HOME")
     (scheme-program-name . (concat home-sweet-home ".guix-profile/bin/guile"))))

This is what macroexpand outputs:

(prog1 'scheme
  (leaf-handler-leaf-path scheme)
  (leaf-handler-leaf-protect scheme
    (setq home-sweet-home nil)
    (setq getenv nil)
    (setq scheme-program-name nil)
    (setq concat nil)
    (setq home-sweet-home nil)))

Or

(prog1 'scheme
  (let
      ((file
        (leaf-this-file)))
    (if
        (boundp 'leaf--paths)
        nil
      (defvar leaf--paths nil))
    (if file
        (progn
          (add-to-list 'leaf--paths
                       (cons 'scheme file)))))
  (condition-case err
      (progn
        (setq home-sweet-home nil)
        (setq getenv nil)
        (setq scheme-program-name nil)
        (setq concat nil)
        (setq home-sweet-home nil))
    (error
     (display-warning 'leaf
                      (format "Error in `scheme' block.  Error msg: %s"
                              (error-message-string err))))))

Do you happen to know what is wrong with my code? Why are the values of setq set to nil...? 🦆

What would be the best way to debug this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions