Have you taken a look at camelCase? That resolves the same problem, but
in a more generic way. It means that M-f, M-b, M-d, M-c, etc., treat
"current", "Buffer" and "Position" in your example as separate words.
Really nice!

/ Petter

http://www.hotdispatch.com/view-ip-requester?ID=14317280

> -----Original Message-----
> From: Sandip Chitale [mailto:[EMAIL PROTECTED] 
> Sent: den 1 mars 2003 10:40
> To: [EMAIL PROTECTED]
> Subject: Two useful key bindings for jde mode
> 
> 
> Folks,
>  
>     I thought you might find these useful.
>  
> The idea is that when you are changing the name of
> a variable from say
>  
> bufferPosition
>  
> to
>  
> currentBufferPosition
>  
> using the default M-c binding (after inserting "current") is useless
> because you will get
>  
> currentBufferposition.
>  
> With the following binding you will get
>  
> currentBufferPosition.
>  
>   (define-key jde-mode-map [(meta c)]
> '(lambda () (interactive)           
>             (if (memq (get-char-property (point) 'face)
>              '(font-lock-type-face
>                font-lock-variable-name-face
>                font-lock-function-name-face))
>          (upcase-region (point) (1+ (point)))
>               (capitalize-word 1)
>               )
>             ))
>  
> The idea is that when you are changing the name of
> a variable from say
>  
> currentBufferPosition
>  
> to
>  
> bufferPosition
>  
> using the default M-l binding (after deleting "current") is useless
> because you will get
>  
> bufferposition.
>  
> With the following binding you will get
>  
> bufferPosition.
> 
>   (define-key jde-mode-map [(meta l)]
> '(lambda () (interactive)           
>             (if (memq (get-char-property (point) 'face)
>                '(font-lock-type-face
>           font-lock-function-name-face))
>          (downcase-region (point) (1+ (point)))
>               (downcase-word 1)
>               )
>             ))
>  
>  
>  
> enjoy,
> sandip
> 

Reply via email to