emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Point position in minibuffer-message


From: Johan Bockgård
Subject: Re: Point position in minibuffer-message
Date: Mon, 14 Apr 2008 00:17:09 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> That's a good point.  I think the bug is in the C code that places the
> cursor (since the overlay is all setup with advancing markers).  But
> maybe fixing the cursor code is difficult.
>
> The use of an overlay with after-string was chosen so as to avoid
> other minor problems, but this one might be more important,

You can use the `cursor' property

--- minibuffer.el       13 Apr 2008 01:47:42 -0000      1.8
+++ minibuffer.el       13 Apr 2008 22:02:14 -0000
@@ -133,9 +133,11 @@
 If ARGS are provided, then pass MESSAGE through `format'."
   ;; Clear out any old echo-area message to make way for our new thing.
   (message nil)
-  (unless (and (null args) (string-match "\\[.+\\]" message))
+  (if (and (null args) (string-match "\\[.+\\]" message))
+      (setq message (copy-sequence message))
     (setq message (concat " [" message "]")))
   (when args (setq message (apply 'format message args)))
+  (add-text-properties 0 1 '(cursor t) message)
   (let ((ol (make-overlay (point-max) (point-max) nil t t)))
     (unwind-protect
         (progn

-- 
Johan Bockgård





reply via email to

[Prev in Thread] Current Thread [Next in Thread]