1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-04 20:27:45 +00:00

(next-history-element): Use minibuffer-prompt-end.

Remove test for minibuffer-prompt-in-buffer.
(kill-word): Don't move point into mini-buffer prompt.
This commit is contained in:
Gerd Moellmann 1999-08-21 19:27:30 +00:00
parent a4bda243d2
commit 572da0fe1e

View File

@ -794,9 +794,7 @@ An uppercase letter in REGEXP makes the search case-sensitive."
(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 @@ In programs, it is faster to call `forward-word' with negative arg."
"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.