From e56e2c8760dc6537414c21cd629de0735a44c676 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 12 Dec 2011 18:04:15 +0100 Subject: [PATCH] Silent a few byte-compiler warnings. * org.el (org-block-regexp) (org-heading-keyword-regexp-format) (org-heading-keyword-maybe-regexp-format): Move up to keep the byte-compiler happy. * org-special-blocks.el (org-html): Require 'org-html. (org-open-par, org-close-par-maybe): Declare as functions. * ob.el (org-reduce): Declare as a function. (org-current-export-file): Declare. * ob-ref.el (org-babel-update-intermediate): Make a defvar. --- lisp/ob-ref.el | 2 +- lisp/ob.el | 2 ++ lisp/org-special-blocks.el | 4 ++++ lisp/org.el | 32 ++++++++++++++++---------------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index fdfff329b..fb3bff616 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -66,7 +66,7 @@ (defvar org-babel-ref-split-regexp "[ \f\t\n\r\v]*\\(.+?\\)[ \f\t\n\r\v]*=[ \f\t\n\r\v]*\\(.+\\)[ \f\t\n\r\v]*") -(defcustom org-babel-update-intermediate nil +(defvar org-babel-update-intermediate nil "Update the in-buffer results of code blocks executed to resolve references.") (defun org-babel-ref-parse (assignment) diff --git a/lisp/ob.el b/lisp/ob.el index 493f8c65d..1fdda8c0b 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -32,6 +32,7 @@ (defvar org-src-lang-modes) (defvar org-babel-library-of-babel) (declare-function show-all "outline" ()) +(declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) (declare-function tramp-compat-make-temp-file "tramp-compat" (filename &optional dir-flag)) (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) @@ -240,6 +241,7 @@ Returns a list (setf (nth 2 info) (org-babel-process-params (nth 2 info)))) (when info (append info (list name indent))))) +(defvar org-current-export-file) ; dynamically bound (defun org-babel-confirm-evaluate (info) "Confirm evaluation of the code block INFO. This behavior can be suppressed by setting the value of diff --git a/lisp/org-special-blocks.el b/lisp/org-special-blocks.el index 590d30d97..86caa4d4f 100644 --- a/lisp/org-special-blocks.el +++ b/lisp/org-special-blocks.el @@ -36,8 +36,12 @@ ;; user to add this class to his or her stylesheet if this div is to ;; mean anything. +(require 'org-html) (require 'org-compat) +(declare-function org-open-par "org-html" ()) +(declare-function org-close-par-maybe "org-html" ()) + (defvar org-special-blocks-ignore-regexp "^\\(LaTeX\\|HTML\\)$" "A regexp indicating the names of blocks that should be ignored by org-special-blocks. These blocks will presumably be diff --git a/lisp/org.el b/lisp/org.el index 542e8bcca..6ad9b5439 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4447,6 +4447,22 @@ means to push this value onto the list in the variable.") (org-remove-if (lambda (p) (string= (car p) key)) props))) (cons (cons key val) props))) +(defconst org-block-regexp + "^[ \t]*#\\+begin_?\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_?\\1[ \t]*$" + "Regular expression for hiding blocks.") +(defconst org-heading-keyword-regexp-format + "^\\(\\*+\\)\\(?: +%s\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" + "Printf format for a regexp matching an headline with some keyword. +This regexp will match the headline of any node which has the +exact keyword that is put into the format. The keyword isn't in +any group by default, but the stars and the body are.") +(defconst org-heading-keyword-maybe-regexp-format + "^\\(\\*+\\)\\(?: +%s\\)?\\(?: +\\(.*?\\)\\)?[ \t]*$" + "Printf format for a regexp matching an headline, possibly with some keyword. +This regexp can match any headline with the specified keyword, or +without a keyword. The keyword isn't in any group by default, +but the stars and the body are.") + (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) @@ -4869,18 +4885,6 @@ sure that we are at the beginning of the line.") (defconst org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" "Matches an headline, putting stars and text into groups. Stars are put in group 1 and the trimmed body in group 2.") -(defconst org-heading-keyword-regexp-format - "^\\(\\*+\\)\\(?: +%s\\)\\(?: +\\(.*?\\)\\)?[ \t]*$" - "Printf format for a regexp matching an headline with some keyword. -This regexp will match the headline of any node which has the -exact keyword that is put into the format. The keyword isn't in -any group by default, but the stars and the body are.") -(defconst org-heading-keyword-maybe-regexp-format - "^\\(\\*+\\)\\(?: +%s\\)?\\(?: +\\(.*?\\)\\)?[ \t]*$" - "Printf format for a regexp matching an headline, possibly with some keyword. -This regexp can match any headline with the specified keyword, or -without a keyword. The keyword isn't in any group by default, -but the stars and the body are.") ;;;###autoload (define-derived-mode org-mode outline-mode "Org" @@ -6631,10 +6635,6 @@ DATA should have been made by `org-outline-overlay-data'." ;;; Folding of blocks -(defconst org-block-regexp - "^[ \t]*#\\+begin_?\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_?\\1[ \t]*$" - "Regular expression for hiding blocks.") - (defvar org-hide-block-overlays nil "Overlays hiding blocks.") (make-variable-buffer-local 'org-hide-block-overlays) -- 2.11.4.GIT