# HG changeset patch # User Richard M. Stallman # Date 1105812526 0 # Node ID 638fd0a9f545facde41d0283738ff114b26bbf35 # Parent 7b97d6104891736ecd6d78e31c07b4c29a143126 (just-one-space): Argument specifies number of spaces. (eval-expression-print-format): Avoid warning about edebug-active. diff -r 7b97d6104891 -r 638fd0a9f545 lisp/simple.el --- a/lisp/simple.el Sat Jan 15 18:07:21 2005 +0000 +++ b/lisp/simple.el Sat Jan 15 18:08:46 2005 +0000 @@ -647,15 +647,16 @@ (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) -(defun just-one-space () - "Delete all spaces and tabs around point, leaving one space." - (interactive "*") +(defun just-one-space (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) - (if (= (following-char) ? ) - (forward-char 1) - (insert ? )) + (dotimes (i n) + (if (= (following-char) ?\ ) + (forward-char 1) + (insert ?\ ))) (delete-region (point) (progn @@ -899,7 +900,7 @@ (if (and (integerp value) (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp))) (eq this-command last-command) - (and (boundp 'edebug-active) edebug-active))) + (if (boundp 'edebug-active) edebug-active))) (let ((char-string (if (or (and (boundp 'edebug-active) edebug-active) (memq this-command '(eval-last-sexp eval-print-last-sexp))) @@ -4115,7 +4116,7 @@ (play-sound sound))) (define-key global-map "\e\e\e" 'keyboard-escape-quit) - + (defcustom read-mail-command 'rmail "*Your preference for a mail reading package. This is used by some keybindings which support reading mail. @@ -4257,7 +4258,7 @@ (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue 'switch-to-buffer-other-frame yank-action send-actions)) - + (defvar set-variable-value-history nil "History of values entered with `set-variable'.") @@ -4320,7 +4321,7 @@ ;; Force a thorough redisplay for the case that the variable ;; has an effect on the display, like `tab-width' has. (force-mode-line-update)) - + ;; Define the major mode for lists of completions. (defvar completion-list-mode-map nil