circe-help
[Top][All Lists]
Advanced

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

[Circe-help] lui-time-stamp change


From: John J Foerch
Subject: [Circe-help] lui-time-stamp change
Date: Sat, 10 Jan 2009 22:01:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hello,

  When lui-time-stamp-position is 'right, the way that point moves in
the vicinity of the timestamp is a bit strange, in my opinion.  The
timestamp is displayed in the buffer by using an overlay with the
'after-string property on the last character of the line.  The result is
that point can be either to the left of the last character, or to the
right of the timestamp, (on the newline), but not just to the right of
the last character.

  Therefore I propose the following change to the function
lui-time-stamp: instead of an 'after-string property on the final
character, use a 'display property on the newline.

  In order to make this work right, the contents of the overlay cannot
be a field, because fields inhibit certain movement commands.

  Here is a patch implementing this change for timestamps on the right.

Thank you,

John Foerch  

diff --git a/lui.el b/lui.el
index 7e62797..3f45245 100644
--- a/lui.el
+++ b/lui.el
@@ -1023,9 +1023,8 @@ function."
                                    ts
                                    'face 'lui-time-stamp-face))))
           (if lui-time-stamp-use-overlays-p
-              (let ((ov (make-overlay (point) (point))))
-                (overlay-put ov 'field 'lui-time-stamp)
-                (overlay-put ov 'after-string ts-string))
+              (let ((ov (make-overlay (point) (1+ (point)))))
+                (overlay-put ov 'display (concat ts-string "\n")))
             ;; No overlays
             (insert ts-string)))))
      ;; Timestamps left

reply via email to

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