summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-06-17 18:16:26 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-06-17 18:16:26 +0200
commit0cd85674a59c7ae4e2f3bcf331b82eba51a14ec1 (patch)
tree6a4f69c46ff66805edfc1ec8eb3759ad345369f5
parentcdb13c76e41886f46cd136d45544b98855f6a1ec (diff)
downloadorg-mode-0cd85674a59c7ae4e2f3bcf331b82eba51a14ec1.tar.gz
Fix stuff for org-exp-blocks.el
-rw-r--r--ChangeLog6
-rw-r--r--Makefile2
-rwxr-xr-xlisp/ChangeLog2
-rw-r--r--lisp/org-exp-blocks.el46
4 files changed, 39 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d6621a..a62733a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-17 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * Makefile (LISPF): Add org-exp-blocks.el.
+ (lisp/org-exp-blocks.elc): Add dependencies for
+ org-exp-blocks.el.
+
2009-03-31 Carsten Dominik <carsten.dominik@gmail.com>
* Makefile (LISPF): Add org-inlinetask.el
diff --git a/Makefile b/Makefile
index 6facd9f..6971f9e 100644
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ LISPF = org.el \
org-colview-xemacs.el \
org-compat.el \
org-exp.el \
+ org-exp-blocks.el \
org-docbook.el \
org-faces.el \
org-feed.el \
@@ -338,6 +339,7 @@ lisp/org-colview.elc: lisp/org.el
lisp/org-colview-xemacs.elc: lisp/org.el
lisp/org-compat.elc: lisp/org-macs.el
lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
+lisp/org-exp-blocks.elc: lisp/org.el
lisp/org-latex.elc: lisp/org.el lisp/org-exp.el
lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a7f264c..ca4e57e 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2009-06-17 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-exp-blocks.el: Declare functions and variables.
+
* org-remember.el (org-remember-templates): Allow the headline
element to be a function.
(org-remember-apply-template): If the headline is a function, call
diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el
index 3422d09..848fc13 100644
--- a/lisp/org-exp-blocks.el
+++ b/lisp/org-exp-blocks.el
@@ -74,7 +74,18 @@
(require 'org)
-(defun org-exp-blocks-set (var value)
+(defvar comint-last-input-end)
+(defvar comint-prompt-regexp)
+(defvar comint-last-input-end)
+(defvar htmlp)
+(defvar latexp)
+(defvar docbookp)
+(defvar asciip)
+
+(declare-function comint-send-input "comint" (&optional no-newline artificial))
+(declare-function R "ess" nil)
+
+(defun org-export-blocks-set (var value)
"Set the value of `org-export-blocks' and install fontification."
(set var value)
(mapc (lambda (spec)
@@ -86,21 +97,6 @@
(symbol-name (car spec)))))
value))
-(defun org-export-blocks-add-block (block-spec)
- "Add a new block type to `org-export-blocks'. BLOCK-SPEC
-should be a three element list the first element of which should
-indicate the name of the block, the second element should be the
-formatting function called by `org-export-blocks-preprocess' and
-the third element a flag indicating whether these types of blocks
-should be fontified in org-mode buffers (see
-`org-protecting-blocks'). For example the BLOCK-SPEC for ditaa
-blocks is as follows...
-
- (ditaa org-export-blocks-format-ditaa nil)"
- (unless (member block-spec org-export-blocks)
- (setq org-export-blocks (cons block-spec org-export-blocks))
- (org-export-blocks-set 'org-export-blocks)))
-
(defcustom org-export-blocks
'((comment org-export-blocks-format-comment t)
(ditaa org-export-blocks-format-ditaa nil)
@@ -117,7 +113,22 @@ Each block export function should accept three argumets..."
(symbol :tag "Block name")
(function :tag "Block formatter")
(boolean :tag "Fontify content as Org syntax")))
- :set 'org-exp-blocks-set)
+ :set 'org-export-blocks-set)
+
+(defun org-export-blocks-add-block (block-spec)
+ "Add a new block type to `org-export-blocks'. BLOCK-SPEC
+should be a three element list the first element of which should
+indicate the name of the block, the second element should be the
+formatting function called by `org-export-blocks-preprocess' and
+the third element a flag indicating whether these types of blocks
+should be fontified in org-mode buffers (see
+`org-protecting-blocks'). For example the BLOCK-SPEC for ditaa
+blocks is as follows...
+
+ (ditaa org-export-blocks-format-ditaa nil)"
+ (unless (member block-spec org-export-blocks)
+ (setq org-export-blocks (cons block-spec org-export-blocks))
+ (org-export-blocks-set 'org-export-blocks org-export-blocks)))
(defcustom org-export-interblocks
'((r org-export-interblocks-format-R)
@@ -308,6 +319,7 @@ other backends, it converts the comment into an EXAMPLE segment."
(defvar interblock-R-buffer nil
"Holds the buffer for the current R process")
+(defvar count) ; dynamicaly scoped from `org-export-blocks-preprocess'?
(defun org-export-blocks-format-R (body &rest headers)
"Process R blocks and replace \R{} forms outside the blocks
with their values as determined by R."