unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Invalid face reference: quote
@ 2016-06-19  0:19 Davin Pearson
  2016-06-19 14:10 ` Emanuel Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Davin Pearson @ 2016-06-19  0:19 UTC (permalink / raw)
  To: help-gnu-emacs

I posted this message on June 7 but got no useful response, so I am posting it again in the hope that one of you braniacs could help me with my code...

Here is the output of my *Messages* buffer:

Here it is in the header file
Invalid face reference: quote [27 times]
Mark set
Invalid face reference: quote [24 times]
Mark set
Invalid face reference: quote [12 times]
Mark set
Invalid face reference: quote [12 times]
Mark set
Invalid face reference: quote [167 times]
<<< Type SPC or RET to bury the buffer list >>>
Invalid face reference: quote [8 times]

What is the reason for all of the "Invalid face reference: quote" error messages?  I have added the following setq's to my font lock file.  Is this anything to do with the error message?

(progn
  (setq fg:lightred                             'fg:lightred)
  (setq d-face-cc-illegal-type                  'd-face-cc-illegal-type)
  (setq d-face-super-comment                    'd-face-super-comment)
  (setq d-face-cc-allegro                       'd-face-cc-allegro)
  (setq fg:white                                'fg:white)
  (setq bg:lightmagenta                         'bg:lightmagenta)
  (setq d-face-cc-debugging                     'd-face-cc-debugging)
  (setq bg:lightgreen                           'bg:lightgreen)
  (setq d-face-property-inverse                 'd-face-property-inverse)
  (setq d-face-cc-debugging                     'd-face-cc-debugging)
  (setq fg:lightmagenta                         'fg:lightmagenta)
  (setq fg:lightgreen                           'fg:lightgreen)
  (setq d-face-m4                               'd-face-m4)
  (setq d-face-m4-dnl                           'd-face-m4-dnl)
  (setq d-face-cc-digits                        'd-face-cc-digits)
  (setq d-debug-face                            'd-debug-face)
  (setq d-checkpoint-face                       'd-checkpoint-face)
  (setq d-face-el-quote                         'd-face-el-quote)
  (setq d-face-cc-debugging                     'd-face-cc-debugging)
  (setq d-face-cc-allegro                       'd-face-cc-allegro)
  (setq d-face-cc-illegal-type                  'd-face-cc-illegal-type)
  (setq bg:yellow                               'bg:yellow)
  (setq d-face-cc-libd                          'd-face-cc-libd)
  (setq d-face-cc-ctor-dtor                     'd-face-cc-ctor-dtor)
  (setq d-face-cc-clib                          'd-face-cc-clib)
  (setq fg:lightmagenta                         'fg:lightmagenta)
  (setq d-face-cc-global                        'd-face-cc-global)
  (setq d-face-cc-illegal-type                  'd-face-cc-illegal-type)
  (setq d-face-red-and-white                    'd-face-red-and-white)
  (setq d-face-green-and-black                  'd-face-green-and-black)
  (setq d-face-el-d-stuff                       'd-face-el-d-stuff)
  (setq d-face-el-quote                         'd-face-el-quote)
  (setq d-face-cc-opengl                        'd-face-cc-opengl)
  (setq d-face-makefile-dollar-dollar-highlight 'd-face-makefile-dollar-dollar-highlight)
  (setq d-face-makefile-dollar-dollar           'd-face-makefile-dollar-dollar)
  (setq fg:white                                'fg:white)
  (setq bg:lightmagenta                         'bg:lightmagenta)
  (setq d-face-cc-debugging                     'd-face-cc-debugging)
  (setq d-face-cc-private                       'd-face-cc-private)
  (setq bg:lightgreen                           'bg:lightgreen)
  (setq d-face-property                         'd-face-property)
  (setq d-face-property-inverse                 'd-face-property-inverse)
  (setq fg:lightmagenta                         'fg:lightmagenta)
  (setq fg:lightgreen                           'fg:lightgreen)
  (setq fg:lightmagenta                         'fg:lightmagenta)
  (setq fg:lightmagenta                         'fg:lightmagenta)
  (setq fg:lightgreen                           'fg:lightgreen)
  (setq fg:red                                  'fg:red)
  (setq fg:lightred                             'fg:lightred)
  (setq bg:lightred                             'bg:lightred)
  (setq bg:yellow                               'bg:yellow)
  (setq d-face-path                             'd-face-path)
  (setq d-face-red-and-yellow                   'd-face-red-and-yellow)
  (setq dc-face-dired-web                       'dc-face-dired-web)
  (setq dc-face-dired-text                      'dc-face-dired-text)
  (setq dc-face-dired-executable                'dc-face-dired-executable)
  (setq dc-face-dired-sounds                    'dc-face-dired-sounds)
  (setq dc-face-dired-sources                   'dc-face-dired-sources)
  (setq dc-face-dired-archives                  'dc-face-dired-archives)
  (setq dc-face-dired-graphics                  'dc-face-dired-graphics)
  (setq dc-face-dired-movies                    'dc-face-dired-movies)
  (setq dc-face-dired-unimportant               'dc-face-dired-unimportant)
  (setq d-face-m4                               'd-face-m4)
  (setq d-face-m5                               'd-face-m5)
  (setq d-face-m6                               'd-face-m6)
  (setq d-face-makefile-space                   'd-face-makefile-space)
  (setq d-face-el-d-stuff2                      'd-face-el-d-stuff2)
  (setq d-face-green-and-yellow                 'd-face-green-and-yellow)
  (setq default                                 'default)
  (setq bold                                    'bold)
  (setq fg:lightblue                            'fg:lightblue)
  (setq underline                               'underline)
  )

I have also removed all of the quote characters from my font lock file like so:

(defun d-font-lock-mode-hook ()

  ;; removes FONT from modeline:
  ;;(if (assq 'font-lock-mode minor-mode-alist)
  ;;    (setcar (cdr (assq 'font-lock-mode minor-mode-alist)) " F"))

  (d-flock-checkpoint "1")

  ;;; COOL: font-lock-string-face
  (if (eq major-mode 'fundamental-mode)
      (setq font-lock-string-face nil)
    (set (make-local-variable 'font-lock-string-face) 'font-lock-string-face))

  (setq font-lock-keywords-case-fold-search nil)

  (d-flock-checkpoint "2")

  (d-flock-checkpoint "3")

  (when (and prefs-font-lisp++-p
             (or (eq major-mode 'emacs-lisp-mode)
                 (eq major-mode 'text-mode)
                 (and (buffer-file-name)
                      (or (string-match "eraseme" (buffer-file-name))
                          (string-match "\\.\\(method\\|lisp[+][+]\\|temp\\)$" (buffer-file-name))
                          )
                      )))
    (d-font-lock-add-begin
     '(
       ("std::" 0 fg:lightred t)
       ("\\<jit-lock-stealth-fontify\\>" 0 d-face-cc-illegal-type nil)
       ("\\<jit-lock-refontify\\>"       0 d-face-cc-illegal-type nil)
       ("\\<font-lock-fontify-buffer\\>" 0 fg:lightred            nil)
       )))

  )

instead of 'd-face-cc-illegal-type 
and 'fg:lightred.

Could this be the reason for the bug?

I have added the following helper function to the above code:

(defun d-font-lock-add-begin (keywords)
  (if (fboundp 'font-lock-add-keywords)
      (font-lock-add-keywords nil keywords nil)
    (setq font-lock-keywords
          (append
           keywords
           font-lock-keywords))))


^ permalink raw reply	[flat|nested] 26+ messages in thread
* Invalid face reference: quote
@ 2016-06-06 23:46 Davin Pearson
  2016-06-06 23:48 ` Barry Margolin
  0 siblings, 1 reply; 26+ messages in thread
From: Davin Pearson @ 2016-06-06 23:46 UTC (permalink / raw)
  To: help-gnu-emacs

When I am using GNU Emacs version 23.1.1 I frequently get the
following error in the *Messages* buffer:

Invalid face reference: quote [21 times] or more times

What am I doing wrong with font lock mode to get these error messages?

I have the following code set up for my fontification:

(progn
  (setq fg:white                'fg:white)
  (setq bg:lightmagenta         'bg:lightmagenta)
  (setq d-face-cc-debugging     'd-face-cc-debugging)
  (setq bg:lightgreen           'bg:lightgreen)
  (setq d-face-property-inverse 'd-face-property-inverse)
  (setq d-face-cc-debugging     'd-face-cc-debugging)
  (setq fg:lightmagenta         'fg:lightmagenta)
  (setq fg:lightgreen           'fg:lightgreen)
  (setq fg:lightmagenta         'fg:lightmagenta)
  (setq d-face-property         'd-face-property)
  (setq fg:lightmagenta         'fg:lightmagenta)
  (setq d-face-property         'd-face-property)
  (setq fg:lightmagenta         'fg:lightmagenta)
  (setq fg:lightgreen           'fg:lightgreen)
  (setq fg:lightred             'fg:lightred)
  (setq bg:lightred             'bg:lightred)
  (setq bg:yellow               'bg:yellow)
  )

What follows is some of my font lock code:

(add-hook 'font-lock-mode-hook 'd-font-lock-mode-hook--post t)

(setq prefs-font-xtra-p t)
(setq prefs-font-p t)
(setq os-type--mswindows-p t)
(setq emacs-dialect--gnuemacs-p t)
(setq emacs-dialect--xemacs-p nil)

(defun d-font-lock-mode-hook--post ()

  (when (and prefs-font-xtra-p (or (eq major-mode 'c-mode)
                                   (eq major-mode 'c++-mode)
                                   (eq major-mode 'java-mode)
                                   (eq major-mode 'html-mode)
                                   ))
    (d-font-lock-add-end
     '(
       ("^[ \t]*//.*$"  0 'font-lock-comment-face t)
       ("^[ \t]*///.*$" 0 d-face-super-comment   t)
       )))

  (when t;;(and prefs-font-p prefs-font-xtra-p);; (not noninteractive))
    (when (or (eq major-mode 'c-mode)
              (eq major-mode 'c++-mode)
              (eq major-mode 'java-mode)
              (eq major-mode 'haskell-mode)
              (eq major-mode 'asm-mode)
              (eq major-mode 'html-mode)
              (eq major-mode 'php-mode)
              (eq major-mode 'emacs-lisp-mode)
              (eq major-mode 'lisp-mode)
              (eq major-mode 'prolog-mode)
              (eq major-mode 'makefile-mode)
              (eq major-mode 'pov-mode)
              (eq major-mode 'latex-mode)
              (eq major-mode 'fundamental-mode)
              (eq major-mode 'text-mode)
              (eq major-mode 'compilation-mode)
              (eq major-mode 'wiki-mode)
              (eq major-mode 'jtw-mode)
              (eq major-mode 'css-mode)
              (eq major-mode 'tes-mode)
              (eq major-mode 'c2j-mode)
              (eq major-mode 'sql-mode)
              )
      (d-font-lock-add-end
       '(
         ;; FOO-SAD-FSDF: sadfadf
         ;; NOTE: adfasdfosdf
         ;;("\\([ ]\\|^\\)\\(\\([A-z'-]+[ ]\\)*[A-Z][A-Z0-9.'-]+:\\) \\(.*$\\)"
         ;; (2 d-face-special-reference t) (4 d-face-cc-debugging t)) ;; was fg:white

         ("\\([A-Z][a-zA-Z0-9_]*\\)::" 1 'font-lock-type-face nil)
         ("\\([A-Z]*\\):" (1 fg:white nil))

         ;; QUESTION: hello (not smegged)
         ;;("DUCK" 1 d-face-property t)
         ("\\(\\<BACK ADDED:\\)\\(.*$\\)"                    (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<LIMITATION[-A-Z +]*:\\)\\(.*$\\)"           (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<CODE:\\)\\([A-Z +]*\\)\\(.*$\\)"            (1 bg:lightgreen t) (2 fg:lightgreen t) (3 'default t))
         ("\\(\\<NOT FOUND:\\)\\(.*$\\)"                     (1 bg:lightgreen t) (2 fg:lightgreen t))
         ("\\(\\<DELETE ?ME:\\)\\(.*$\\)"                    (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<FIXED:\\)\\(.*$\\)"                         (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<BURNED:\\)\\(.*$\\)"                        (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<SOLUTION:\\)\\(.*$\\)"                      (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<SEE:\\)\\(.*$\\)"                           (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<NEW[A-Z ]*:\\)\\(.*$\\)"                    (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<COPY:\\)\\(.*$\\)"                          (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<RENAME:\\)\\(.*$\\)"                        (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<PUT:\\)\\(.*$\\)"                           (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<URL:\\)\\(.*$\\)"                           (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<COOL:\\)\\(.*$\\)"                          (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<TOMORROW:\\)\\(.*$\\)"                      (1 d-face-cc-debugging t) (2 fg:lightgreen t))
         ("\\(\\<FAILED[A-Z +]*\\)\\(.*$\\)"                 (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<MISSING[A-Z +]*\\)\\(.*$\\)"                (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<REMOVE ?ME:\\)\\(.*$\\)"                    (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<PUT BACK:\\)\\(.*$\\)"                      (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<NOT DO:\\)\\(.*$\\)"                        (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<TEMP:\\)\\(.*$\\)"                          (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<SEARCH FOR:\\)\\(.*$\\)"                    (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<COMPILE:\\)\\(.*$\\)"                       (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ;;("\\(\\<ADD[A-Z ]*:\\)\\(.*$\\)"                  (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<FIXME[?:!]+\\)\\(.*$\\)"                    (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<BROKEN[-A-Z0-9 .+&/]*[:?]\\)\\(.*$\\)"       (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<TODO[-A-Z0-9 .+&/]*[:?]\\)\\(.*$\\)"         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<TEST[-A-Z0-9 .+]*[:?]\\)\\(.*$\\)"           (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<PULL ?OUT:\\)\\(.*$\\)"                     (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<LATER:\\)\\(.*$\\)"                         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<PROBLEM:\\)\\(.*$\\)"                       (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<CLASH:\\)\\(.*$\\)"                         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ;;("\\(\\<REVERTED[A-Z0-9 .]*:\\)\\(.*$\\)"         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<REVERTED[-A-Z0-9 .+]*:\\)\\(.*$\\)"           (1 d-face-property-inverse t) (2 d-face-property t))

         ("\\(\\<PULLED BACK[-A-Z0-9 .+]*:\\)\\(.*$\\)"        (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<DEBUG[-A-Z0-9 .+]*:\\)\\(.*$\\)"              (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<DEBUGGED[-A-Z0-9 .+]*:\\)\\(.*$\\)"           (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<OKAY[-A-Za-z0-9 +]*:\\)\\(.*$\\)"             (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<HOWTO[-A-Za-z0-9 +]*:\\)\\(.*$\\)"            (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<DOING:\\)\\(.*$\\)"                           (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<ISIN:\\)\\(.*$\\)"                            (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<RESOLVE CLASH:\\)\\(.*$\\)"                   (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<INSTALLED:\\)\\(.*$\\)"                       (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<PATCH[-A-Z0-9 +]*:\\)\\(.*$\\)"               (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<BUG[-A-Z0-9 +]*:\\)\\(.*$\\)"                 (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<WHY[-A-Z0-9 +]*[?:]+\\)\\(.*$\\)"             (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<WHEREIS[-A-Z0-9 +]*[?:]+\\)\\(.*$\\)"         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<PENDING[-A-Z0-9 +]*[?:]+\\)\\(.*$\\)"         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<WTF[-A-Z0-9 +]*[?:]+\\)\\(.*$\\)"             (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<WARNING[-A-Z0-9 +]*[?:]+\\)\\(.*$\\)"         (1 d-face-red-and-yellow t) (2 fg:red t))
         ("\\(\\<ERROR:\\)\\(.*$\\)"                         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<NOT[-a-zA-Z0-9'. +]*:\\)\\(.*$\\)"                         (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<URGENT:\\)\\(.*$\\)"                        (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<REDO:\\)\\(.*$\\)"                          (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<REMOVE:\\)\\(.*$\\)"                        (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<RESOLVE[-A-Z' +]*:\\)\\(.*$\\)"               (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<BUGGER[-A-Z' +]*:\\)\\(.*$\\)"                (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ("\\(\\<TIME[-A-Z +]*[:!?]\\)[ \t]+\\([^\r\n]*\\)"    (1 bg:lightgreen t)   (2 fg:lightgreen t))
         ("\\(\\<MILESTONE[:!?]\\)[ \t]+\\([^\r\n]*\\)"      (1 bg:lightgreen t)   (2 fg:lightgreen t))
         ("\\(\\<QUERY[:!?]\\)[ \t]+\\([^\r\n]*\\)"          (1 bg:lightmagenta t)   (2 fg:lightmagenta t))
         ("\\(\\<BUGFIXED:\\)\\(.*$\\)"                      (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<NOTE[-A-Z0-9 _.+/]*:\\)\\(.*$\\)"              (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<TOTAL[-A-Z0-9 +]*:\\)\\(.*$\\)"               (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<SPLATTED[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"         (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<SEMI[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"             (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<DONE[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"             (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<GOT[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"              (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<ADDED[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"            (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<CHANGED[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"          (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<REMOVED[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"          (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<DOWNLOADED[-A-Z0-9 .&/+]*:\\)\\(.*$\\)"       (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<NOT DONE[-A-Z0-9,. _+]*:\\)\\(.*$\\)"        (1 bg:lightmagenta t) (2 fg:lightmagenta t))
         ;;("\\(\\<SEMI[A-Z0-9 .&/]*:\\)\\(.*$\\)"           (1 d-face-property-inverse t) (2 d-face-property t))
         ("\\(\\<class:\\) \\([-a-zA-Z0-9_.+]*\\)"            (1 'bold t) (2 'font-lock-type-face t))
         ("\\(\\<constructor:\\) \\([-a-zA-Z0-9_.+]*\\)"      (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<method:\\) \\([-a-zA-Z0-9_.+]*\\)"           (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<methods:\\) \\(\\([-a-zA-Z0-9_.+]* *\\)*\\)" (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<function:\\) \\([-a-zA-Z0-9_.+]*\\)"         (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<variable:\\) \\([-a-zA-Z0-9_.+]*\\)"         (1 'bold t) (2 'font-lock-variable-name-face t))
         ("\\(\\<classVar:\\) \\([-a-zA-Z0-9_.+]*\\)"         (1 'bold t) (2 'font-lock-variable-name-face t))
         ("\\(\\<defun:\\) \\([-a-zA-Z0-9_.+]*\\)"            (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<defmacro:\\) \\([-a-zA-Z0-9_.+]*\\)"         (1 'bold t) (2 'font-lock-function-name-face t))
         ("\\(\\<file:\\) \\([a-zA-Z0-9_.+]*\\)"              (1 'bold t))
         ("\\(\\<line:\\) \\([0-9]+\\)"                       (1 'bold t) (2 fg:lightmagenta t))
         ("#[-a-zA-Z0-9'.:+]+"                                 0 'font-lock-function-name-face t)
         ;; \f end of smegs
         ("^[ \t]*\f[^\n\r]*[\r\n]"                            0 d-face-red-and-white t)
         ;;("\\<message-and-sit\\>"                            0 d-debug-face t)
         ;; IMPORTANT NOTES! sdfsdf
         ;; IMPORTANT NOTES? sdfsdff
         ("\\(\\<[A-Z]+[^a-z\r\n!:;()]*[A-Z0-9][!?]+\\)\\(.*$\\)"
          (1 d-face-green-and-yellow t)
          (2 bg:yellow t))
         ))
      ))

  )

(require 'font-lock)

(global-set-key "\C-c\C-l" 'd-fonts)

(defmacro d-quote (&rest ignored))

;;(checkpoint 1)

(defun d-fonts--init-base-colours ()

  (progn
    (make-face 'default)
    (set-face-background 'default bg-colour)
    (if prefs-bg-black-p
        (set-face-foreground 'default "#fff")
      (set-face-foreground 'default "#000"))
    (make-face-unbold 'default)
    )

  (progn
    (make-face 'bold)
    (set-face-background 'bold bg-colour)
    (make-face-bold 'bold))

  (progn
    (make-face 'font-lock-regexp-grouping-backslash)
    (set-face-foreground 'font-lock-regexp-grouping-backslash "#080")
    (set-face-background 'font-lock-regexp-grouping-backslash "#ccf")
    (make-face 'font-lock-regexp-grouping-construct)
    (set-face-foreground 'font-lock-regexp-grouping-construct "#080")
    (set-face-background 'font-lock-regexp-grouping-construct "#ccf")
    )

  (progn ;; BLUE:

    (make-face 'fg:blue)
    (if prefs-bg-black-p
        (set-face-foreground 'fg:blue "#6666ff")
      (set-face-foreground 'fg:blue "#0000ff")
      (make-face-bold 'fg:blue))

    (make-face 'fg:lightblue)
    (set-face-foreground 'fg:lightblue (if prefs-bg-black-p "#77aaff" "#0000ff"))
    (set-face-background 'fg:lightblue bg-colour)
    (if (not prefs-bg-black-p)
        (make-face-bold 'fg:lightblue)))

  (progn ;; BROWN:

    (make-face 'bg:brown)
    (set-face-background 'bg:brown "#aa7755")
    (set-face-foreground 'bg:brown bg-colour)
    (make-face 'fg:brown)
    (make-face-bold 'fg:brown)
    (set-face-foreground 'fg:brown "#aa7755"))

  (progn ;; CYAN:

    (make-face 'fg:cyan)
    (make-face-bold 'fg:cyan)
    (set-face-foreground 'fg:cyan "dark cyan")

    (make-face 'fg:lightcyan)
    (make-face-bold 'fg:lightcyan)
    (if prefs-bg-black-p
        (set-face-foreground 'fg:lightcyan "#0ff")
      (set-face-foreground 'fg:lightcyan "#0aa"))
    (set-face-background 'fg:lightcyan bg-colour)

    (make-face 'fg:cyan)
    (make-face 'bg:cyan)
    (set-face-background 'bg:cyan "dark cyan")
    (set-face-foreground 'bg:cyan bg-colour))

  (progn ;; GRAY:

    (make-face 'fg:darkgray)
    (set-face-foreground 'fg:darkgray "#888")

    (make-face 'bg:lightgray)
    (set-face-background 'bg:lightgray "#ccc")
    (set-face-foreground 'bg:lightgray "black")

    (make-face 'fg:lightgray)
    (if prefs-bg-black-p
        (progn
          (set-face-foreground 'fg:lightgray "#ccc")
          ;;(set-face-foreground
          )
      (progn
        (set-face-foreground 'fg:lightgray "#888")
        (set-face-background 'fg:lightgray bg-colour-lighter)))
    )

  (progn ;; GREEN:

    (make-face 'fg:green)
    (make-face-bold 'fg:green)
    (if prefs-bg-black-p
        (set-face-foreground 'fg:green "#0b0")
      (set-face-foreground 'fg:green "#0b0"))

    (make-face 'bg:green)
    (set-face-background 'bg:green "#00cc00")
    (set-face-foreground 'bg:green bg-colour)

    (make-face 'bg:lightgreen)
    (set-face-background 'bg:lightgreen "lightgreen")
    (set-face-foreground 'bg:lightgreen "black")

    (make-face 'fg:lightgreen)
    (if prefs-bg-black-p
        (set-face-foreground 'fg:lightgreen "#0d4")
      (set-face-foreground 'fg:lightgreen "#5c5"))
    (if (not prefs-bg-black-p)
        (make-face-bold 'fg:lightgreen))
    )

  (progn
    (make-face 'd-checkpoint-face)
    (set-face-foreground 'd-checkpoint-face "#c0c")
    (set-face-background 'd-checkpoint-face "#fff")
    (make-face-bold 'd-checkpoint-face))

  (progn
    (make-face 'd-debug-face)
    (set-face-foreground 'd-debug-face "#f00")
    (set-face-background 'd-debug-face "#fff")
    (make-face-bold 'd-debug-face))

  (progn ;; ORANGE:
    (make-face 'fg:orange)
    (make-face-bold 'fg:orange)
    (set-face-foreground 'fg:orange "#f80"))

  (progn ;; MAGENTA:
    (make-face 'fg:magenta)
    (make-face-bold 'fg:magenta)
    (set-face-foreground 'fg:magenta "magenta")

    (make-face 'bg:magenta)
    (set-face-background 'bg:magenta "magenta")
    (set-face-foreground 'bg:magenta bg-colour)

    (make-face 'fg:lightmagenta)
    (make-face-bold 'fg:lightmagenta)
    (set-face-foreground 'fg:lightmagenta "magenta")

    ;;
    ;; TODO: sdfasdfadfdf
    ;;
    (progn
      (make-face 'bg:lightmagenta)
      (make-face-bold 'bg:lightmagenta)
      (set-face-background 'bg:lightmagenta "magenta")
      (set-face-foreground 'bg:lightmagenta "white"))
    )

  (progn ;; RED:

    (make-face 'fg:red)
    (make-face-bold 'fg:red)
    (set-face-foreground 'fg:red "red")

    (make-face 'bg:red)
    (if prefs-bg-black-p
        (progn
          (set-face-background 'bg:red "#e00")
          (set-face-foreground 'bg:red bg-colour))
      (set-face-background 'bg:red "#f44")
      (set-face-foreground 'bg:red "#fff"))

    (progn
      (make-face 'fg:lightred)
      (set-face-foreground 'fg:lightred "#f33")
      ;;(set-face-background 'fg:lightred bg-colour)
      (if (not prefs-bg-black-p)
          (make-face-bold 'fg:lightred)))

    (progn
      (make-face 'bg:lightred)
      (set-face-foreground 'bg:lightred (if prefs-bg-black-p "black" "white"))
      (set-face-background 'bg:lightred "red"))

    )

  (progn ;; WHITE:

    (make-face 'fg:white)
    (make-face-bold 'fg:white)
    (if prefs-bg-black-p
        (progn
          (set-face-foreground 'fg:white "white")
          )
      (progn
        (set-face-foreground 'fg:white "black")
        ;;(set-face-background 'fg:white bg-colour-lighter)
        )))

  (progn ;; YELLOW:

    (make-face 'fg:yellow)
    (make-face-bold 'fg:yellow)
    (if prefs-bg-black-p
        (progn
          (set-face-foreground 'fg:yellow "yellow")
          (set-face-background 'fg:yellow bg-colour))
      (progn
        (set-face-foreground 'fg:yellow "yellow")
        (set-face-background 'fg:yellow "black")))

    (progn
      (make-face 'bg:yellow)
      (set-face-background 'bg:yellow "yellow")
      (set-face-foreground 'bg:yellow "black")
      (make-face-bold 'bg:yellow)))

  )

;;(checkpoint 2)

(defun d-fonts--init-pairs ()

  (progn
    (make-face 'd-face-blue-and-white)
    (set-face-foreground 'd-face-blue-and-white (if prefs-bg-black-p "white" "white"))
    (set-face-background 'd-face-blue-and-white
                         (cond
                          (prefs-bg-black-p "#44c")
                          (prefs-lcd-emacs-p "#aaf")
                          (t "#8888ff")))
    )

  (make-face 'd-face-red-and-white)
  (set-face-foreground 'd-face-red-and-white (if prefs-bg-black-p "white" "white"))
  (set-face-background 'd-face-red-and-white
                       (cond
                        (prefs-bg-black-p "red")
                        (prefs-lcd-emacs-p "#f00")
                        (t "#f00")))

  (make-face 'd-face-red-and-yellow)
  (set-face-foreground 'd-face-red-and-yellow "#ff0")
  (set-face-background 'd-face-red-and-yellow "#e00")

  (progn
    (make-face 'd-face-green-and-black)
    (set-face-foreground 'd-face-green-and-black (if prefs-bg-black-p "white" "black"))
    (set-face-background 'd-face-green-and-black (if prefs-bg-black-p "#080" "#8f8")))

  (progn
    (make-face 'd-face-green-and-yellow)
    (make-face-bold 'd-face-green-and-yellow)
    (set-face-background 'd-face-green-and-yellow (if prefs-bg-black-p "#080" "#8f8"))
    (set-face-foreground 'd-face-green-and-yellow (if prefs-bg-black-p "#ff0" "#000000"))
    )

  )

;;(checkpoint 3)

(defun d-fonts--init-d--faces ()

  (progn
    (copy-face 'fg:lightred 'd-face-link)
    (set-face-underline-p 'd-face-link t))

  (progn
    (copy-face 'fg:lightblue 'd-face-line)
    (set-face-underline-p 'd-face-line t))

  (progn
    (if prefs-bg-black-p
        (copy-face 'fg:cyan 'd-face-html-entity)
      (make-face 'd-face-html-entity))
    (make-face-bold 'd-face-html-entity)
    (if (not prefs-bg-black-p)
        (set-face-foreground 'd-face-html-entity "#f00")))

  (progn
    (make-face 'd-face-cc-global)
    (set-face-foreground 'd-face-cc-global "#0c0")
    (set-face-background 'd-face-cc-global bg-colour)
    (make-face-bold 'd-face-cc-global)
    ) ;; *cool-man*

  (progn
    (make-face 'd-face-el-d-stuff)
    (make-face-bold 'd-face-el-d-stuff)
    (set-face-foreground 'd-face-el-d-stuff (if prefs-bg-black-p "#cccc88" "#2244cc"))
    (copy-face 'fg:lightblue 'd-face-el-d-stuff2)
    (make-face-bold 'd-face-el-d-stuff2)
    )

  (progn
    (make-face 'd-face-lisp++-keywords)
    (set-face-background 'd-face-lisp++-keywords "#8f8")
    (set-face-foreground 'd-face-lisp++-keywords "#000000")
    (make-face-bold 'd-face-lisp++-keywords))

  (d-quote 123)

  (copy-face 'fg:lightgreen 'd-face-el-quote)
  ;;(set-face-background 'd-face-el-quote "#0ff")
  ;;(set-face-foreground 'd-face-el-quote "#f00")

  (progn
    (make-face 'd-face-property)
    (make-face-bold 'd-face-property)
    (set-face-foreground 'd-face-property "#f90")

    (make-face 'd-face-property-inverse)
    (make-face-bold 'd-face-property-inverse)
    (set-face-background 'd-face-property-inverse "#f90")
    (set-face-foreground 'd-face-property-inverse "#fff"))

  ;; oridinary comment appears in font-lock-comment-face
  ;;; super comment    appears in d-face-super-comment
  (progn
    (make-face 'd-face-super-comment)
    (set-face-foreground 'd-face-super-comment (if prefs-bg-black-p "#0f0" "#f00"))
    (set-face-background 'd-face-super-comment bg-colour)
    (when (not prefs-bg-black-p)
      (make-face-bold 'd-face-super-comment)
      (make-face-italic 'd-face-super-comment)
      )
    (copy-face 'd-face-super-comment 'font-lock-doc-face)
    (copy-face 'd-face-super-comment 'font-lock-doc-string-face)
    )

  (progn
    ;; MY CPLUSPLUS FACES:
    (make-face 'd-face-cc-clib)
    (make-face-bold 'd-face-cc-clib)
    (set-face-foreground 'd-face-cc-clib (if prefs-bg-black-p "#a88" "#844"))
    (copy-face 'd-face-cc-clib 'd-face-cc-allegro)
    (copy-face 'd-face-cc-clib 'd-face-cc-libd)
    (copy-face 'd-face-cc-clib 'd-face-cc-opengl)

    (make-face 'd-face-cc-ctor-dtor)
    (set-face-foreground 'd-face-cc-ctor-dtor (if prefs-bg-black-p "#f44" "#f0f"))
    (make-face-bold 'd-face-cc-ctor-dtor)

    (progn
      (make-face 'd-face-cc-debugging)
      (set-face-background 'd-face-cc-debugging "green")
      (make-face-bold 'd-face-cc-debugging))

    (progn
      (make-face 'd-face-cc-private)
      (make-face-bold 'd-face-cc-private)
      (set-face-foreground 'd-face-cc-private "black")
      ;;(set-face-background 'd-face-cc-private "#fcc")
      (set-face-background 'd-face-cc-private "#ffbbbb")
      )
    )

  (make-face 'd-face-m4-dnl)
  (set-face-background 'd-face-m4-dnl (if prefs-bg-black-p "#aa7755" "#fc9"))
  (set-face-foreground 'd-face-m4-dnl "black")

  (progn
    (make-face 'd-face-special-reference)
    (make-face-bold 'd-face-special-reference)
    (if prefs-bg-black-p
        (progn
          (set-face-foreground 'd-face-special-reference "#fff")
          (set-face-background 'd-face-special-reference "#666"))
      (progn
        (set-face-foreground 'd-face-special-reference "black")
        (set-face-background 'd-face-special-reference bg-colour-lighter))))

  (if (not (and os-type--mswindows-p emacs-dialect--gnuemacs-p))
      (make-face-bold 'd-face-special-reference))

  (copy-face 'bg:lightmagenta 'd-face-makefile-space)
  (make-face 'd-face-makefile-tab)
  (set-face-background 'd-face-makefile-tab "#cfc")
  (copy-face 'd-face-red-and-white 'd-face-linefeed)

  (copy-face 'bg:red 'd-face-m4)
  (set-face-background 'd-face-m4 (if prefs-bg-black-p "#f00" "#faa"))

  (make-face 'd-face-m5)
  (set-face-background 'd-face-m5 "lightgreen")
  (set-face-foreground 'd-face-m5 "black")

  (make-face 'd-face-m6)
  (set-face-background 'd-face-m6 "#ccf")
  (set-face-foreground 'd-face-m6 "black")

  (if prefs-bg-black-p
      (set-face-foreground 'd-face-m4 "#000000")
    (set-face-foreground 'd-face-m4 "#000000"))

  (progn
    (make-face 'd-face-cc-illegal-type)
    (make-face-bold 'd-face-cc-illegal-type)
    (set-face-foreground 'd-face-cc-illegal-type "red")
    (set-face-background 'd-face-cc-illegal-type "#0ff")
    (copy-face 'd-face-cc-illegal-type 'd-face-cc-searching)
    )

  (progn
    (make-face 'd-face-makefile-dollar-dollar)
    (set-face-background 'd-face-makefile-dollar-dollar (if prefs-bg-black-p "#090" "#8f8"))
    (set-face-foreground 'd-face-makefile-dollar-dollar (if prefs-bg-black-p "#fff" "#000000"))
    (copy-face 'd-face-makefile-dollar-dollar 'd-face-makefile-dollar-dollar-highlight)
    (make-face-bold 'd-face-makefile-dollar-dollar-highlight)
    ;;(make-face 'd-face-makefile-dollar-dollar-highlight)
    ;;(set-face-background 'd-face-makefile-dollar-dollar-highlight (if prefs-bg-black-p "#8b0" "#8f8"))
    ;;(set-face-foreground 'd-face-makefile-dollar-dollar-highlight (if prefs-bg-black-p "#ff0" "#fff"))
    )

  (progn
    (make-face 'mmm-default-submode-face)
    (set-face-foreground 'mmm-default-submode-face nil)
    ;;(set-face-foreground 'mmm-default-submode-face "#fff")
    (set-face-background 'mmm-default-submode-face nil)
    (make-face-bold 'mmm-default-submode-face)
    ;;(make-face-unbold 'mmm-default-submode-face)
    )

  (progn
    (copy-face 'd-face-cc-illegal-type 'd-face-cc-digits)
    (set-face-background 'd-face-cc-digits bg-colour)

    (if prefs-bg-black-p
        (progn
          (set-face-background 'd-face-cc-digits "#666")
          (set-face-foreground 'd-face-cc-digits "#fff")
          )
      ;;(set-face-foreground 'd-face-cc-digits "#000000")
      ;;(set-face-background 'd-face-cc-digits "#e8d4ff")
      (set-face-background 'd-face-cc-digits bg-colour)
      (set-face-foreground 'd-face-cc-digits "#f0f"))

    )
  )

;;(checkpoint 4)

;; (d-fonts--init-standard-font-lock)
(defun d-fonts--init-standard-font-lock ()

  (progn
    ;;
    ;; NOTE: Version 22 bindings
    ;;
    (make-face 'mode-line-buffer-id)
    (make-face 'tabbar-default-face)
    (set-face-foreground 'tabbar-default-face "#000000")
    (set-face-background 'tabbar-default-face "#eee")
    )

  (progn
    (make-face 'underline)
    (set-face-underline-p 'underline t))

  (progn
    (make-face 'bold-underline)
    (make-face-bold 'bold-underline)
    (set-face-underline-p 'bold-underline t))
;;
;;  (progn
;;    (make-face 'bold-italic)
;;    (make-face-bold 'bold-italic)
;;    (make-face-italic 'bold-italic))
;;
  ;;(set-face-foreground 'italic "#0af")
  ;;(set-face-foreground 'bold "#dd0")
  ;;(copy-face 'fg:lightcyan             'bold-italic)

  ;;(copy-face 'bg:lightmagenta          'highlight)

  (copy-face 'fg:lightcyan             'font-lock-type-face)
  (copy-face 'd-face-blue-and-white    'font-lock-string-face)
  (setq font-lock-string-face          'font-lock-string-face)
  (make-face-bold 'font-lock-string-face)
  ;;(set-face-background 'font-lock-string-face (if prefs-bg-black-p "#0000ff"  "#dedeff"))

  (progn
    (set-face-foreground 'font-lock-type-face (if prefs-bg-black-p "#00ffff" "#0000ff"))
    (make-face-bold 'font-lock-type-face)
    (set-face-foreground 'font-lock-variable-name-face (if prefs-bg-black-p "#009999" "#0011ff")))

  (progn
    (make-face 'font-lock-comment-face)
    ;;(set-face-background 'font-lock-comment-face bg-colour)
    (set-face-foreground 'font-lock-comment-face
                         (cond
                          (prefs-bg-black-p  "#080")
                          (prefs-lcd-emacs-p "#888")
                          (t "#060")))
    (when (not prefs-bg-black-p)
      (make-face-unbold 'font-lock-comment-face)
      (make-face-italic 'font-lock-comment-face)
      ;;(set-face-attribute 'font-lock-comment-face nil '((:slant . italic) (:weight bold)))
      ))

  ;;
  ;; comment
  ;;
  (progn
    (make-face 'font-lock-keyword-face)
    (if prefs-bg-black-p
        (progn
          (copy-face 'fg:lightred 'font-lock-keyword-face)
          ;;(set-face-foreground 'font-lock-keyword-face "white")
          ))
    (set-face-foreground 'font-lock-keyword-face "#000")
    (make-face-bold 'font-lock-keyword-face)
    )

  (if prefs-bg-black-p
      (copy-face 'fg:white 'font-lock-reference-face)
    (copy-face 'fg:lightgray 'font-lock-reference-face))

  ;; DLDLD
  ;;(require 'foo)
  (set-face-background 'font-lock-reference-face bg-colour-lighter)

  (progn
    (if prefs-bg-black-p
        (copy-face 'fg:yellow 'font-lock-function-name-face)
      (copy-face 'bg:yellow 'font-lock-function-name-face))
    (make-face-bold 'font-lock-function-name-face))

  (if prefs-bg-black-p
      (copy-face 'bg:green 'show-paren-match-face)
    (copy-face 'd-face-cc-illegal-type 'show-paren-match-face)
    (set-face-foreground 'show-paren-match-face "#000000")
    )
  (if emacs-dialect--xemacs-p (copy-face 'show-paren-match-face 'paren-match))

  (set-face-underline-p 'font-lock-reference-face t)

  (progn
    (make-face 'font-lock-builtin-face)
    (make-face-bold 'font-lock-builtin-face)
    (set-face-foreground 'font-lock-builtin-face "#f00")
    ;;(set-face-background 'font-lock-builtin-face "#0f0")
    ;;(set-face-background 'font-lock-builtin-face bg-colour-lighter)
    )

  (progn
    (make-face 'font-lock-constant-face)
    (make-face-bold 'font-lock-constant-face)

    (if (not prefs-bg-black-p)
        (set-face-foreground 'font-lock-constant-face "#f00"))

    (d-quote (if prefs-bg-black-p
               (set-face-background 'font-lock-constant-face "#000000")
             (progn
               (set-face-foreground 'font-lock-constant-face "black")
               (set-face-background 'font-lock-constant-face bg-colour-lighter)))))

  (progn
    (make-face 'highlight)
    (set-face-foreground 'highlight "#fff")
    (set-face-background 'highlight "#88f"))

  (progn
    (make-face 'region)
    (set-face-foreground 'region "#fff")
    (set-face-background 'region (if prefs-bg-black-p "#f4a" "#f8a")))

  (progn
    (make-face 'font-lock-warning-face)
    (set-face-foreground 'font-lock-warning-face "red")
    ;;(set-face-background 'font-lock-warning-face bg-colour-lighter)
    (make-face-bold 'font-lock-warning-face))

  (if (not (and os-type--mswindows-p emacs-dialect--gnuemacs-p))
      (make-face-bold 'font-lock-warning-face))

  (make-face 'secondary-selection)
  (set-face-foreground 'secondary-selection "lightgreen")
  (copy-face 'd-face-cc-searching 'secondary-selection)

  (copy-face 'bg:lightmagenta 'info-menu-5)
  (copy-face 'fg:lightcyan 'info-node)

  (copy-face 'bold 'info-xref)
  (set-face-underline-p 'info-xref t)
  (set-face-foreground 'info-xref "#00f")1

  (copy-face 'region                   'd-face-cc-searching)
  (copy-face 'fg:darkgray              'dired-face-permissions)
  (set-face-background                 'dired-face-permissions bg-colour-lighter)
  (copy-face 'fg:white                 'modeline-buffer-id)

  (copy-face 'bold 'dired-symlink)

  (progn
    (copy-face 'd-face-blue-and-white 'dired-marked)
    (make-face-bold 'dired-marked)
    (copy-face 'd-face-red-and-white  'dired-flagged)
    (set-face-background 'dired-flagged "#ff6677")
    (make-face-bold 'dired-flagged)

    (copy-face 'fg:lightblue          'dired-directory)
    (set-face-background 'dired-directory bg-colour)
    (set-face-foreground 'dired-directory "#4433ff")
    (copy-face 'fg:green              'd-face-path)
    )

  (copy-face 'd-face-blue-and-white      'dired-face-marked)
  (copy-face 'd-face-red-and-white       'dired-face-flagged)
  (copy-face 'region                     'zmacs-region)
  (copy-face 'region                     'primary-selection)
  (copy-face 'font-lock-reference-face   'font-lock-preprocessor-face)
  (copy-face 'fg:lightgray               'modeline-mousable)
  (copy-face 'fg:red                     'modeline-mousable-minor-mode)

  (copy-face (if prefs-bg-black-p 'fg:lightred 'fg:lightblue) 'diary-face)

  (when emacs-dialect--xemacs-p
    (set-face-foreground 'blue       "#88f")
    (copy-face 'fg:lightblue         'hyper-apropos-hyperlink)
    (copy-face 'fg:lightred          'hyper-apropos-documentation)
    (copy-face 'fg:lightblue         'custom-group-tag-face)
    (copy-face 'fg:darkgray          'dired-face-boring)
    (set-face-foreground             'dired-face-boring "#888")
    (copy-face 'fg:lightgray         'dired-face-permissions)
    (set-face-foreground             'dired-face-permissions "#999")
    (copy-face 'fg:lightcyan         'dired-face-symlink)
    ;;(copy-face 'd-face-green-and-yellow 'isearch)
    (copy-face 'd-face-green-and-white 'isearch-secondary)
    (copy-face 'bg:lightgray         'modeline-buffer-id)
    ;;(copy-face 'bg:lightgray 'widget-button-face)
    )

  (progn
    (make-face 'isearch-lazy-highlight-face)
    (set-face-foreground 'isearch-lazy-highlight-face "#000000")
    (set-face-background 'isearch-lazy-highlight-face "#0ff"))

  (copy-face 'd-face-blue-and-white  'secondary-selection)

  (progn
    (set-face-background 'isearch "#000000")
    (set-face-foreground 'isearch "#ff0000")
    (make-face-bold 'isearch))

  (progn
    (make-face 'dired-directory)
    (make-face-bold 'dired-directory)
    (set-face-foreground 'dired-directory "#00f"))

  )

;;(checkpoint 5)

(safe-require 'dired-colours)
(setq prefs-bg-black-p nil)

(defun d-fonts ()
  (interactive)

  ;;(checkpoint 7)

  (setq prefs-bg-black-p (not prefs-bg-black-p))

  (setq bg-colour (if prefs-bg-black-p
                      (if (string= user-login-name "root") "#ff8888" "#262626")
                    (if (string= user-login-name "root") "#ffdddd" "#fff")))

  ;;(setq bg-colour "#ffffff")

  (setq bg-colour-lighter (if prefs-bg-black-p "#444" "#eee"))
  (setq bg-colour-lighter-lighter (if prefs-bg-black-p "#555" "#ddd"))

  (if (not emacs-dialect--xemacs-p) (set-background-color bg-colour))

  (setq cursor-colour (if prefs-bg-black-p "#ffff00" "#88cc88"))
  (setq cursor-colour (if prefs-bg-black-p "#ffff00" "#000000"))
  ;;(setq cursor-colour "#ff0000")
  ;;
  (when (not emacs-dialect--xemacs-p)
    (make-face 'cursor)
    (set-face-background 'cursor cursor-colour)
    (set-face-foreground 'cursor "black"))

  (if emacs-dialect--xemacs-p
      (progn
        (make-face 'text-cursor)
        (set-face-background 'text-cursor cursor-colour)
        (set-face-foreground 'text-cursor "#000000")))


  ;; (copy-face 'fg:yellow 'border)
  ;;(set-face-foreground 'default "black")
  (set-face-foreground 'default (if prefs-bg-black-p  "lightgray" "black"))

  (if (string= (user-real-login-name) "root")
      (set-face-background 'default "#660000")
    (set-face-background 'default bg-colour))
  ;;(set-face-background 'default "#ffffff")

  (make-face 'modeline)
  (set-face-background 'modeline "grey")
  (set-face-foreground 'modeline "black")

  (progn
    (make-face-italic 'bold-italic)
    (make-face-italic 'italic)
    (set-face-underline-p 'italic nil)
    )

  ;;(checkpoint 8)
  (d-fonts--init-base-colours)
  ;;(checkpoint 10)
  (d-fonts--init-pairs)
  ;;(checkpoint 11)
  (d-fonts--init-d--faces)
  ;;(checkpoint 12)
  (d-fonts--init-standard-font-lock)
  ;;(checkpoint 13)

  (progn
    (if (fboundp 'd-fonts--init-dired-colours)
        (d-fonts--init-dired-colours)))

  (setq font-lock-maximum-size nil)
  (setq font-lock-maximum-decoration t)

  ;; get graphics characters online...
  (if (and (< emacs-major-version 20) (not emacs-dialect--xemacs-p))
      (let ((i 127))
        (while (< i 256)
          (aset standard-display-table i (vector i))
          (incf i))))

  ;;(checkpoint 14)

  (balance-windows)
  ;;(recenter)

  (if (and os-type--mswindows-p emacs-dialect--gnuemacs-p)
      (set-cursor-color cursor-colour))

  ;;(checkpoint 15)

  )

;;(checkpoint 6)

(setq prefs-bg-black-p t)

(d-fonts)



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-06-20 23:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-19  0:19 Invalid face reference: quote Davin Pearson
2016-06-19 14:10 ` Emanuel Berg
2016-06-19 17:11 ` Pascal J. Bourguignon
2016-06-20  4:20   ` Davin Pearson
2016-06-20  4:41     ` Davin Pearson
2016-06-20  3:27 ` Stefan Monnier
     [not found] ` <mailman.1844.1466393286.1216.help-gnu-emacs@gnu.org>
2016-06-20  4:17   ` Davin Pearson
2016-06-20  4:41     ` Emanuel Berg
2016-06-20 21:51       ` Davin Pearson
2016-06-20 22:14         ` Emanuel Berg
2016-06-20 23:50           ` Barry Margolin
     [not found] ` <mailman.1799.1466345449.1216.help-gnu-emacs@gnu.org>
2016-06-20  4:30   ` Davin Pearson
2016-06-20  4:47     ` Emanuel Berg
2016-06-20  4:58       ` Davin Pearson
2016-06-20  5:07         ` Davin Pearson
2016-06-20  9:51           ` Emanuel Berg
2016-06-20 13:28             ` Loris Bennett
2016-06-20 14:24               ` Emanuel Berg
2016-06-20 14:53                 ` Loris Bennett
2016-06-20 21:24                   ` my experience with eye problems (was: Re: Invalid face reference: quote) Emanuel Berg
2016-06-20 21:39                     ` Emanuel Berg
2016-06-20 14:01           ` Invalid face reference: quote Dan Espen
2016-06-20 10:10         ` Emanuel Berg
  -- strict thread matches above, loose matches on Subject: below --
2016-06-06 23:46 Davin Pearson
2016-06-06 23:48 ` Barry Margolin
2016-06-07  8:01   ` Davin Pearson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).