+2013-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * 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 <dgutov@yandex.ru>
* emacs-lisp/smie.el (smie-indent--rule): Extract `smie-indent--rule-1'.
(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))))
(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))
: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.
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)))))
(shr-generic cont)
(shr-colorize-region start (point) fgcolor bgcolor)))
-(defun shr-tag-style (cont)
+(defun shr-tag-style (_cont)
)
-(defun shr-tag-script (cont)
+(defun shr-tag-script (_cont)
)
-(defun shr-tag-comment (cont)
+(defun shr-tag-comment (_cont)
)
(defun shr-dom-to-xml (dom)
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))
(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"))