help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change function name style


From: suvayu ali
Subject: Re: Change function name style
Date: Thu, 29 Jul 2010 13:30:50 -0700

On 29 July 2010 12:45, Andrea Crotti <address@hidden> wrote:
>
>> with a regexp employing [[:lower:]]+[[:upper:]] etc. inside
>> \\(...\\)
>
> Yes well that's last possibility, what if I have a variable called
> myVariable?
>
> A regexp can't know when I have a function or a function call, while
> both emacs c-mode and semantic do...
>

I am a lisp newbie but how about something like this,

(string-match "function-name"
                           (symbol-name (if (< (point) (point-max))
                                            (face-at-point)
                                          (backward-char)
                                          (face-at-point))))

I use this to have context sensitive abbreviation expansion. Maybe you
can adapt it for your case?

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]