Pārlūkot izejas kodu

Merge branch 'maint'

Kyle Meyer 9 gadi atpakaļ
vecāks
revīzija
23ca3fa100
7 mainītis faili ar 10 papildinājumiem un 10 dzēšanām
  1. 1 1
      lisp/org-clock.el
  2. 4 2
      lisp/org-compat.el
  3. 1 3
      lisp/org-src.el
  4. 1 1
      lisp/org.el
  5. 1 1
      lisp/ox-html.el
  6. 1 1
      lisp/ox-odt.el
  7. 1 1
      lisp/ox-org.el

+ 1 - 1
lisp/org-clock.el

@@ -2018,7 +2018,7 @@ fontified, and then returned."
     (org-mode)
     (org-mode)
     (org-create-dblock props)
     (org-create-dblock props)
     (org-update-dblock)
     (org-update-dblock)
-    (font-lock-ensure)
+    (org-font-lock-ensure)
     (forward-line 2)
     (forward-line 2)
     (buffer-substring (point) (progn
     (buffer-substring (point) (progn
 				(re-search-forward "^[ \t]*#\\+END" nil t)
 				(re-search-forward "^[ \t]*#\\+END" nil t)

+ 4 - 2
lisp/org-compat.el

@@ -409,8 +409,10 @@ Pass BUFFER to the XEmacs version of `move-to-column'."
   (defalias 'format-message 'format))
   (defalias 'format-message 'format))
 
 
 ;; `font-lock-ensure' is only available from 24.4.50 on
 ;; `font-lock-ensure' is only available from 24.4.50 on
-(unless (fboundp 'font-lock-ensure)
-  (defalias 'font-lock-ensure 'font-lock-fontify-buffer))
+(defalias 'org-font-lock-ensure
+  (if (fboundp 'font-lock-ensure)
+      #'font-lock-ensure
+    (lambda (&optional _beg _end) (font-lock-fontify-buffer))))
 
 
 (defmacro org-no-popups (&rest body)
 (defmacro org-no-popups (&rest body)
   "Suppress popup windows.
   "Suppress popup windows.

+ 1 - 3
lisp/org-src.el

@@ -502,9 +502,7 @@ as `org-src-fontify-natively' is non-nil."
 	  (delete-region (point-min) (point-max))
 	  (delete-region (point-min) (point-max))
 	  (insert string " ") ;; so there's a final property change
 	  (insert string " ") ;; so there's a final property change
 	  (unless (eq major-mode lang-mode) (funcall lang-mode))
 	  (unless (eq major-mode lang-mode) (funcall lang-mode))
-	  ;; Avoid `font-lock-ensure', which does not display fonts in
-	  ;; source block.
-	  (font-lock-fontify-buffer)
+	  (org-font-lock-ensure)
 	  (setq pos (point-min))
 	  (setq pos (point-min))
 	  (while (setq next (next-single-property-change pos 'face))
 	  (while (setq next (next-single-property-change pos 'face))
 	    (put-text-property
 	    (put-text-property

+ 1 - 1
lisp/org.el

@@ -6449,7 +6449,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
     (insert s)
     (insert s)
     (let ((org-odd-levels-only odd-levels))
     (let ((org-odd-levels-only odd-levels))
       (org-mode)
       (org-mode)
-      (font-lock-ensure)
+      (org-font-lock-ensure)
       (buffer-string))))
       (buffer-string))))
 
 
 (defvar org-m nil)
 (defvar org-m nil)

+ 1 - 1
lisp/ox-html.el

@@ -2050,7 +2050,7 @@ is the language used for CODE, as a string, or nil."
 		    (funcall lang-mode)
 		    (funcall lang-mode)
 		    (insert code)
 		    (insert code)
 		    ;; Fontify buffer.
 		    ;; Fontify buffer.
-		    (font-lock-ensure)
+		    (org-font-lock-ensure)
 		    ;; Remove formatting on newline characters.
 		    ;; Remove formatting on newline characters.
 		    (save-excursion
 		    (save-excursion
 		      (let ((beg (point-min))
 		      (let ((beg (point-min))

+ 1 - 1
lisp/ox-odt.el

@@ -3122,7 +3122,7 @@ and prefix with \"OrgSrc\".  For example,
 		 (with-temp-buffer
 		 (with-temp-buffer
 		   (insert code)
 		   (insert code)
 		   (funcall lang-mode)
 		   (funcall lang-mode)
-		   (font-lock-ensure)
+		   (org-font-lock-ensure)
 		   (buffer-string))))
 		   (buffer-string))))
 	 (fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string
 	 (fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string
 		      'org-odt--encode-plain-text))
 		      'org-odt--encode-plain-text))

+ 1 - 1
lisp/ox-org.el

@@ -298,7 +298,7 @@ Return output file name."
 	   (work-buffer (or visitingp (find-file-noselect filename)))
 	   (work-buffer (or visitingp (find-file-noselect filename)))
 	   newbuf)
 	   newbuf)
       (with-current-buffer work-buffer
       (with-current-buffer work-buffer
-        (font-lock-ensure)
+        (org-font-lock-ensure)
         (outline-show-all)
         (outline-show-all)
         (org-show-block-all)
         (org-show-block-all)
         (setq newbuf (htmlize-buffer)))
         (setq newbuf (htmlize-buffer)))