summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index bdc51546a84..82ec0e6f7f2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -647,15 +647,16 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point."
(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 @@ display the result of expression evaluation."
(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 @@ specification for `play-sound'."
(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 @@ Each action has the form (FUNCTION . ARGS)."
(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 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
;; 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