[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifying many function calls
From: |
Andreas Röhler |
Subject: |
Re: Modifying many function calls |
Date: |
Wed, 27 Oct 2010 15:05:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 |
Am 27.10.2010 12:16, schrieb Andrea Crotti:
Andreas Röhler<andreas.roehler@easy-emacs.de> writes:
Hi,
wrote years ago the opposite: defining aliases for all prefixed
functions, The alias then was the function name with prefix turned
into suffix. Should exist in the gnu-emacs-sources@gnu.org archive
somewhere.
Purpose was making completion of function-groups work.
However, would write that differently today probably.
Also, if you give some info here, it should be possible to put the
script together at this list.
Questions would be:
- reside all files with functions to rename in the same directory?
- really all functions to rename?
- only functions to rename, not variables?
- actually in the same big org-mode file
(?) assume "directory"
In any case, suggest to move your functions into a separate directory or
file.
That would make things much easier.
Unless there are reason not to do this.
If in a directory, first task is to get a list of files.
Function below as an example messaging in:
(defun load-files-from-directory (&optional dir)
(interactive)
(let* ((dir (or dir default-directory))
(files (directory-files (expand-file-name
(substitute-in-file-name dir)) t "\\.el$")))
(message "%s" files)))
If just one file, its even easier, we proceed there.
(unless I call something from
some yasnippet snippet, but I don't think)
- yes maybe also variables
But variables can be assigned to a group also (with defcustom) so it's
not so bad
- yes really all functions (some have the "my-" prefix but that can be
changed easily I think)
[ ... ]