Skip to content

Use let* instead of let #96

@gongzhitaao

Description

@gongzhitaao

https://github.com/arcticicestudio/nord-emacs/blob/d828752e270978a56bde19986c98b1bbe8f51386/nord-theme.el#L101

It would be much easier and less error-prone if we use let* instead of let. let* allows to use the variable defined before the current line. For example:

(let* ((class '((class color) (min-colors 89)))
  ;; omit lines
  (nord12 (if (nord-display-truecolor-or-graphic-p) "#D08770" "brightyellow"))
  ;; omit lines
  ;; (nord-annotation (if (nord-display-truecolor-or-graphic-p) "#D08770 "brightyellow")) <-- original
  (nord-annotation (if (nord-display-truecolor-or-graphic-p) nord12 "brightyellow"))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions