unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Aurélien Aptel" <aurelien.aptel+emacs@gmail.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Trying coccinelle
Date: Mon, 18 Jun 2012 21:47:34 +0200	[thread overview]
Message-ID: <CA+5B0FPpM7CSbvxFyz7UzUF-JHodECrhm_8q-yWLLtP=EMiEbw@mail.gmail.com> (raw)
In-Reply-To: <4FDF5AF2.2080503@yandex.ru>

On Mon, Jun 18, 2012 at 6:44 PM, Dmitry Antipov <dmantipov@yandex.ru> wrote:
> but it seems that this tool opens a lot of other opportunities. For example,
> attached patch was
> generated with the very simple "semantic patch":
>
> @expression@
> identifier I1, I2;
> expression E1, E2;
> @@
> (
> - XVECTOR (I1)->contents[I2++] = E1
> + ASET (I1, I2, E1), I2++
> |
> - XVECTOR (I1)->contents[E1] = E2
> + ASET (I1, E1, E2)
> |
> -XVECTOR (I1)->contents[E1]
> +AREF (I1, E1)
> )
>
> and following minimal manual intervention, so I suspect that more useful
> cleanups may be done
> with this tool.
>
> Dmitry

Nice work! I was the one who posted the link to coccinelle in the
thread you mentioned. It's not the silver bullet to all problems but
it's a great tool nonetheless.
I hope your post convinced other devs to use it in emacs core when possible!



  reply	other threads:[~2012-06-18 19:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 16:44 Trying coccinelle Dmitry Antipov
2012-06-18 19:47 ` Aurélien Aptel [this message]
2012-06-18 20:33 ` Stefan Monnier
2012-06-19  4:27   ` Dmitry Antipov
2012-06-19 13:31     ` Stefan Monnier
2012-06-22  5:57       ` Dmitry Antipov
2012-06-22  6:40         ` Miles Bader
2012-06-22 10:22         ` martin rudalics
2012-06-22 19:02         ` Stefan Monnier
2012-06-24 16:20           ` Dmitry Antipov
2012-06-24 18:59             ` Stefan Monnier

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='CA+5B0FPpM7CSbvxFyz7UzUF-JHodECrhm_8q-yWLLtP=EMiEbw@mail.gmail.com' \
    --to=aurelien.aptel+emacs@gmail.com \
    --cc=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /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).