From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: Emacs Lisp Programming Questions Date: Wed, 7 Oct 2009 18:42:26 +0200 Message-ID: <20091007164226.GA28790@tomas> References: <58e09c24-7598-4920-9318-dc21b9226023@a6g2000vbp.googlegroups.com> <87d44zk360.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254935645 19579 80.91.229.12 (7 Oct 2009 17:14:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Oct 2009 17:14:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: David Kastrup Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 07 19:13:55 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MvZzx-0002SR-CU for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Oct 2009 19:08:21 +0200 Original-Received: from localhost ([127.0.0.1]:57450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvZzw-0006z3-Bl for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Oct 2009 13:08:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvZZh-0001nH-Pq for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 12:41:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvZZd-0001mM-5m for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 12:41:13 -0400 Original-Received: from [199.232.76.173] (port=49953 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvZZc-0001m0-L7 for help-gnu-emacs@gnu.org; Wed, 07 Oct 2009 12:41:08 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:43353 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvZZY-0005Cw-6k; Wed, 07 Oct 2009 12:41:04 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id D6FA990008; Wed, 7 Oct 2009 18:42:26 +0200 (CEST) Content-Disposition: inline In-Reply-To: <87d44zk360.fsf@lola.goethe.zz> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68737 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Oct 07, 2009 at 10:40:23AM +0200, David Kastrup wrote: > "clint.laskowski" 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=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFKzMTyBcgs9XrR2kYRApIgAJ4r8ZIlKh6YSIN7nB0MOfwDByqyKwCfa/+O OMKXMs3xvhWibsu1VGYdcQg=3D =3D7OSQ -----END PGP SIGNATURE-----