unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* hungry-delete in latex mode
@ 2003-05-28 19:31 Sam Halliday
  2003-05-28 20:12 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Halliday @ 2003-05-28 19:31 UTC (permalink / raw)


hi there,

there seems to be a lot written about this on the web, and in the
archives, but i wasnt able to find an answer. basically i would like to
be able to get the c-hungry-delete-key working for latex mode (and i
might consider all text modes as well). i have tried rebinding keys to
issue 'c-electric-backspace, but thats is not going to work since it
isnt defined but in c-mode.

i use AUCTeX, but it has no similar function. could somebody please tell
me how i could get a hungry-delete in latex mode?

http://www.gnu.org/manual/emacs-21.2/html_node/emacs_60.html
seems to list all the available delete modes... but none are what i am
looking for.

cheers,
Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hungry-delete in latex mode
  2003-05-28 19:31 hungry-delete in latex mode Sam Halliday
@ 2003-05-28 20:12 ` Stefan Monnier
  2003-05-28 21:11   ` Sam Halliday
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2003-05-28 20:12 UTC (permalink / raw)


>>>>> "Sam" == Sam Halliday <devnull@example.com> writes:
> there seems to be a lot written about this on the web, and in the
> archives, but i wasnt able to find an answer. basically i would like to
> be able to get the c-hungry-delete-key working for latex mode (and i
> might consider all text modes as well). i have tried rebinding keys to
> issue 'c-electric-backspace, but thats is not going to work since it
> isnt defined but in c-mode.

For deletion backward, just rebind your DEL key and set the var:

  (setq backward-delete-char-untabify-method
        <check-the-var's-documentation-to-see-what-value-you-want-to-use>)
  (global-set-key "\C-?" 'backward-delete-char-untabify)


-- Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hungry-delete in latex mode
  2003-05-28 20:12 ` Stefan Monnier
@ 2003-05-28 21:11   ` Sam Halliday
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Halliday @ 2003-05-28 21:11 UTC (permalink / raw)


Stefan Monnier wrote:
> >>>>> "Sam" == Sam Halliday <devnull@example.com> writes:
> > there seems to be a lot written about this on the web, and in the
> > archives, but i wasnt able to find an answer. basically i would like
> > to be able to get the c-hungry-delete-key working for latex mode
> > (and i might consider all text modes as well). i have tried
> > rebinding keys to issue 'c-electric-backspace, but thats is not
> > going to work since it isnt defined but in c-mode.
> 
> For deletion backward, just rebind your DEL key and set the var:
> 
>   (setq backward-delete-char-untabify-method
>         <check-the-var's-documentation-to-see-what-value-you-want-to-
>         use>)
>   (global-set-key "\C-?" 'backward-delete-char-untabify)

Excellent!

(setq backward-delete-char-untabify-method 'hungry)
  (global-set-key "\C-?" 'backward-delete-char-untabify)

its amazing that emacs documentation can be so big that i missed this
even though i (thought i) read everything on indentation, delete keys
and whitespace.

cheers again,
Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-28 21:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-28 19:31 hungry-delete in latex mode Sam Halliday
2003-05-28 20:12 ` Stefan Monnier
2003-05-28 21:11   ` Sam Halliday

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).