changeset 94069:a91b57e652cd

(minibuffer-message): Put cursor at the right place.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 14 Apr 2008 03:39:31 +0000
parents f2cff391663b
children df7b21ec7a29
files lisp/ChangeLog lisp/minibuffer.el
diffstat 2 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Apr 14 03:30:47 2008 +0000
+++ b/lisp/ChangeLog	Mon Apr 14 03:39:31 2008 +0000
@@ -1,3 +1,7 @@
+2008-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* minibuffer.el (minibuffer-message): Put cursor at the right place.
+
 2008-04-13  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* proced.el (proced-send-signal): Fix error recognition.
@@ -5,21 +9,20 @@
 2008-04-13  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* proced.el (proced-command-alist): Remove sort column.
-	(proced-command, proced-procname-column): Use
-	make-variable-buffer-local.
-	(proced-signal-function): Renamed from proced-kill-program.  Allow
-	for elisp symbols and string values representing system calls.
+	(proced-command, proced-procname-column):
+	Use make-variable-buffer-local.
+	(proced-signal-function): Rename from proced-kill-program.
+	Allow for elisp symbols and string values representing system calls.
 	(proced-marker-regexp, proced-success-message): New functions.
 	(proced): Use defalias.  Add autoload cookie.
 	(proced-unmark-backward, proced-toggle-marks)
 	(proced-hide-processes): New commands.
 	(proced-do-mark): Simplify code.
-	(proced-insert-mark): Use optional arg BACKWARD instead of line
-	number.
+	(proced-insert-mark): Use optional arg BACKWARD instead of line number.
 	(proced-update): Remove sorting.
 	(proced-send-signal): Display number of processes to operate on.
-	Allow for system calls or elisp functions to send signals.  Check
-	if signal was send successfully.
+	Allow for system calls or elisp functions to send signals.
+	Check if signal was sent successfully.
 
 2008-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/minibuffer.el	Mon Apr 14 03:30:47 2008 +0000
+++ b/lisp/minibuffer.el	Mon Apr 14 03:39:31 2008 +0000
@@ -173,6 +173,11 @@
   (let ((ol (make-overlay (point-max) (point-max) nil t t)))
     (unwind-protect
         (progn
+          (unless (zerop (length message))
+            ;; The current C cursor code doesn't know to use the overlay's
+            ;; marker's stickiness to figure out whether to place the cursor
+            ;; before or after the string, so let's spoon-feed it the pos.
+            (put-text-property 0 1 'cursor t message))
           (overlay-put ol 'after-string message)
           (sit-for (or minibuffer-message-timeout 1000000)))
       (delete-overlay ol))))