[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master aeb613e: Avoid having `C-x h' mark the prompt part
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master aeb613e: Avoid having `C-x h' mark the prompt part of the minibuffer |
Date: |
Wed, 27 Apr 2016 17:52:56 +0000 |
branch: master
commit aeb613ea95b7970e66d663ec5cba54e9ec0528fa
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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).
---
etc/NEWS | 4 ++++
lisp/simple.el | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index ef2b4b0..da68ed5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -57,6 +57,10 @@ affected by this, as SGI stopped supporting IRIX in December
2013.
* Changes in Emacs 25.2
---
+** `C-x h' (`mark-whole-buffer') will now avoid marking the prompt
+part of minibuffers.
+
+---
** `find-library' now takes a prefix argument to pop to a different
window.
diff --git a/lisp/simple.el b/lisp/simple.el
index 971f6006..7573789 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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master aeb613e: Avoid having `C-x h' mark the prompt part of the minibuffer,
Lars Ingebrigtsen <=