emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/toc-org ee70dd23e1 104/128: resolve missing functions warn


From: ELPA Syncer
Subject: [nongnu] elpa/toc-org ee70dd23e1 104/128: resolve missing functions warnings
Date: Sun, 2 Jan 2022 09:59:14 -0500 (EST)

branch: elpa/toc-org
commit ee70dd23e1f12e2df5660814cef6489bd6864353
Author: Sergei Nosov <sergei.nosov@gmail.com>
Commit: Sergei Nosov <sergei.nosov@gmail.com>

    resolve missing functions warnings
---
 toc-org.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/toc-org.el b/toc-org.el
index ef84811875..aae301d6d9 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -44,6 +44,7 @@
 ;;; Code:
 
 (require 'org)
+(require 'thingatpt)
 
 (defgroup toc-org nil
   "toc-org is a utility to have an up-to-date table of contents
@@ -52,9 +53,9 @@ files on GitHub)"
   :group 'org)
 
 ;; just in case, simple regexp "^*.*:toc:\\($\\|[^ ]*:$\\)"
-(defconst toc-org-toc-org-regexp ".*?\\(<-- 
\\)?:toc\\([@_][0-9]\\|\\([@_][0-9][@_][a-zA-Z]+\\)\\)?:\\(\\( -->\\)?$\\|[^ 
]*?:\\( -->\\)?$\\)"
+(defconst toc-org-toc-org-regexp 
".*?\\(<--\s+\\)?:toc\\([@_][0-9]\\|\\([@_][0-9][@_][a-zA-Z]+\\)\\)?:\\(\\(\s+-->\\)?$\\|[^
 ]*?:\\(\s+-->\\)?$\\)"
   "Regexp to find the heading with the :toc: tag. It misses the heading symbol 
which must be added depending on the markup style (org vs markdown).")
-(defconst toc-org-quote-tag-regexp ":quote:\\(\\( -->\\)?$\\|[^ ]*?:\\( 
-->\\)?$\\)"
+(defconst toc-org-quote-tag-regexp ":quote:\\(\\(\s+-->\\)?$\\|[^ 
]*?:\\(\s+-->\\)?$\\)"
   "Regexp to find the heading with the :quote: tag")
 (defconst toc-org-noexport-regexp 
"\\(^*+\\)\s+.*:noexport\\([@_][0-9]\\)?:\\($\\|[^ ]*?:$\\)"
   "Regexp to find the extended version of :noexport: tag")
@@ -455,7 +456,7 @@ fallback to `markdown-follow-thing-at-point' on failure"
   (interactive "P")
   (let ((pos (point)))
     (toc-org-follow-markdown-link)
-    (when (equal pos (point))
+    (when (and (equal pos (point)) (fboundp 'markdown-follow-thing-at-point))
       (markdown-follow-thing-at-point arg))))
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]