(goto-char begin)
(shr-insert-document dom))))
+(defun have-fringes-p ()
+ "Return t if fringe-columns is bound, and either (fringe-columns 'left) or
+\(fringe-columns 'right) returns nonzero."
+ (and (fboundp 'fringe-columns)
+ (or (not (zerop (fringe-columns 'right)))
+ (not (zerop (fringe-columns 'left))))))
+
;;;###autoload
(defun shr-insert-document (dom)
"Render the parsed document DOM into the current buffer.
(if (not shr-use-fonts)
(- (window-body-width) 1
(if (and (null shr-width)
- (or (zerop
- (fringe-columns 'right))
- (zerop
- (fringe-columns 'left))))
+ (not (have-fringes-p)))
0
1))
(- (window-body-width nil t)
(* 2 (frame-char-width))
(if (and (null shr-width)
- (or (zerop
- (fringe-columns 'right))
- (zerop
- (fringe-columns 'left))))
+ (not (have-fringes-p)))
(* (frame-char-width) 2)
0))))))
(shr-descend dom)
;; to usurp one column for the
;; continuation glyph.
(if (and (null shr-width)
- (or (zerop (fringe-columns 'right))
- (zerop (fringe-columns 'left))))
+ (not (have-fringes-p)))
(* (frame-char-width) 2)
0))))
(shr-insert text)