From dbd136836b5405cc3028d9d4c4dc1bb071644c04 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 13 Oct 2010 18:56:12 +0200 Subject: [PATCH] * shr.el (shr-current-column): Remove buggy and unnecessary function. --- lisp/ChangeLog | 4 ++++ lisp/shr.el | 11 +---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54339a81d..2f99c8231 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-13 Lars Magne Ingebrigtsen + + * shr.el (shr-current-column): Remove buggy and unnecessary function. + 2010-10-13 Julien Danjou * shr.el (shr-width): Make shr-width a defcustom with default to diff --git a/lisp/shr.el b/lisp/shr.el index 8a0e814bc..8991533a9 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -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"))) -- 2.25.1