[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string func to use in .emacs
From: |
Eli Zaretskii |
Subject: |
Re: string func to use in .emacs |
Date: |
26 Jan 2004 09:03:13 +0200 |
> From: Peter Wu <peterwu@hotmail.com>
> Newsgroups: gnu.emacs.help
> Date: Sun, 25 Jan 2004 22:16:02 -0500
>
> > (defun string-trim-right (str)
> > (with-temp-buffer
> > (insert str)
> > (delete-trailing-whitespace)
> > (buffer-string)))
>
> I tried to use the func and got an error:
>
> Symbol's value as variable is void: string-trim-right
>
> My code:
>
> (string-trim-right("Emacs "))
> => "Emacs" (the expected output)
You need to evaluate the function's definition, otherwise how will
Emacs know what is string-trim-right? To do that, put the cursor
after the right closing paren of the function, and type "C-x C-e".
- string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Eli Zaretskii, 2004/01/25
- Message not available
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Mario Domgörgen, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Jesper Harder, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/25
- Re: string func to use in .emacs, Jesper Harder, 2004/01/25
- Re: string func to use in .emacs, Peter Wu, 2004/01/26
- Re: string func to use in .emacs,
Eli Zaretskii <=
- Re: string func to use in .emacs, Eli Zaretskii, 2004/01/25