Jelajahi Sumber

contrib/lisp/org-lparse.el: New defcustom `org-lparse-use-flashy-warning'

* org-lparse.el (org-lparse-use-flashy-warning): New
defcustom.
(org-lparse-warn): Use it.
Bastien Guerry 14 tahun lalu
induk
melakukan
b5feb951a4
1 mengubah file dengan 10 tambahan dan 3 penghapusan
  1. 10 3
      contrib/lisp/org-lparse.el

+ 10 - 3
contrib/lisp/org-lparse.el

@@ -442,6 +442,11 @@ The variable is an list of the form (PROCESS ARG1 ARG2 ARG3
 %D output dir as a URL"
   :group 'org-export)
 
+(defcustom org-lparse-use-flashy-warning t
+  "Use flashy warnings when exporting to ODT."
+  :type 'boolean
+  :group 'org-export)
+
 (defun org-export-convert (&optional in-file fmt)
   "Convert file from one format to another using a converter.
 IN-FILE is the file to be converted.  If unspecified, it defaults
@@ -1980,9 +1985,11 @@ Replaces invalid characters with \"_\"."
        (org-lparse-format 'FONTIFY snumber (format "section-number-%d" level))))
 
 (defun org-lparse-warn (msg)
-  (put-text-property 0 (length msg) 'face 'font-lock-warning-face msg)
-  (message msg)
-  (sleep-for 3))
+  (if (not org-lparse-use-flashy-warning)
+      (message msg)
+    (put-text-property 0 (length msg) 'face 'font-lock-warning-face msg)
+    (message msg)
+    (sleep-for 3)))
 
 (defun org-xml-format-href (s)
   "Make sure the S is valid as a href reference in an XHTML document."