소스 검색

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.
Bastien Guerry 13 년 전
부모
커밋
e56e2c8760
4개의 변경된 파일23개의 추가작업 그리고 17개의 파일을 삭제
  1. 1 1
      lisp/ob-ref.el
  2. 2 0
      lisp/ob.el
  3. 4 0
      lisp/org-special-blocks.el
  4. 16 16
      lisp/org.el

+ 1 - 1
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)

+ 2 - 0
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

+ 4 - 0
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

+ 16 - 16
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)