emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/with-url 5432611 4/5: Fix the previous kludge slig


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] scratch/with-url 5432611 4/5: Fix the previous kludge slightly.
Date: Sun, 22 Jan 2017 16:15:13 +0000 (UTC)

branch: scratch/with-url
commit 5432611d198909627f8efb50b0bddcd69b204067
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Fix the previous kludge slightly.
    
    Author:
---
 lisp/net/shr.el |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index f04042c..d1e829c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1058,8 +1058,7 @@ Return a string with image data."
       ;;; !!! This is all just an ugly kludge until a new URL caching method
       ;;; been established.
       (goto-char (point-min))
-      (when (or (search-forward "\n\n" nil t)
-               (search-forward "\r\n\r\n" nil t))
+      (when (re-search-forward "\r?\n\r?\n" nil t)
         (let ((content-type
                (save-excursion
                  (save-restriction
@@ -1073,8 +1072,7 @@ Return a string with image data."
                           (intern (replace-regexp-in-string ";.*" "" 
content-type)
                                   obarray)))))))
           (goto-char (point-min))
-          (when (or (search-forward "\n\n" nil t)
-                    (search-forward "\r\n\r\n" nil t))
+          (when (re-search-forward "\r?\n\r?\n" nil t)
             (delete-region (point) (point-min))
             (shr-parse-image-data content-type)))))))
 



reply via email to

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