emacs-devel
[Top][All Lists]
Advanced

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

Generalization of `delete-horizontal-space'


From: Davis Herring
Subject: Generalization of `delete-horizontal-space'
Date: Fri, 17 Sep 2004 11:59:18 -0600 (MDT)

Currently `delete-horizontal-space' can delete both directions or
backward, but not forward.  This patch lets it do that, using the standard
negative/zero/positive argument to designate direction.  For compatibility 
with several Lisp calls made to it, t is treated as negative; for 
compatibility and for interactive use, nil is treated as 0 (both 
directions).  It now takes a prefix argument: M-\, C-- M-\, and C-u M-\ 
thus do what one would expect (I find this useful when fixing text 
indentation).

There's no issue with old interactive use of the function, as it took no
prefix arg (and behaves the same way now without one); there are only two
possible confusions:

 - C-u M-\ goes forward whereas (delete-horizontal-space t) goes backward
 - (delete-horizontal-space 'foobar) and (delete-horizontal-space 1) have
changed meaning -- but (delete-horizontal-space t) has not and is the 
usual form.

This patch includes two minor, related changes; it removes a duplicate 
`define-key' for M-\ in bindings.el, and it removes the function 
`woman-delete-following-space' from woman.el, since 
`delete-horizontal-space' can now do that as well.

Hopefully this is not too big of a change to install for 21.4; it's a new 
feature, but it's useful and extremely well-contained.

Davis Herring

-- 
This product is sold by volume, not by mass.  If it seems too dense or too 
sparse, it means mass-energy conversion has occurred during shipping.

Attachment: dhs.patch
Description: generalize `delete-horizontal-space'


reply via email to

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