home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!netsys!agate!ames!think.com!sdd.hp.com!nobody
- From: denson@sdd.hp.com (Craig Denson)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: LISP - Don't use it.
- Date: 11 Nov 1992 12:33:25 -0800
- Organization: Hewlett Packard, San Diego Division
- Lines: 49
- Message-ID: <1drqmlINN4fb@hpsdln.sdd.hp.com>
- References: <1992Nov6.220216.2313@sth.frontec.se> <BxBn4w.7oM@fc.hp.com> <CASEY.92Nov9143047@anxiety.lexmark.lex.usa.na>
- NNTP-Posting-Host: hpsdln.sdd.hp.com
-
- In article <CASEY.92Nov9143047@anxiety.lexmark.lex.usa.na> pacasey@lexmark.com writes:
-
- >So, I'd like to know reasons why other people like ELisp, or Lisp!
-
- ok,
- an example of some working elisp. it seems to me that, even if you
- have only the foggiest idea of what a regular expression is,
- - you can follow what's going on here fairly easily. i.e. simplicity
- - the built-in functions are powerful, when it's byte-compiled, it's
- relatively fast,
- - when you use it in batches with gnuclient it's even faster.
- - it integrates well in the un*x environment and i assume that with
- the arexx version of gnuclient it works well in the amiga
- environment (i have a stock 1.3 A2000, so i don't use it at home.)
-
- craig
-
- ------------------------------
- (defun clean_clpa ()
-
- ; get rid of sql junk
-
- (beginning-of-buffer)
- (flush-lines "---+" )
- (flush-lines "affected" )
- (flush-lines "END OF QUERY" )
-
- ; flush leading and trailing whitespace
-
- (beginning-of-buffer)
- (replace-regexp "^[ ]+" "")
- (beginning-of-buffer)
- (replace-regexp "[ ]+$" "")
-
- ; compress blanks in front of date into 1
-
- (beginning-of-buffer)
- (replace-regexp " +\\([0-9]+ 199\\)" " \\1")
-
- [... stuff deleted ...]
-
- )
-
- ; do all of above and then write buffer to temporary file
-
- (clean_clpa)
- (write-region (point-min) (point-max) "/tmp/cp.txt" nil "NO MSG")
-
-
-