浏览代码

Move constant definition so that org-html does not have to be loaded just for font-locking

Carsten Dominik 15 年之前
父节点
当前提交
bd8e816ea0
共有 3 个文件被更改,包括 12 次插入8 次删除
  1. 3 0
      lisp/ChangeLog
  2. 0 7
      lisp/org-html.el
  3. 9 1
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-08-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-export-html-special-string-regexps): Definition
+	moved into org.el
+
 	* org-exp.el (org-export-preprocess-apply-macros): Allow newlines
 	in macro calls.
 

+ 0 - 7
lisp/org-html.el

@@ -1883,13 +1883,6 @@ If there are links in the string, don't modify these."
 	      (setq start (+ start (length wd))))))))
   s)
 
-(defconst org-export-html-special-string-regexps
-  '(("\\\\-" . "&shy;")
-    ("---\\([^-]\\)" . "&mdash;\\1")
-    ("--\\([^-]\\)" . "&ndash;\\1")
-    ("\\.\\.\\." . "&hellip;"))
-  "Regular expressions for special string conversion.")
-
 (defun org-export-html-convert-special-strings (string)
   "Convert special characters in STRING to HTML."
   (let ((all org-export-html-special-string-regexps)

+ 9 - 1
lisp/org.el

@@ -4451,7 +4451,15 @@ will be prompted for."
   "Regular expression for highlighting export special stuff.")
 (defvar org-match-substring-regexp)
 (defvar org-match-substring-with-braces-regexp)
-(defvar org-export-html-special-string-regexps)
+
+;; This should be with the exporter code, but we also use if for font-locking
+(defconst org-export-html-special-string-regexps
+  '(("\\\\-" . "&shy;")
+    ("---\\([^-]\\)" . "&mdash;\\1")
+    ("--\\([^-]\\)" . "&ndash;\\1")
+    ("\\.\\.\\." . "&hellip;"))
+  "Regular expressions for special string conversion.")
+
 
 (defun org-compute-latex-and-specials-regexp ()
   "Compute regular expression for stuff treated specially by exporters."