emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/gnus/html2text.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/html2text.el [lexbind]
Date: Thu, 28 Oct 2004 22:27:59 -0400

Index: emacs/lisp/gnus/html2text.el
diff -c emacs/lisp/gnus/html2text.el:1.2.4.2 
emacs/lisp/gnus/html2text.el:1.2.4.3
*** emacs/lisp/gnus/html2text.el:1.2.4.2        Wed Oct  6 05:23:52 2004
--- emacs/lisp/gnus/html2text.el        Fri Oct 29 02:05:07 2004
***************
*** 116,127 ****
  ;; <Utility functions>
  ;;
  
- (defun html2text-buffer-head ()
-   (if (string= mode-name "Article")
-       (beginning-of-buffer)
-     (beginning-of-buffer)
-     )
-   )
  
  (defun html2text-replace-string (from-string to-string p1 p2)
    (goto-char p1)
--- 116,121 ----
***************
*** 432,442 ****
    "This _tries_ to fix up the paragraphs - this is done in quite a ad-hook
  fashion, quite close to pure guess-work. It does work in some cases though."
    (interactive)
!   (html2text-buffer-head)
    (replace-regexp "^<br>$" "")
    ;; Removing lonely <br> on a single line, if they are left intact we
    ;; dont have any paragraphs at all.
!   (html2text-buffer-head)
    (while (not (eobp))
      (let ((p1 (point)))
        (forward-paragraph 1)
--- 426,436 ----
    "This _tries_ to fix up the paragraphs - this is done in quite a ad-hook
  fashion, quite close to pure guess-work. It does work in some cases though."
    (interactive)
!   (goto-char (point-min))
    (replace-regexp "^<br>$" "")
    ;; Removing lonely <br> on a single line, if they are left intact we
    ;; dont have any paragraphs at all.
!   (goto-char (point-min))
    (while (not (eobp))
      (let ((p1 (point)))
        (forward-paragraph 1)
***************
*** 462,468 ****
  See the documentation for that variable."
    (interactive)
    (dolist (tag tag-list)
!     (html2text-buffer-head)
      (while (re-search-forward (format "\\(</?%s[^>]*>\\)" tag) (point-max) t)
        (delete-region (match-beginning 0) (match-end 0)))))
  
--- 456,462 ----
  See the documentation for that variable."
    (interactive)
    (dolist (tag tag-list)
!     (goto-char (point-min))
      (while (re-search-forward (format "\\(</?%s[^>]*>\\)" tag) (point-max) t)
        (delete-region (match-beginning 0) (match-end 0)))))
  
***************
*** 472,478 ****
    (dolist (tag-and-function html2text-format-tag-list)
      (let ((tag      (car tag-and-function))
          (function (cdr tag-and-function)))
!       (html2text-buffer-head)
        (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag)
                                (point-max) t)
        (let ((p1)
--- 466,472 ----
    (dolist (tag-and-function html2text-format-tag-list)
      (let ((tag      (car tag-and-function))
          (function (cdr tag-and-function)))
!       (goto-char (point-min))
        (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag)
                                (point-max) t)
        (let ((p1)
***************
*** 497,503 ****
    "See the variable \"html2text-replace-list\" for documentation"
    (interactive)
    (dolist (e html2text-replace-list)
!     (html2text-buffer-head)
      (let ((old-string (car e))
          (new-string (cdr e)))
        (html2text-replace-string old-string new-string (point-min) (point-max))
--- 491,497 ----
    "See the variable \"html2text-replace-list\" for documentation"
    (interactive)
    (dolist (e html2text-replace-list)
!     (goto-char (point-min))
      (let ((old-string (car e))
          (new-string (cdr e)))
        (html2text-replace-string old-string new-string (point-min) (point-max))
***************
*** 511,517 ****
    (dolist (tag-and-function html2text-format-single-element-list)
      (let ((tag      (car tag-and-function))
          (function (cdr tag-and-function)))
!       (html2text-buffer-head)
        (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag)
                                (point-max) t)
        (let ((p1)
--- 505,511 ----
    (dolist (tag-and-function html2text-format-single-element-list)
      (let ((tag      (car tag-and-function))
          (function (cdr tag-and-function)))
!       (goto-char (point-min))
        (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag)
                                (point-max) t)
        (let ((p1)




reply via email to

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