* shr.el (shr-current-column): Remove buggy and unnecessary function.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 13 Oct 2010 16:56:12 +0000 (18:56 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 13 Oct 2010 16:56:12 +0000 (18:56 +0200)
lisp/ChangeLog
lisp/shr.el

index 54339a8..2f99c82 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-current-column): Remove buggy and unnecessary function.
+
 2010-10-13  Julien Danjou  <julien@danjou.info>
 
        * shr.el (shr-width): Make shr-width a defcustom with default to
index 8a0e814..8991533 100644 (file)
@@ -219,7 +219,7 @@ redirects somewhere else."
        (unless shr-start
          (setq shr-start (point)))
        (insert elem)
-       (when (> (shr-current-column) shr-width)
+       (when (> (current-column) shr-width)
          (if (not (search-backward " " (line-beginning-position) t))
              (insert "\n")
            (delete-char 1)
@@ -243,15 +243,6 @@ redirects somewhere else."
     (or found
        (end-of-line))))
 
-(defun shr-current-column ()
-  (let ((column 0))
-    (save-excursion
-      (beginning-of-line)
-      (while (not (eolp))
-       (incf column (char-width (following-char)))
-       (forward-char 1)))
-    column))
-
 (defun shr-ensure-newline ()
   (unless (zerop (current-column))
     (insert "\n")))