emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] `org-macro--collect-macros' can collect macro definitions from include files
@ 2014-02-05 16:09 Fabrice Niessen
  2014-02-05 16:17 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Niessen @ 2014-02-05 16:09 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

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" <fni-news-TA4HMoP+1wHrZ44/DZwexQ@public.gmane.org>
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/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-05 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 16:09 [PATCH] `org-macro--collect-macros' can collect macro definitions from include files Fabrice Niessen
2014-02-05 16:17 ` Bastien
2014-02-05 16:27   ` Nicolas Goaziou
     [not found]     ` <8738jx34p1.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-05 20:11       ` Fabrice Niessen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).