aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/simple.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a407994945e..456911c6c9a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -794,7 +794,9 @@ An uppercase letter in REGEXP makes the search case-sensitive."
794 (let ((print-level nil)) 794 (let ((print-level nil))
795 (prin1-to-string elt)) 795 (prin1-to-string elt))
796 elt)) 796 elt))
797 (goto-char (minibuffer-prompt-end))))) 797 (if (boundp 'minibuffer-prompt-in-buffer)
798 (goto-char (minibuffer-prompt-width))
799 (goto-char (point-min))))))
798 800
799(defun previous-history-element (n) 801(defun previous-history-element (n)
800 "Inserts the previous element of the minibuffer history into the minibuffer." 802 "Inserts the previous element of the minibuffer history into the minibuffer."
@@ -2847,12 +2849,7 @@ In programs, it is faster to call `forward-word' with negative arg."
2847 "Kill characters forward until encountering the end of a word. 2849 "Kill characters forward until encountering the end of a word.
2848With argument, do this that many times." 2850With argument, do this that many times."
2849 (interactive "*p") 2851 (interactive "*p")
2850 (let ((start (point)) 2852 (kill-region (point) (progn (forward-word arg) (point))))
2851 (end (progn (forward-word arg) (point)))
2852 (prompt-end (minibuffer-prompt-end)))
2853 (when (< end prompt-end)
2854 (goto-char (setq end prompt-end)))
2855 (kill-region start end)))
2856 2853
2857(defun backward-kill-word (arg) 2854(defun backward-kill-word (arg)
2858 "Kill characters backward until encountering the end of a word. 2855 "Kill characters backward until encountering the end of a word.