[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use emacs as a lisp interpreter?
From: |
Pascal Bourguignon |
Subject: |
Re: How to use emacs as a lisp interpreter? |
Date: |
Mon, 08 Aug 2005 03:19:48 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Erik the Red" <the.g.man.x@gmail.com> writes:
> Topic question.
M-x ielm RET
But actually, you can just type in any buffer s-expressions and type
C-u C-x C-e to get the result.
For exmaple, in this gnus article, if I type:
(mapcar (lambda (x) (* x 2)) '(1 2 3)) C-u C-x C-e
I get:
(2 4 6)
Or if I type: (format "\n\n ** Hello %s! **\n\n"
(save-excursion
(goto-char 0)
(re-search-forward "\"\\([^\"]*\\)\"" nil nil 2)
(match-string-no-properties 1))) C-u C-x C-e
I get:
"
** Hello Erik the Red! **
"
--
"A TRUE Klingon warrior does not comment his code!"