unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: martin rudalics <rudalics@gmx.at>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Delayed warnings
Date: Thu, 28 Apr 2011 00:11:41 +0200	[thread overview]
Message-ID: <BANLkTikERqBX7cO7i4WzWy3aYvCi1bwUWw@mail.gmail.com> (raw)
In-Reply-To: <jwvmxjbppng.fsf-monnier+emacs@gnu.org>

On Wed, Apr 27, 2011 at 19:32, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> You might want to add some code to avoid/detect repetitions.

(delete-dups '(A A B A B B C B C C D)) => A B C D

or

(uniqify '(A A B A B B C B C C D)) => A B A B C B C D

?

    Juanma


P.S.: Assuming

(defun uniqify (list)
  "Destructively remove consecutive `equal' duplicates from LIST.
Store the result in LIST and return it.  LIST must be a proper list."
  (let ((l list))
    (while (cdr l)
      (if (equal (car l) (cadr l))
          (setcdr l (cddr l))
        (setq l (cdr l))))
    list))

which should be in subr.el, because its functionality is duplicated in
quite a few .el files.



  reply	other threads:[~2011-04-27 22:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-20  5:44 Delayed warnings Juanma Barranquero
2011-03-21  8:01 ` martin rudalics
2011-03-21 12:01   ` Juanma Barranquero
2011-03-21 13:17     ` martin rudalics
2011-03-21 13:43       ` Eli Zaretskii
2011-03-21 18:06         ` martin rudalics
2011-03-21 14:48       ` Juanma Barranquero
2011-03-21 18:06         ` martin rudalics
2011-03-21 20:19           ` Juanma Barranquero
2011-03-21 22:05             ` Stefan Monnier
2011-03-22  7:59               ` martin rudalics
2011-03-22 11:59               ` Juanma Barranquero
2011-03-23 13:50               ` Jeff Sparkes
2011-03-25 13:10               ` Juanma Barranquero
2011-04-27  0:55                 ` Juanma Barranquero
2011-04-27  3:05                   ` Eli Zaretskii
2011-04-27 11:27                     ` Juanma Barranquero
2011-04-27 17:32                   ` Stefan Monnier
2011-04-27 22:11                     ` Juanma Barranquero [this message]
2011-04-28  0:40                       ` Stefan Monnier
2011-04-28  0:59                         ` Juanma Barranquero
2011-04-28 15:26                           ` Stefan Monnier
2011-04-28 16:22                             ` Juanma Barranquero
2011-04-28 18:39                               ` Stefan Monnier
2011-05-08 17:58                               ` Chong Yidong
2011-05-08 18:43                                 ` Juanma Barranquero
2011-05-09 14:15                                   ` Stefan Monnier
2011-05-09 18:28                                   ` Richard Stallman
2011-03-22  7:58             ` martin rudalics
2011-03-22 12:04               ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikERqBX7cO7i4WzWy3aYvCi1bwUWw@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).