Re: Newbie question on renaming
From: Alan Shutko (ats_at_acm.org)
Date: 05/07/04
- Next message: Antonio Menezes Leitao: "Re: The Hyperspec and portability between Common Lisp compilers (long)"
- Previous message: Antonio Menezes Leitao: "Re: Is anything easier to do in java than in lisp?"
- In reply to: William Bland: "Newbie question on renaming"
- Next in thread: nikodemus_at_random-state.net: "Re: Newbie question on renaming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 06 May 2004 18:24:14 -0500
William Bland <news@abstractnonsense.com> writes:
> I guess this is the kind of thing that "refactoring browsers" are meant to
> do (guessing because I've never used one). I wonder how hard it would be
> to get Emacs to rename a variable, taking into account scope?
I like it! You should write it and incorporate it into SLIME!
But I don't frequently find it a problem. Most of my variables exist
in a very limited scope, inside a function or in a let body. If it
doesn't, it has a *nice-long-name* which is unique across files or
directories. So, when changing most variables, I have to change it
across two or three place only.
What you could do, for cases that are more involved than it, are to
use Emacs' mark-defun (C-M-h) or mark-sexp (C-M-SPC) commands, narrow
to the region (C-x n n), then C-M-% to replace things. You probably
don't reuse a variable for different things within the same scope, right?
I've used this to good effect in many languages.
-- Alan Shutko <ats@acm.org> - I am the rocks. I just need enough to tide me over until I need more.
- Next message: Antonio Menezes Leitao: "Re: The Hyperspec and portability between Common Lisp compilers (long)"
- Previous message: Antonio Menezes Leitao: "Re: Is anything easier to do in java than in lisp?"
- In reply to: William Bland: "Newbie question on renaming"
- Next in thread: nikodemus_at_random-state.net: "Re: Newbie question on renaming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|