summaryrefslogtreecommitdiff
path: root/lisp/net/shr.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-05-23 09:09:28 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2017-05-23 09:09:28 -0400
commita8d0a91841121a7bdae668a5f29c1ba84739e14f (patch)
treecf242f14f7e501cf7f59eba9601ec77687ddbcea /lisp/net/shr.el
parent91b114354d32b5eacdfab4996cae0f3b9b4cc628 (diff)
downloademacs-a8d0a91841121a7bdae668a5f29c1ba84739e14f.tar.gz
emacs-a8d0a91841121a7bdae668a5f29c1ba84739e14f.tar.bz2
emacs-a8d0a91841121a7bdae668a5f29c1ba84739e14f.zip
* lisp/net/shr.el: Use cl-lib instead of cl.
Diffstat (limited to 'lisp/net/shr.el')
-rw-r--r--lisp/net/shr.el29
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 6b62a05227c..2a6b3960c46 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -30,7 +30,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'url)) ;For url-filename's setf handler.
(require 'browse-url)
(eval-when-compile (require 'subr-x))
@@ -1790,14 +1790,14 @@ The preference is a float determined from `shr-prefer-media-type'."
(elems (or (dom-attr dom 'shr-suggested-widths)
(shr-make-table dom suggested-widths nil
'shr-suggested-widths)))
- (sketch (loop for line in elems
- collect (mapcar #'car line)))
- (natural (loop for line in elems
- collect (mapcar #'cdr line)))
+ (sketch (cl-loop for line in elems
+ collect (mapcar #'car line)))
+ (natural (cl-loop for line in elems
+ collect (mapcar #'cdr line)))
(sketch-widths (shr-table-widths sketch natural suggested-widths)))
;; This probably won't work very well.
- (when (> (+ (loop for width across sketch-widths
- summing (1+ width))
+ (when (> (+ (cl-loop for width across sketch-widths
+ summing (1+ width))
shr-indentation shr-table-separator-pixel-width)
(frame-width))
(setq truncate-lines t))
@@ -2315,13 +2315,14 @@ flags that control whether to collect or render objects."
(defun shr-dom-max-natural-width (dom max)
(if (eq (dom-tag dom) 'table)
(max max (or
- (loop for line in (dom-attr dom 'shr-suggested-widths)
- maximize (+
- shr-table-separator-length
- (loop for elem in line
- summing
- (+ (cdr elem)
- (* 2 shr-table-separator-length)))))
+ (cl-loop
+ for line in (dom-attr dom 'shr-suggested-widths)
+ maximize (+
+ shr-table-separator-length
+ (cl-loop for elem in line
+ summing
+ (+ (cdr elem)
+ (* 2 shr-table-separator-length)))))
0))
(dolist (child (dom-children dom))
(unless (stringp child)