emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/erc/erc-stamp.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/erc/erc-stamp.el
Date: Tue, 31 Jan 2006 00:24:37 +0000

Index: emacs/lisp/erc/erc-stamp.el
diff -u emacs/lisp/erc/erc-stamp.el:1.1 emacs/lisp/erc/erc-stamp.el:1.2
--- emacs/lisp/erc/erc-stamp.el:1.1     Sun Jan 29 13:08:57 2006
+++ emacs/lisp/erc/erc-stamp.el Tue Jan 31 00:24:36 2006
@@ -180,6 +180,14 @@
          (integer :tag "Column number")
          (const :tag "Unspecified" nil)))
 
+(defcustom erc-timestamp-right-align-by-pixel nil
+  "*If non-nil, insert the right timestamp based on a pixel value.
+This is needed when variable-width text precedes a timestamp.
+Unfortunately, it only works in Emacs 22 and when using the X
+Window System."
+  :group 'erc-stamp
+  :type 'boolean)
+
 (defun erc-insert-timestamp-left (string)
   "Insert timestamps at the beginning of the line."
   (goto-char (point-min))
@@ -195,11 +203,9 @@
   "Insert STRING based on a fraction of the width of the buffer.
 Fraction is roughly (/ POS (window-width)).
 
-If the current version of Emacs doesn't support this, use
+If `erc-timestamp-right-align-by-pixel' is nil, use
 \(- POS FALLBACK) to determine how many spaces to insert."
-  (if (or (featurep 'xemacs)
-         (< emacs-major-version 22)
-         (not (eq window-system 'x)))
+  (if (not erc-timestamp-right-align-by-pixel)
       (insert (make-string (- pos fallback) ? ) string)
     (insert " ")
     (let ((offset (floor (* (/ (1- pos) (window-width) 1.0)




reply via email to

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