summaryrefslogtreecommitdiffhomepage
path: root/lib/doc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/doc')
-rw-r--r--lib/doc/jao-doc-view.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/doc/jao-doc-view.el b/lib/doc/jao-doc-view.el
index 713caf9..93bf316 100644
--- a/lib/doc/jao-doc-view.el
+++ b/lib/doc/jao-doc-view.el
@@ -121,7 +121,7 @@
(let ((page (or page (jao-doc-view-current-page)))
(outline jao--pdf-outline)
(cur-page 0)
- (cur-title (jao-doc-view-title)))
+ (cur-title (jao-doc-view-title buffer-file-name)))
(while (and (car outline) (< cur-page page))
(setq cur-page (cdr (assoc 'page (car outline))))
(when (<= cur-page page)
@@ -133,7 +133,8 @@
(if (or fname (not (derived-mode-p 'doc-view-mode 'pdf-view-mode)))
(let ((base (file-name-base (or fname (buffer-file-name)))))
(capitalize (replace-regexp-in-string "-" " " base)))
- (or (jao-doc-view-section-title) (jao-doc-view-title buffer-file-name))))
+ (or (jao-doc-view-section-title)
+ (when buffer-file-name (jao-doc-view-title buffer-file-name)))))
;;; imenu