erc-commit
[Top][All Lists]
Advanced

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

[Erc-commit] [commit][emacs22] Restore the previous behavior for right-t


From: mwolson
Subject: [Erc-commit] [commit][emacs22] Restore the previous behavior for right-timestamps and erc-fill-column.
Date: Sun, 14 Oct 2007 00:48:03 -0400

commit 9d157e3be6de1039c886db81b46b62f666f6ccd6
Author: Michael Olson <address@hidden>
Date:   Thu Feb 16 00:37:25 2006 +0000

    Restore the previous behavior for right-timestamps and erc-fill-column.
    
    * erc-stamp.el (erc-insert-timestamp-right): For now, put timestamps
      before rather than after erc-fill-column when
      erc-timestamp-right-column is nil.  This way we won't surprise anyone
      unpleasantly, or so it is hoped.
    git-archimport-id: address@hidden/erc--cvs--0--patch-121

diff --git a/ChangeLog b/ChangeLog
index 71b877d..f3d0d06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,11 @@
 
        * NEWS: Bring up-to-date.
 
+       * erc-stamp.el (erc-insert-timestamp-right): For now, put
+       timestamps before rather than after erc-fill-column when
+       erc-timestamp-right-column is nil.  This way we won't surprise
+       anyone unpleasantly, or so it is hoped.
+
 2006-02-13  Michael Olson  <address@hidden>
 
        * erc-dcc.el: Use (eval-when-compile (require 'cl)).
diff --git a/erc-stamp.el b/erc-stamp.el
index 0b27fb2..c73f715 100644
--- a/erc-stamp.el
+++ b/erc-stamp.el
@@ -243,19 +243,18 @@ be printed just before the window-width."
     (goto-char (point-max))
     (forward-char -1);; before the last newline
     (let* ((current-window (get-buffer-window (current-buffer)))
+          (str-width (string-width string))
           (pos (cond
                 (erc-timestamp-right-column erc-timestamp-right-column)
                 ((and (boundp 'erc-fill-mode)
                       erc-fill-mode
                       (boundp 'erc-fill-column)
                       erc-fill-column)
-                 (1+ erc-fill-column))
+                 (1+ (- erc-fill-column str-width)))
                 (fill-column
-                 (1+ fill-column))
+                 (1+ (- fill-column str-width)))
                 (t
-                 (- (window-width)
-                    (string-width string)
-                    1))))
+                 (- (window-width) str-width 1))))
           (from (point))
           (col (current-column))
           indent)




reply via email to

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