# HG changeset patch # User Kim F. Storm # Date 1105959367 0 # Node ID 9782a4d3aef5f1dcbe3781ec37813f9c6a309971 # Parent 1aa9d082c67dac2e2f1518a38a3d9fd5d0a849c2 (just-one-space): Make arg optional. diff -r 1aa9d082c67d -r 9782a4d3aef5 lisp/simple.el --- 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 ?\ )))