aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-01-15 18:08:46 +0000
committerRichard M. Stallman2005-01-15 18:08:46 +0000
commit56abefac4fea4294b2ab948977bf75d7debfb849 (patch)
treec1ee5008a1b3260eb81525fe62118f24185f686c
parentbdd5fa993233b9c57af2068bdbdd54a792d10981 (diff)
downloademacs-56abefac4fea4294b2ab948977bf75d7debfb849.tar.gz
emacs-56abefac4fea4294b2ab948977bf75d7debfb849.zip
(just-one-space): Argument specifies number of spaces.
(eval-expression-print-format): Avoid warning about edebug-active.
-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."
647 (skip-chars-backward " \t") 647 (skip-chars-backward " \t")
648 (constrain-to-field nil orig-pos))))) 648 (constrain-to-field nil orig-pos)))))
649 649
650(defun just-one-space () 650(defun just-one-space (n)
651 "Delete all spaces and tabs around point, leaving one space." 651 "Delete all spaces and tabs around point, leaving one space (or N spaces)."
652 (interactive "*") 652 (interactive "*p")
653 (let ((orig-pos (point))) 653 (let ((orig-pos (point)))
654 (skip-chars-backward " \t") 654 (skip-chars-backward " \t")
655 (constrain-to-field nil orig-pos) 655 (constrain-to-field nil orig-pos)
656 (if (= (following-char) ? ) 656 (dotimes (i n)
657 (forward-char 1) 657 (if (= (following-char) ?\ )
658 (insert ? )) 658 (forward-char 1)
659 (insert ?\ )))
659 (delete-region 660 (delete-region
660 (point) 661 (point)
661 (progn 662 (progn
@@ -899,7 +900,7 @@ display the result of expression evaluation."
899 (if (and (integerp value) 900 (if (and (integerp value)
900 (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp))) 901 (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp)))
901 (eq this-command last-command) 902 (eq this-command last-command)
902 (and (boundp 'edebug-active) edebug-active))) 903 (if (boundp 'edebug-active) edebug-active)))
903 (let ((char-string 904 (let ((char-string
904 (if (or (and (boundp 'edebug-active) edebug-active) 905 (if (or (and (boundp 'edebug-active) edebug-active)
905 (memq this-command '(eval-last-sexp eval-print-last-sexp))) 906 (memq this-command '(eval-last-sexp eval-print-last-sexp)))
@@ -4115,7 +4116,7 @@ specification for `play-sound'."
4115 (play-sound sound))) 4116 (play-sound sound)))
4116 4117
4117(define-key global-map "\e\e\e" 'keyboard-escape-quit) 4118(define-key global-map "\e\e\e" 'keyboard-escape-quit)
4118 4119
4119(defcustom read-mail-command 'rmail 4120(defcustom read-mail-command 'rmail
4120 "*Your preference for a mail reading package. 4121 "*Your preference for a mail reading package.
4121This is used by some keybindings which support reading mail. 4122This is used by some keybindings which support reading mail.
@@ -4257,7 +4258,7 @@ Each action has the form (FUNCTION . ARGS)."
4257 (list nil nil nil current-prefix-arg)) 4258 (list nil nil nil current-prefix-arg))
4258 (compose-mail to subject other-headers continue 4259 (compose-mail to subject other-headers continue
4259 'switch-to-buffer-other-frame yank-action send-actions)) 4260 'switch-to-buffer-other-frame yank-action send-actions))
4260 4261
4261(defvar set-variable-value-history nil 4262(defvar set-variable-value-history nil
4262 "History of values entered with `set-variable'.") 4263 "History of values entered with `set-variable'.")
4263 4264
@@ -4320,7 +4321,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
4320 ;; Force a thorough redisplay for the case that the variable 4321 ;; Force a thorough redisplay for the case that the variable
4321 ;; has an effect on the display, like `tab-width' has. 4322 ;; has an effect on the display, like `tab-width' has.
4322 (force-mode-line-update)) 4323 (force-mode-line-update))
4323 4324
4324;; Define the major mode for lists of completions. 4325;; Define the major mode for lists of completions.
4325 4326
4326(defvar completion-list-mode-map nil 4327(defvar completion-list-mode-map nil