[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M-\ does not work with prefix argument as documented
From: |
Kevin Rodgers |
Subject: |
Re: M-\ does not work with prefix argument as documented |
Date: |
Wed, 13 Dec 2006 10:08:52 -0700 |
User-agent: |
Thunderbird 1.5.0.8 (Windows/20061025) |
Dieter Wilhelm wrote:
Hi
emacs -Q -D
Insert a line like the following:
otto foo
^
Place the cursor approximately where the accent is. Type M-- M-\ and
all white space is deleted instead of only the one on the left hand
side.
Neither the Emacs manual nor the delete-horizontal-space's doc string
says anything about how prefix args are handled. But it seems like a
good idea to bind the BACKWARD-ONLY Lisp arg to the interactive prefix
arg:
2006-12-13 Kevin Rodgers <address@hidden>
* simple.el (delete-horizontal-space): Bind optional BACKWARD-ONLY
arg to interactive prefix arg, and update doc string.
* killing.texi (Deletion): Describe `M-\'
(delete-horizontal-space) prefix argument.
*** simple.el.orig 2006-12-04 05:51:48 -0000
--- simple.el 2006-12-13 09:40:19.509429600 -0700
***************
*** 706,713 ****
(defun delete-horizontal-space (&optional backward-only)
"Delete all spaces and tabs around point.
! If BACKWARD-ONLY is non-nil, only delete spaces before point."
! (interactive "*")
(let ((orig-pos (point)))
(delete-region
(if backward-only
--- 706,713 ----
(defun delete-horizontal-space (&optional backward-only)
"Delete all spaces and tabs around point.
! With prefix arg BACKWARD-ONLY, only delete spaces and tabs before point."
! (interactive "*P")
(let ((orig-pos (point)))
(delete-region
(if backward-only
*** killing.texi.orig 2006-07-24 17:46:22 -0000
--- killing.texi 2006-12-13 09:39:38 -0700
***************
*** 148,154 ****
The other delete commands are those which delete only whitespace
characters: spaces, tabs and newlines. @kbd{M-\}
(@code{delete-horizontal-space}) deletes all the spaces and tab
! characters before and after point. @address@hidden
(@code{just-one-space}) does likewise but leaves a single space after
point, regardless of the number of spaces that existed previously (even
if there were none before). With a numeric argument @var{n}, it
--- 148,155 ----
The other delete commands are those which delete only whitespace
characters: spaces, tabs and newlines. @kbd{M-\}
(@code{delete-horizontal-space}) deletes all the spaces and tab
! characters before and after point. With a prefix argument, it only
! delete spaces and tabs before point. @address@hidden
(@code{just-one-space}) does likewise but leaves a single space after
point, regardless of the number of spaces that existed previously (even
if there were none before). With a numeric argument @var{n}, it
Could you, please, also make the command symmetric? For example
negative arguments are killing on the left hand side of the point and
positive arguments on the left hand side. The default would remain as
is. (There was recently a request--unrelated to M-\--for such a
feature on gnu.emacs.help, killing white space left or right of the
cursor).
That would be cool.
--
Kevin
- M-\ does not work with prefix argument as documented, Dieter Wilhelm, 2006/12/13
- Re: M-\ does not work with prefix argument as documented,
Kevin Rodgers <=
- Re: M-\ does not work with prefix argument as documented, Dieter Wilhelm, 2006/12/14
- Re: M-\ does not work with prefix argument as documented, Kevin Rodgers, 2006/12/18
- Re: M-\ does not work with prefix argument as documented, Dieter Wilhelm, 2006/12/19
- Re: M-\ does not work with prefix argument as documented, Richard Stallman, 2006/12/20
- Re: M-\ does not work with prefix argument as documented, Dieter Wilhelm, 2006/12/20
- Re: M-\ does not work with prefix argument as documented, Richard Stallman, 2006/12/23
Re: M-\ does not work with prefix argument as documented, Richard Stallman, 2006/12/13