branch: externals/doc-toc
commit eb8c6a0c00e811688a8852ef25fdddfa2bafe6e5
Author: Daniel Nicolai <[email protected]>
Commit: Daniel Nicolai <[email protected]>
Fix seq and cl compiler warnings
---
README.org | 4 ++--
toc-mode.el | 11 ++++++++---
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 6ee13df2b4..aea75eaac6 100644
--- a/README.org
+++ b/README.org
@@ -131,8 +131,8 @@ document's folder, or you can delete the outline source
buffer and run
file that can be used with
[[http://handyoutlinerfo.sourceforge.net/][HandyOutliner]] (unfortunately the
handyoutliner
command does not take arguments, but if you customize the
[[help:toc-handyoutliner-path][toc-handyoutliner-path]]
and [[help:toc-file-browser-command][toc-file-browser-command]] variables,
then Emacs will try to open
-HandyOutliner and the file browser so that you can drag the files directly into
-HandyOutliner).
+HandyOutliner and the file browser so that you can drag the file ~contents.txt~
+directly into HandyOutliner).
diff --git a/toc-mode.el b/toc-mode.el
index d2075a210a..50d8c7409f 100644
--- a/toc-mode.el
+++ b/toc-mode.el
@@ -163,6 +163,7 @@
(require 'pdf-tools nil t)
(require 'djvu nil t)
(require 'evil nil t)
+(require 'seq)
;; List of declarations to eliminate byte-compile errors
(defvar djvu-doc-image)
@@ -515,7 +516,7 @@ Prompt for startpage and endpage and print OCR output to
new buffer."
lines
(list (list nil
(vector
- (number-to-string (cl-position spaces levels))
+ (number-to-string (seq-position levels spaces))
(mapconcat #'identity (butlast line-list) " ")
(mapconcat #'identity (last line-list) " "))))))
(forward-line)))
@@ -739,7 +740,10 @@ to `pdfoutline' shell command."
(interactive)
(start-process ""
nil
- toc-handyoutliner-path)
+ toc-handyoutliner-path))
+
+(defun toc--open-filepath-in-file-browser ()
+ (interactive)
(let ((process-connection-type nil))
(start-process ""
nil
@@ -768,7 +772,8 @@ to `pdfoutline' shell command."
(insert text))
(save-buffer)
(when (and toc-handyoutliner-path toc-file-browser-command)
- (toc--open-handy-outliner)))
+ (toc--open-handy-outliner)
+ (toc--open-filepath-in-file-browser)))
;;;; add outline to document