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

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

Re: Emacs Lisp Programming Questions


From: tomas
Subject: Re: Emacs Lisp Programming Questions
Date: Wed, 7 Oct 2009 18:42:26 +0200
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Oct 07, 2009 at 10:40:23AM +0200, David Kastrup wrote:
> "clint.laskowski" <clint.laskowski@gmail.com> writes:

[...]

> > 2. I want to write an interactive Elisp program to remove sequential
> > duplicate lines from a buffer [...]

[...]

> You can just walk through the buffer line and enter each line into a
> hashtable.

If I understood the OP correctly, by "sequential duplicate lines" he
means duplicates which are neighbours. The hash table approach would
remove duplicates over the whole file, AFAIU you.

I.e.

A        A
B        B
B   -->  C
C        B
B        C
C

versus

A        A
B        B
B   -->  C
C
B
C

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKzMTyBcgs9XrR2kYRApIgAJ4r8ZIlKh6YSIN7nB0MOfwDByqyKwCfa/+O
OMKXMs3xvhWibsu1VGYdcQg=
=7OSQ
-----END PGP SIGNATURE-----




reply via email to

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