aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-21 19:27:30 +0000
committerGerd Moellmann1999-08-21 19:27:30 +0000
commit572da0fe1ea5261e730aa728dbc6c5c470ff0757 (patch)
tree19ec623fd233010b18222d2007922d44fdfff9f3
parenta4bda243d2c200d05a45754ddbb7db82b37e919c (diff)
downloademacs-572da0fe1ea5261e730aa728dbc6c5c470ff0757.tar.gz
emacs-572da0fe1ea5261e730aa728dbc6c5c470ff0757.zip
(next-history-element): Use minibuffer-prompt-end.
Remove test for minibuffer-prompt-in-buffer. (kill-word): Don't move point into mini-buffer prompt.
-rw-r--r--lisp/simple.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 456911c6c9a..a407994945e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -794,9 +794,7 @@ 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 (if (boundp 'minibuffer-prompt-in-buffer) 797 (goto-char (minibuffer-prompt-end)))))
798 (goto-char (minibuffer-prompt-width))
799 (goto-char (point-min))))))
800 798
801(defun previous-history-element (n) 799(defun previous-history-element (n)
802 "Inserts the previous element of the minibuffer history into the minibuffer." 800 "Inserts the previous element of the minibuffer history into the minibuffer."
@@ -2849,7 +2847,12 @@ In programs, it is faster to call `forward-word' with negative arg."
2849 "Kill characters forward until encountering the end of a word. 2847 "Kill characters forward until encountering the end of a word.
2850With argument, do this that many times." 2848With argument, do this that many times."
2851 (interactive "*p") 2849 (interactive "*p")
2852 (kill-region (point) (progn (forward-word arg) (point)))) 2850 (let ((start (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)))
2853 2856
2854(defun backward-kill-word (arg) 2857(defun backward-kill-word (arg)
2855 "Kill characters backward until encountering the end of a word. 2858 "Kill characters backward until encountering the end of a word.