]> git.eshelyaron.com Git - emacs.git/commitdiff
(makefile-mode): Call makefile-define-space-face only if it is defined.
authorRichard M. Stallman <rms@gnu.org>
Fri, 10 Nov 1995 04:44:37 +0000 (04:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 10 Nov 1995 04:44:37 +0000 (04:44 +0000)
(makefile-define-space-face): Create the face unconditionally;
alter it only if have X.

lisp/progmodes/make-mode.el

index 51e2651fc4bff4c34bd4d82dd41a0b1fa6137b2f..eac011ea8e12b46d3e0f97861f4eb91c038a0bd4 100644 (file)
@@ -487,7 +487,8 @@ makefile-special-targets-list:
   (make-local-variable 'makefile-need-macro-pickup)
 
   ;; Font lock.
-  (makefile-define-space-face)
+  (if (fboundp 'makefile-define-space-face)
+      (makefile-define-space-face))
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(makefile-font-lock-keywords))
 
@@ -1362,18 +1363,18 @@ Uses `makefile-use-curly-braces-for-macros-p'."
     (nreverse alist)))
 
 (defun makefile-define-space-face ()
-  (if (eq window-system 'x)
-      (make-face 'makefile-space-face))
-  (or (face-differs-from-default-p 'makefile-space-face)
+  (make-face 'makefile-space-face)
+  (or (not (eq window-system 'x))
+      (face-differs-from-default-p 'makefile-space-face)
       (let* ((params (frame-parameters))
             (light-bg (cdr (assq 'background-mode params)))
             (bg-color (cond ((eq (cdr (assq 'display-type params)) 'mono)
                              (if light-bg "black" "white"))
                             ((eq (cdr (assq 'display-type params)) 'grayscale)
                              (if light-bg "black" "white"))
-                            (light-bg          ; Light color background.
+                            (light-bg  ; Light color background.
                              "hotpink")
-                            (t                 ; Dark color background.
+                            (t         ; Dark color background.
                              "hotpink"))))
        (set-face-background 'makefile-space-face bg-color))))