[Top][All Lists]

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

elisp question - hungry backspaces

From: Clemenceau
Subject: elisp question - hungry backspaces
Date: Fri, 23 May 2008 11:41:50 -0700 (PDT)

I'm writing an emacs major mode, and want to implement a hungry-delete
feature, much like the one c++-mode has. I've written the handler function,
which tells if the previous character is a space/tab or a real character,
and acts accordingly.

I'm having problems with deleting a marked region. I'm using
pc-selection-mode, and want the function to give priority to deleting a
region if one has been marked, before doing a hungry or 1-character

I've tried teaching my function to go to the start of the region and delete
it, which actually worked, but then any following backspace when a region
wasnt marked acted strangely - as if the first region was still marked.

It seems my problem is with telling whether or not the region is active.
Unless of course I don't understand my problem - in which case I'd also be
glad to be enlightened.

Any help would be greatly appreciated. 
View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

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