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

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

Re: Hungry delete in any mode


From: Nordlöw
Subject: Re: Hungry delete in any mode
Date: Tue, 22 Jan 2008 03:37:38 -0800 (PST)
User-agent: G2/1.0

I needed to restart Emacs in order for the changes to have effect.

This following code does it:

(define-minor-mode any-hungry-mode
  "Toggle Hungry mode.
     With no argument, this command toggles the mode.
     Non-null prefix argument turns on the mode.
     Null prefix argument turns off the mode.

     When Hungry mode is enabled, the control delete key
     gobbles all preceding whitespace except the last.
     See the command \\[hungry-electric-delete]."
  ;; The initial value.
  nil
  ;; The indicator for the mode line.
  " Hungry"
  ;; The minor mode bindings.
  '(([backspace]. c-hungry-delete-backwards) ;backspace
    ([delete] . c-hungry-delete-forward)        ;delete
    ))

Thanks,
Nordlöw


reply via email to

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