From d8cbc4d7d961b2e8910fc7d51c018795c28457e4 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Tue, 26 Apr 2011 18:24:42 +0530 Subject: [PATCH] Fix byte-compiler warnings. * lisp/org-html.el (org-parse-warn): As above. Address byte-compiler warnings. * lisp/org-odt.el (org-odt-warn): Renamed to org-parse-warn and moved to org-html.el. Address byte-compiler warnings. --- lisp/org-html.el | 11 ++++++++--- lisp/org-odt.el | 11 +++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index e4891eb01..3f844d6a8 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -31,7 +31,7 @@ (require 'org-exp) (require 'format-spec) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl) (require 'table)) (declare-function org-id-find-id-file "org-id" (id)) (declare-function htmlize-region "ext:htmlize" (beg end)) @@ -1579,7 +1579,7 @@ PUB-DIR is set, use this as the publishing directory." (cond ((not to-buffer) (let ((f (org-parse-get 'SAVE-METHOD))) - (or (and f (functionp f) (funcall f filename)) + (or (and f (functionp f) (funcall f filename opt-plist)) (save-buffer))) (current-buffer)) ((eq to-buffer 'string) @@ -1886,7 +1886,7 @@ for further information." ;; happens in case of odt export. Strip the table from the ;; generated document. A better alternative would be to embed ;; the table as ascii text in the output document. - (org-odt-warn "Don't know how to export table.el table!") + (org-parse-warn "Don't know how to export table.el table!") ""))))) (defun org-export-splice-style (style extra) @@ -3338,6 +3338,11 @@ When TITLE is nil, just close all open levels." (not body-only) snumber level (org-parse-format 'FONTIFY snumber (format "section-number-%d" level)))) +(defun org-parse-warn (msg) + (put-text-property 0 (length msg) 'face 'font-lock-warning-face msg) + (message msg) + (sleep-for 3)) + ;;;_. preprocessor ;;;_. postamble diff --git a/lisp/org-odt.el b/lisp/org-odt.el index bd0b1e56f..5c4d4b8a3 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -1212,7 +1212,7 @@ MAY-INLINE-P allows inlining it as an image." (defconst org-odt-manifest-file-entry-tag "") -(defun org-odt-save-as-outfile (target) +(defun org-odt-save-as-outfile (target opt-plist) (org-odt-copy-styles-file) ;; Update styles.xml - take care of outline numbering @@ -1355,7 +1355,7 @@ MAY-INLINE-P allows inlining it as an image." ;; See http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01755.html ((or (eq (plist-get parameters :LaTeX-fragments) 'mathjax ) (eq (plist-get parameters :LaTeX-fragments) t )) - (org-odt-warn "MathJax not supported. Falling back to dvipng") + (org-parse-warn "MathJax not supported. Falling back to dvipng") 'dvipng) ((eq (plist-get parameters :LaTeX-fragments) 'dvipng ) 'dvipng) (t nil)))) @@ -1436,7 +1436,7 @@ MAY-INLINE-P allows inlining it as an image." "Outline numbering is retained only upto LEVEL. To disable outline numbering pass a LEVEL of 0." (if (not (string= org-export-odt-factory-settings (sha1 (current-buffer)))) - (org-odt-warn + (org-parse-warn "org-odt: Using custom styles file? Consider tweaking styles.xml for better output. To suppress this warning update `org-export-odt-factory-settings'") (goto-char (point-min)) (let ((regex @@ -1448,11 +1448,6 @@ To disable outline numbering pass a LEVEL of 0." (replace-match replacement t nil)))) (save-buffer 0))) -(defun org-odt-warn (msg) - (put-text-property 0 (length msg) 'face 'font-lock-warning-face msg) - (message msg) - (sleep-for 3)) - ;;;_ postamble (provide 'org-odt) -- 2.11.4.GIT