all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Roehler <andreas.roehler@online.de>
To: help-gnu-emacs@gnu.org
Subject: extracting serial repeats
Date: Sat, 23 Jan 2010 17:01:40 +0100	[thread overview]
Message-ID: <4B5B1D64.1020900@online.de> (raw)

Hi,

let's consider the following pseudo-code, assumed inefficient, because Functions 1..n  are identic.

Function-1
(Body-of-Function-1)
Follow-action-1 with Function-1
Follow-action-2 with Function-1

Function-2
(Body-of-Function-2)
Follow-action-1 with Function-2
Follow-action-2 with Function-2
...
Function-n
(Body-of-Function-n)
Follow-action-1 with Function-n
Follow-action-2 with Function-n

More efficient seems, having

Body-of-Functions

extracted into a subroutine

so we could write something like

(dolist (element (1..n))
   SUBROUTINE element
   Follow-action-1 with element
   Follow-action-2 with element

Question is: exists a known tool for the extraction resp. refactoring needed?

Thanks


Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/






             reply	other threads:[~2010-01-23 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23 16:01 Andreas Roehler [this message]
     [not found] <mailman.74.1264262438.14305.help-gnu-emacs@gnu.org>
2010-01-23 20:00 ` extracting serial repeats Anselm Helbig
2010-01-24  9:14   ` Andreas Röhler
     [not found]   ` <mailman.95.1264324380.14305.help-gnu-emacs@gnu.org>
2010-01-24 10:17     ` Anselm Helbig
2010-01-24 11:42       ` Andreas Röhler

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

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

  git send-email \
    --in-reply-to=4B5B1D64.1020900@online.de \
    --to=andreas.roehler@online.de \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.