From 7047aae31c9dd17dc6378d895379cb49c6a218dc Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sun, 3 May 2020 16:42:56 +0200 Subject: Remove unused depth argument --- nov.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nov.el') diff --git a/nov.el b/nov.el index d1286af..8097fb1 100644 --- a/nov.el +++ b/nov.el @@ -347,14 +347,14 @@ Each alist item consists of the identifier and full path." (nov--content-epub2-files content manifest files) (nov--content-epub3-files content manifest files)))) -(defun nov--walk-ncx-node (node depth) +(defun nov--walk-ncx-node (node) (let ((tag (esxml-node-tag node)) (children (--filter (eq (esxml-node-tag it) 'navPoint) (esxml-node-children node)))) (cond ((eq tag 'navMap) (insert "
    \n") - (mapc (lambda (node) (nov--walk-ncx-node node (1+ depth))) children) + (mapc (lambda (node) (nov--walk-ncx-node node)) children) (insert "
\n")) ((eq tag 'navPoint) (let* ((label-node (esxml-query "navLabel>text" node)) @@ -367,7 +367,7 @@ Each alist item consists of the identifier and full path." (if children (progn (insert (format "
  • \n%s\n
      \n" link)) - (mapc (lambda (node) (nov--walk-ncx-node node (1+ depth))) + (mapc (lambda (node) (nov--walk-ncx-node node)) children) (insert (format "
    \n
  • \n"))) (insert (format "
  • \n%s\n
  • \n" link))))))))) @@ -376,7 +376,7 @@ Each alist item consists of the identifier and full path." "Convert NCX document at PATH to HTML." (let ((root (esxml-query "navMap" (nov-slurp path t)))) (with-temp-buffer - (nov--walk-ncx-node root 0) + (nov--walk-ncx-node root) (buffer-string)))) -- cgit v1.2.3