help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: let*: Wrong type argument: stringp, nil


From: Emanuel Berg
Subject: Re: let*: Wrong type argument: stringp, nil
Date: Wed, 29 Sep 2021 05:57:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hongyi Zhao wrote:

>   (defun try/pyvenv-workon ()
>     (when (and (buffer-file-name)
>                (locate-dominating-file (buffer-file-name) ".python-version"))
>       (let ((file (concat (locate-dominating-file (buffer-file-name)
> ".python-version") ".python-version")))
>         (pyvenv-workon
>           (with-temp-buffer
>             (insert-file-contents file)
>             (nth 0 (split-string (buffer-string))))))))

Use `let' so you don't have to hard-code the same data three
times.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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