Mercurial > emacs
diff lisp/simple.el @ 59598:9782a4d3aef5
(just-one-space): Make arg optional.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Mon, 17 Jan 2005 10:56:07 +0000 |
| parents | 638fd0a9f545 |
| children | 48b06baddb8a |
line wrap: on
line diff
--- a/lisp/simple.el Mon Jan 17 10:55:49 2005 +0000 +++ b/lisp/simple.el Mon Jan 17 10:56:07 2005 +0000 @@ -647,13 +647,13 @@ (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) -(defun just-one-space (n) +(defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces)." (interactive "*p") (let ((orig-pos (point))) (skip-chars-backward " \t") (constrain-to-field nil orig-pos) - (dotimes (i n) + (dotimes (i (or n 1)) (if (= (following-char) ?\ ) (forward-char 1) (insert ?\ )))
