branch: externals/org-transclusion
commit 2b3003c24528dfd84314ca493e0483f78ccaa70d
Author: Noboru Ota <[email protected]>
Commit: Noboru Ota <[email protected]>

    fix: compilation errors
---
 org-transclusion-html.el        | 19 ++++++++++---------
 org-transclusion-indent-mode.el | 30 +++++++++++-------------------
 org-transclusion-src-lines.el   |  3 +--
 org-transclusion-transient.el   | 15 +++++++--------
 org-transclusion.el             |  3 ++-
 5 files changed, 31 insertions(+), 39 deletions(-)

diff --git a/org-transclusion-html.el b/org-transclusion-html.el
index 15e9b3c700..80613db74a 100644
--- a/org-transclusion-html.el
+++ b/org-transclusion-html.el
@@ -31,13 +31,22 @@
 
 ;;;; Requirements
 
-(require 'org-transclusion)
 (require 'org)
 (require 'org-element)
 (require 'cl-lib)
 (require 'pcase)
 (require 'dom)
 
+(declare-function org-transclusion-extension-functions-add-or-remove 
"org-transclusion.el")
+
+(defvar org-transclusion-html-extension-functions
+  (list (cons 'org-transclusion-add-functions 
#'org-transclusion-html-add-file))
+  "Alist of functions to activate `org-transclusion-html'.
+CAR of each cons cell is a symbol name of an abnormal hook
+\(*-functions\). CDR is either a symbol or list of symbols, which
+are names of functions to be called in the corresponding abnormal
+hook.")
+
 ;;;; Hook into org-transclusion
 
 ;;;###autoload
@@ -51,14 +60,6 @@
     (org-transclusion-extension-functions-add-or-remove
      org-transclusion-html-extension-functions :remove)))
 
-(defvar org-transclusion-html-extension-functions
-  (list (cons 'org-transclusion-add-functions 
#'org-transclusion-html-add-file))
-  "Alist of functions to activate `org-transclusion-html'.
-CAR of each cons cell is a symbol name of an abnormal hook
-\(*-functions\). CDR is either a symbol or list of symbols, which
-are names of functions to be called in the corresponding abnormal
-hook.")
-
 ;;;; Functions
 
 ;;;;; Add HTML file
diff --git a/org-transclusion-indent-mode.el b/org-transclusion-indent-mode.el
index 11658a144a..bb2ee4e941 100644
--- a/org-transclusion-indent-mode.el
+++ b/org-transclusion-indent-mode.el
@@ -53,13 +53,17 @@ Used to prevent premature mode deactivation during buffer 
refresh.")
   "Initialization state for waiting on org-indent.
 Either nil, t (initialized), or (TIMER ATTEMPT-COUNT).")
 
-;;;; Forward Declarations
-
-;; Silence byte-compiler warnings for functions defined in org-transclusion.el
-(declare-function org-transclusion-prefix-has-fringe-p "org-transclusion" 
(prefix))
-(declare-function org-transclusion-add-fringe-to-region "org-transclusion" 
(buffer beg end face))
-(declare-function org-transclusion-remove-fringe-from-region 
"org-transclusion" (buffer beg end))
-
+(defvar org-transclusion-indent-extension-functions
+  (list
+   (cons 'org-transclusion-after-add-functions
+         #'org-transclusion-indent--add-properties-and-fringes)
+   (cons 'org-transclusion-after-remove-functions
+         #'org-transclusion-indent--refresh-source-region))
+  "Alist of functions to activate `org-transclusion-indent-mode'.
+CAR of each cons cell is a symbol name of an abnormal hook
+\(*-functions\). CDR is either a symbol or list of symbols, which
+are names of functions to be called in the corresponding abnormal
+hook.")
 
 ;; Variable defined by define-minor-mode later in this file
 (defvar org-transclusion-indent-mode)
@@ -298,18 +302,6 @@ Adds `post-command-hook' to detect when source overlays 
appear."
 ;; Auto-setup in org-mode buffers - add late to hook like org-modern-indent
 (add-hook 'org-mode-hook #'org-transclusion-indent-mode-setup 90)
 
-(defvar org-transclusion-indent-extension-functions
-  (list
-   (cons 'org-transclusion-after-add-functions
-         #'org-transclusion-indent--add-properties-and-fringes)
-   (cons 'org-transclusion-after-remove-functions
-         #'org-transclusion-indent--refresh-source-region))
-  "Alist of functions to activate `org-transclusion-indent-mode'.
-CAR of each cons cell is a symbol name of an abnormal hook
-\(*-functions\). CDR is either a symbol or list of symbols, which
-are names of functions to be called in the corresponding abnormal
-hook.")
-
 (provide 'org-transclusion-indent-mode)
 
 ;;; org-transclusion-indent-mode.el ends here
diff --git a/org-transclusion-src-lines.el b/org-transclusion-src-lines.el
index 663678e0e4..341367f622 100644
--- a/org-transclusion-src-lines.el
+++ b/org-transclusion-src-lines.el
@@ -25,7 +25,6 @@
 
 ;;; Code:
 
-(require 'org-transclusion)
 (require 'org-element)
 (declare-function text-clone-make-overlay "text-clone")
 (declare-function org-transclusion-live-sync-buffers-others-default
@@ -219,7 +218,7 @@ it means from line 10 to the end of file."
   "Go to the beginning of chunk CHUNK-NAME."
   (goto-char (point-min))
   (re-search-forward (format "<<%s>>=" chunk-name) nil t)
-  (next-line)
+  (forward-line 1)
   (line-beginning-position))
 
 (defun org-transclusion--goto-noweb-chunk-end ()
diff --git a/org-transclusion-transient.el b/org-transclusion-transient.el
index e01da93687..0360fe6663 100644
--- a/org-transclusion-transient.el
+++ b/org-transclusion-transient.el
@@ -25,7 +25,6 @@
 ;;  `org-transclusion-transient-menu'. This command will call a different menu
 ;;  depending on whether the point is at a transcluded content.
 
-(require 'org-transclusion)
 (require 'transient) ; Need more recent than that comes with 29.4; tested on
                      ; transient-20241224.2234
 
@@ -148,10 +147,9 @@ transcluded content or not."
   (interactive)
   (unless (derived-mode-p 'org-mode)
     (user-error "`org-transclusion' works only in `org' buffer"))
-  (let ((org-transclusion-buffer (current-buffer)))
-    (if (org-transclusion-within-transclusion-p)
-        (org-transclusion-transient--at-point-menu)
-      (org-transclusion-transient--buffer-menu))))
+  (if (org-transclusion-within-transclusion-p)
+      (call-interactively 'org-transclusion-transient--at-point-menu)
+    (call-interactively 'org-transclusion-transient--buffer-menu)))
 
 ;; Private functions
 
@@ -174,7 +172,8 @@ See `org-transclusion-transient--setup'"
     (setq org-transclusion-transient-repeat-mode-was-active-p nil)))
 
 (defun org-transclusion-transient--read-level (&rest _)
-  "Read a string from the minibuffer, restricted to the range 1 to 9 or an 
empty value."
+  "Read a string from the minibuffer.
+The string is restricted to the range 1 to 9 or anempty value."
   (cl-loop for result =
            (read-string "Enter org-transclusion content headline\
 level (1-9) or leave empty: ")
@@ -202,7 +201,7 @@ level (1-9) or leave empty: ")
   :transient 'transient--do-stay
   (interactive)
   (org-transclusion-insert)
-  (org-transclusion-transient--buffer-menu))
+  (call-interactively 'org-transclusion-transient--buffer-menu))
 
 (transient-define-suffix org-transclusion-transient--level ()
   "Add :level property to transclude keyword.
@@ -329,7 +328,7 @@ for the transcluded content."
   :transient 'transient--do-stay
   (interactive)
   (org-transclusion-add)
-  (org-transclusion-transient--at-point-menu))
+  (call-interactively 'org-transclusion-transient--at-point-menu))
 
 (provide 'org-transclusion-transient)
 
diff --git a/org-transclusion.el b/org-transclusion.el
index cf9be8fd14..480a53dfab 100644
--- a/org-transclusion.el
+++ b/org-transclusion.el
@@ -2216,7 +2216,8 @@ FORCE will let this function ignore
             (progn
               (require ext)
               (when (fboundp minor-mode) (funcall minor-mode +1)))
-          (error (message "Problems while trying to load feature `%s'" ext)))))
+          (error (message "Org-transclusion: \
+Problems while trying to load feature `%s'" ext)))))
     (setq org-transclusion-extensions-loaded t)))
 
 (defun org-transclusion-extension-set-a-hook-functions (add-or-remove list)

Reply via email to