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

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

Re: "Wrong type argument: stringp, nil"??


From: marco . wahl
Subject: Re: "Wrong type argument: stringp, nil"??
Date: 28 Aug 2006 00:09:06 -0700
User-agent: G2/0.2

Johs wrote:
> I have an .emacs file that only contains:
>
> (if(string-match "^app"(getenv "HOSTNAME"))
> (add-hook 'text-mode-hook 'flyspell-mode))
>
> But when I start emacs I get the error:
>
> "Wrong type argument: stringp, nil"
>
> If I comment out the above two lines I get no error.

> Any ideas?

The part

(getenv "HOSTNAME")

seems to return nil.  You can check this by evaluating this part.  I
recommend you to refine your code to handle that nil-case.

Possibly it suffices for your case to set the environment-variable
HOSTNAME to the right value.


Best wishes



reply via email to

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