From: ·····@mama.indstate.edu
Subject: special chars
Date: 
Message-ID: <8368i4$k1n$1@nnrp1.deja.com>
Hello,

I am trying to deal with special char like " in strings.  It gives
error when I use hello_trim function.  could you guide? I am trying to
trim a string if its not beginning with ".

No catch for tag: --cl-block-nil--, "\"hello\""

(defun trim (item)
(interactive "sString:")
(if (char-equal (string-to-char (substring item 0 1)) ?\")   (return
item)
  (if (string-match " *\\([a-zA-Z_]+\\) *" item)
    (match-string 1 item)
  (return item))))

(defun hello_trim()
(interactive)
(trim "\"hello\""))




Sent via Deja.com http://www.deja.com/
Before you buy.

From: Barry Margolin
Subject: Re: special chars
Date: 
Message-ID: <XZx54.27$GG5.1125@burlma1-snr2>
In article <············@nnrp1.deja.com>,  <·····@mama.indstate.edu> wrote:
>I am trying to deal with special char like " in strings.  It gives
>error when I use hello_trim function.  could you guide? I am trying to
>trim a string if its not beginning with ".

I already answered this in detail when you posted it in the Emacs
newsgroup.  The problem has nothing to do with special characters, it's
because the "return" special form doesn't work the way you think.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: ····@my-deja.com
Subject: Re: special chars
Date: 
Message-ID: <83bcga$bgb$1@nnrp1.deja.com>
Hello,

I posted to both newsgroups simulatneously.  Thanks.

I am wondering why do guys learn this some other variant of lisp like
one you know Common Lisp.  Does it have advantages over emacs lisp like
good books, better features etc.

In article <·················@burlma1-snr2>,
  Barry Margolin <······@bbnplanet.com> wrote:
> In article <············@nnrp1.deja.com>,  <·····@mama.indstate.edu>
wrote:
> >I am trying to deal with special char like " in strings.  It gives
> >error when I use hello_trim function.  could you guide? I am trying
to
> >trim a string if its not beginning with ".
>
> I already answered this in detail when you posted it in the Emacs
> newsgroup.  The problem has nothing to do with special characters,
it's
> because the "return" special form doesn't work the way you think.
>
> --
> Barry Margolin, ······@bbnplanet.com
> GTE Internetworking, Powered by BBN, Burlington, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to
the group.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
From: Stig Hemmer
Subject: Re: special chars
Date: 
Message-ID: <ekvln6uzo5m.fsf@verden.pvv.ntnu.no>
····@my-deja.com writes:
> I am wondering why do guys learn this some other variant of lisp
> like one you know Common Lisp.  Does it have advantages over emacs
> lisp like good books, better features etc.

Common Lisp is generally a better language than Emacs Lisp, in several
ways.  Emacs Lisp was made a long time ago and several important
lessons has been learned since then.  Common Lisp is, in part, a
result of those lessons.

On the other hand, if you want to customize Emacs, you have to use
Emacs Lisp.  Likewise, some people learn AutoLisp because they want to
program for AutoCad, and so on.

In an ideal world, one would invent the Perfect Programming Language
and build every application around it.  This is far from an ideal world.

Stig Hemmer,
Jack of a Few Trades.
From: Marco Antoniotti
Subject: Re: special chars
Date: 
Message-ID: <lwk8md9b2i.fsf@parades.rm.cnr.it>
····@my-deja.com writes:

> Hello,
> 
> I posted to both newsgroups simulatneously.  Thanks.
> 
> I am wondering why do guys learn this some other variant of lisp like
> one you know Common Lisp.  Does it have advantages over emacs lisp like
> good books, better features etc.

Do you mean you have not yet stuck

	(require 'cl)

in your .emacs file?  :)

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa