From aeb613ea95b7970e66d663ec5cba54e9ec0528fa Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 27 Apr 2016 19:52:46 +0200 Subject: Avoid having `C-x h' mark the prompt part of the minibuffer * lisp/simple.el (mark-whole-buffer): Don't mark the prompt part of the minibuffer (bug#2589). --- lisp/simple.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/simple.el b/lisp/simple.el index 971f6006732..7573789ad5c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1075,7 +1075,9 @@ that uses or sets the mark." (interactive) (push-mark (point)) (push-mark (point-max) nil t) - (goto-char (point-min))) + ;; This is really `point-min' in most cases, but if we're in the + ;; minibuffer, this is at the end of the prompt. + (goto-char (minibuffer-prompt-end))) ;; Counting lines, one way or another. -- cgit v1.2.1