nordtheme/emacs

Use let* instead of let

gongzhitaao opened this issue ยท 2 comments

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"))

Hi @gongzhitaao ๐Ÿ‘‹, thanks for your contribution ๐Ÿ‘

That sounds like a good and inexpensive improvement ๐Ÿ˜„
Unfortunately I'm not really familiar with Lisp at all so I'll need to check and test if there might be problems when it comes to the special Emacs Lisp syntax derivations.
Maybe someone with more experience post some feedback or some examples/links if it is used in other popular themes too without any disadvantages.