emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115561: * lisp/net/shr.el (shr-insert-document): Re


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115561: * lisp/net/shr.el (shr-insert-document): Remove unused var
Date: Tue, 17 Dec 2013 02:48:11 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115561
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2013-12-16 21:48:06 -0500
message:
  * lisp/net/shr.el (shr-insert-document): Remove unused var
  `shr-preliminary-table-render'.
  (shr-rescale-image): Remove unused arg `force'.
  (shr-put-image): Update calls accordingly.
  (shr-tag-a): Use `cont' rather than dyn-bound `dom'.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/shr.el                shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-17 01:31:55 +0000
+++ b/lisp/ChangeLog    2013-12-17 02:48:06 +0000
@@ -1,3 +1,11 @@
+2013-12-17  Stefan Monnier  <address@hidden>
+
+       * net/shr.el (shr-insert-document): Remove unused var
+       `shr-preliminary-table-render'.
+       (shr-rescale-image): Remove unused arg `force'.
+       (shr-put-image): Update calls accordingly.
+       (shr-tag-a): Use `cont' rather than dyn-bound `dom'.
+
 2013-12-17  Dmitry Gutov  <address@hidden>
 
        * emacs-lisp/smie.el (smie-indent--rule): Extract `smie-indent--rule-1'.

=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el   2013-12-16 23:40:17 +0000
+++ b/lisp/net/shr.el   2013-12-17 02:48:06 +0000
@@ -196,7 +196,6 @@
        (shr-state nil)
        (shr-start nil)
        (shr-base nil)
-       (shr-preliminary-table-render 0)
        (shr-width (or shr-width (1- (window-width)))))
     (shr-descend (shr-transform-dom dom))
     (shr-remove-trailing-whitespace start (point))))
@@ -380,8 +379,7 @@
          (setq shr-stylesheet (nconc (shr-parse-style style)
                                      shr-stylesheet))
        (setq style nil)))
-    ;; If we have a display:none, then just ignore this part of the
-    ;; DOM.
+    ;; If we have a display:none, then just ignore this part of the DOM.
     (unless (equal (cdr (assq 'display shr-stylesheet)) "none")
       (if (fboundp function)
          (funcall function (cdr dom))
@@ -754,10 +752,10 @@
                                    :format content-type))
                     ((eq size 'full)
                      (ignore-errors
-                       (shr-rescale-image data t content-type)))
+                       (shr-rescale-image data content-type)))
                     (t
                      (ignore-errors
-                       (shr-rescale-image data nil content-type))))))
+                       (shr-rescale-image data content-type))))))
         (when image
          ;; When inserting big-ish pictures, put them at the
          ;; beginning of the line.
@@ -779,11 +777,10 @@
        image)
     (insert alt)))
 
-(defun shr-rescale-image (data &optional force content-type)
-  "Rescale DATA, if too big, to fit the current buffer.
-If FORCE, rescale the image anyway."
-  (if (or (not (fboundp 'imagemagick-types))
-         (not (get-buffer-window (current-buffer))))
+(defun shr-rescale-image (data &optional content-type)
+  "Rescale DATA, if too big, to fit the current buffer."
+  (if (not (and (fboundp 'imagemagick-types)
+                (get-buffer-window (current-buffer))))
       (create-image data nil t :ascent 100)
     (let ((edges (window-inside-pixel-edges
                  (get-buffer-window (current-buffer)))))
@@ -964,13 +961,13 @@
     (shr-generic cont)
     (shr-colorize-region start (point) fgcolor bgcolor)))
 
-(defun shr-tag-style (cont)
-  )
-
-(defun shr-tag-script (cont)
-  )
-
-(defun shr-tag-comment (cont)
+(defun shr-tag-style (_cont)
+  )
+
+(defun shr-tag-script (_cont)
+  )
+
+(defun shr-tag-comment (_cont)
   )
 
 (defun shr-dom-to-xml (dom)
@@ -1079,7 +1076,7 @@
        shr-start)
     (shr-generic cont)
     (when (and shr-target-id
-              (equal (cdr (assq :name (cdr dom))) shr-target-id))
+              (equal (cdr (assq :name cont)) shr-target-id))
       ;; We have a zero-length <a name="foo"> element, so just
       ;; insert...  something.
       (when (= start (point))
@@ -1326,7 +1323,7 @@
 (defun shr-tag-h6 (cont)
   (shr-heading cont))
 
-(defun shr-tag-hr (cont)
+(defun shr-tag-hr (_cont)
   (shr-ensure-newline)
   (insert (make-string shr-width shr-hr-line) "\n"))
 


reply via email to

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