emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: M-\ does not work with prefix argument as documented


From: Dieter Wilhelm
Subject: Re: M-\ does not work with prefix argument as documented
Date: Wed, 03 Jan 2007 14:44:14 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

...

Could something in this line be helpful (after the release)?

By the way, what is confusing to me is the fact that the diff output
does not reflect the indentation of the code correctly.  Please have a
look at the progn command, in the code the lines below progn are
indented with 2 additional spaces.


*** simple.el   03 jan 2007 05:19:56 +0100      1.839
--- simple.el   03 jan 2007 14:33:52 +0100      
***************
*** 704,723 ****
        nil
        (insert ?\s))))
  
! (defun delete-horizontal-space (&optional backward-only)
    "Delete all spaces and tabs around point.
! If BACKWARD-ONLY is non-nil, only delete them before point."
!   (interactive "*P")
    (let ((orig-pos (point)))
!     (delete-region
!      (if backward-only
!        orig-pos
         (progn
         (skip-chars-forward " \t")
!        (constrain-to-field nil orig-pos t)))
!      (progn
!        (skip-chars-backward " \t")
!        (constrain-to-field nil orig-pos)))))
  
  (defun just-one-space (&optional n)
    "Delete all spaces and tabs around point, leaving one space (or N spaces)."
--- 704,731 ----
        nil
        (insert ?\s))))
  
! (defun delete-horizontal-space (&optional direction)
    "Delete all spaces and tabs around point.
! If numerical prefix argument DIRECTION is positiv, only delete
! them after point.  If DIRECTION is negativ, only delete them
! before point."
!   (interactive "*p")
    (let ((orig-pos (point)))
!     (cond
!      ((unless current-prefix-arg)
!       (just-one-space 0))
!      ((< direction 0)
!       (delete-region
!        (progn
!        (skip-chars-backward " \t")
!        (constrain-to-field nil orig-pos))
!        orig-pos))
!      ((> direction 0)
!       (delete-region
!        orig-pos
         (progn
         (skip-chars-forward " \t")
!        (constrain-to-field nil orig-pos t)))))))
  
  (defun just-one-space (&optional n)
    "Delete all spaces and tabs around point, leaving one space (or N spaces)."


*** killing.texi        03 jan 2007 05:20:01 +0100      1.57
--- killing.texi        03 jan 2007 14:16:08 +0100      
***************
*** 148,159 ****
    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
! deletes them before point, but not after.)  @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
! leaves @var{n} spaces after point.
  
    @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
  after the current line.  If the current line is blank, it deletes all
--- 148,159 ----
    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 numerical prefix argument,
! it deletes them selectively before or 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 leaves
! @var{n} spaces after point.
  
    @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
  after the current line.  If the current line is blank, it deletes all

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany




reply via email to

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