Browse Source

org.el: Use `buffer-face-mode' to remap the 'default face to 'org-default.

* org.el (org-mode): Use `buffer-face-mode' to remap the
'default face to 'org-default.

Thanks to Du Yanning for raising an issue that this patch circumvents.
Bastien Guerry 13 years ago
parent
commit
f9cea3ea1e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -5025,8 +5025,9 @@ The following commands are available:
   (set (make-local-variable 'pcomplete-parse-arguments-function)
        'org-parse-arguments)
   (set (make-local-variable 'pcomplete-termination-string) "")
-  (set (make-local-variable 'face-remapping-alist)
-       '((default org-default)))
+  (when (>= emacs-major-version 23)
+    (set (make-local-variable 'buffer-face-mode-face) 'org-default)
+    (buffer-face-mode))
 
   ;; If empty file that did not turn on org-mode automatically, make it to.
   (if (and org-insert-mode-line-in-empty-file