emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH] `org-macro--collect-macros' can collect macro definitions fr


From: Fabrice Niessen
Subject: [O] [PATCH] `org-macro--collect-macros' can collect macro definitions from include files
Date: Wed, 05 Feb 2014 17:09:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Hello,

As the DOCSTRING of the function `org-macro--collect-macros' tells it,
it "collects macro definitions in current buffer and setup files", not
from INCLUDE files.

This patch ensures that the above does work.

>From a8737be0b12ce700cd348c47f91694bfc0fbe7b8 Mon Sep 17 00:00:00 2001
From: "Fabrice Niessen" <address@hidden>
Date: Wed, 5 Feb 2014 16:59:58 +0100
Subject: [PATCH] Collect macro definitions from INCLUDE files as well

* org-macro.el (org-macro--collect-macros): INCLUDE files are looked up
when searching for macro definitions.

---
 lisp/org-macro.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index 50ce438..7f438ed 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -78,7 +78,7 @@ Return an alist containing all macro templates found."
              (org-with-wide-buffer
               (goto-char (point-min))
               (while (re-search-forward
-                      "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\):" nil t)
+                      "^[ \t]*#\\+\\(MACRO\\|SETUPFILE\\|INCLUDE\\):" nil t)
                 (let ((element (org-element-at-point)))
                   (when (eq (org-element-type element) 'keyword)
                     (let ((val (org-element-property :value element)))

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




reply via email to

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