Mercurial > emacs
changeset 25342:99d49ec31b8a
(next-history-element): Use minibuffer-prompt-end.
Remove test for minibuffer-prompt-in-buffer.
(kill-word): Don't move point into mini-buffer prompt.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sat, 21 Aug 1999 19:27:30 +0000 |
parents | 9295aaade56b |
children | fe92158a9e83 |
files | lisp/simple.el |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Sat Aug 21 19:27:28 1999 +0000 +++ b/lisp/simple.el Sat Aug 21 19:27:30 1999 +0000 @@ -794,9 +794,7 @@ (let ((print-level nil)) (prin1-to-string elt)) elt)) - (if (boundp 'minibuffer-prompt-in-buffer) - (goto-char (minibuffer-prompt-width)) - (goto-char (point-min)))))) + (goto-char (minibuffer-prompt-end))))) (defun previous-history-element (n) "Inserts the previous element of the minibuffer history into the minibuffer." @@ -2849,7 +2847,12 @@ "Kill characters forward until encountering the end of a word. With argument, do this that many times." (interactive "*p") - (kill-region (point) (progn (forward-word arg) (point)))) + (let ((start (point)) + (end (progn (forward-word arg) (point))) + (prompt-end (minibuffer-prompt-end))) + (when (< end prompt-end) + (goto-char (setq end prompt-end))) + (kill-region start end))) (defun backward-kill-word (arg) "Kill characters backward until encountering the end of a word.