all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* extracting serial repeats
@ 2010-01-23 16:01 Andreas Roehler
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Roehler @ 2010-01-23 16:01 UTC (permalink / raw)
  To: help-gnu-emacs

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/






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-24 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2010-01-23 16:01 Andreas Roehler

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.