• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:find +defs:face

33 ;; o  `c-label-face-name' is either `font-lock-constant-face' (in
34 ;; Emacs), or `font-lock-reference-face'.
36 ;; o `c-constant-face-name', `c-reference-face-name' and
37 ;; `c-doc-markup-face-name' are essentially set up like
38 ;; `c-label-face-name'.
40 ;; o `c-preprocessor-face-name' is `font-lock-preprocessor-face' in
42 ;; `font-lock-builtin-face' or `font-lock-reference-face' in Emacs.
44 ;; o `c-doc-face-name' is `font-lock-doc-string-face' in XEmacs,
45 ;; `font-lock-doc-face' in Emacs 21 and later, or
46 ;; `font-lock-comment-face' in older Emacs (that since source
60 ;; o `font-lock-comment-face' and the face in `c-doc-face-name' is
62 ;; o If any face (e.g. `c-doc-markup-face-name') but those above is
64 ;; o `font-lock-string-face' is not used in anything but string
66 ;; o `font-lock-keyword-face' and the face in `c-label-face-name' are
98 (cc-bytecomp-defvar c-preprocessor-face-name)
99 (cc-bytecomp-defvar c-reference-face-name)
107 ;; Note that font-lock in XEmacs doesn't expand face names as
111 (defconst c-preprocessor-face-name
112 (cond ((c-face-name-p 'font-lock-preprocessor-face)
113 ;; XEmacs has a font-lock-preprocessor-face.
114 'font-lock-preprocessor-face)
115 ((c-face-name-p 'font-lock-builtin-face)
116 ;; In Emacs font-lock-builtin-face has traditionally been
118 'font-lock-builtin-face)
120 'font-lock-reference-face)))
122 (cc-bytecomp-defvar font-lock-constant-face)
124 (defconst c-label-face-name
125 (cond ((c-face-name-p 'font-lock-label-face)
129 'font-lock-label-face)
130 ((and (c-face-name-p 'font-lock-constant-face)
131 (eq font-lock-constant-face 'font-lock-constant-face))
132 ;; Test both if font-lock-constant-face exists and that it's
135 'font-lock-constant-face)
137 'font-lock-reference-face)))
139 (defconst c-constant-face-name
140 (if (and (c-face-name-p 'font-lock-constant-face)
141 (eq font-lock-constant-face 'font-lock-constant-face))
143 'font-lock-constant-face
144 c-label-face-name))
146 (defconst c-reference-face-name
148 (if (and (c-face-name-p 'font-lock-reference-face)
149 (eq font-lock-reference-face 'font-lock-reference-face))
153 'font-lock-reference-face
154 c-label-face-name)))
156 ;; This should not mapped to a face that also is used to fontify things
158 (defconst c-doc-face-name
159 (cond ((c-face-name-p 'font-lock-doc-string-face)
161 'font-lock-doc-string-face)
162 ((c-face-name-p 'font-lock-doc-face)
164 'font-lock-doc-face)
166 'font-lock-comment-face)))
168 (defconst c-doc-markup-face-name
169 (if (c-face-name-p 'font-lock-doc-markup-face)
173 'font-lock-doc-markup-face
174 c-label-face-name))
176 (defconst c-negation-char-face-name
177 (if (c-face-name-p 'font-lock-negation-char-face)
178 ;; Emacs 22 has a special face for negation chars.
179 'font-lock-negation-char-face))
181 (cc-bytecomp-defun face-inverse-video-p) ; Only in Emacs.
182 (cc-bytecomp-defun face-property-instance) ; Only in XEmacs.
184 (defun c-make-inverse-face (oldface newface)
185 ;; Emacs and XEmacs have completely different face manipulation
187 (copy-face oldface newface)
188 (cond ((fboundp 'face-inverse-video-p)
193 (unless (face-inverse-video-p oldface)
194 (invert-face newface)))
195 ((fboundp 'face-property-instance)
197 (unless (face-property-instance oldface 'reverse)
198 (invert-face newface)))))
205 (defmacro c-put-font-lock-face (from to face)
206 ;; Put a face on a region (overriding any existing face) in the way
213 (if (fboundp 'font-lock-set-face)
216 `(font-lock-set-face ,from ,to ,face)
217 `(put-text-property ,from ,to 'face ,face)))
219 (defmacro c-remove-font-lock-face (from to)
220 ;; This is the inverse of `c-put-font-lock-face'.
223 (if (fboundp 'font-lock-remove-face)
224 `(font-lock-remove-face ,from ,to)
225 `(remove-text-properties ,from ,to '(face nil))))
227 (defmacro c-put-font-lock-string-face (from to)
228 ;; Put `font-lock-string-face' on a string. The surrounding
234 `(c-put-font-lock-face (1+ ,from) (1- ,to) 'font-lock-string-face)
235 `(c-put-font-lock-face ,from ,to 'font-lock-string-face)))
257 (when (c-got-face-at (point) c-literal-faces)
260 (point) 'face nil limit))
262 (c-got-face-at (point) c-literal-faces))))
300 ;; `font-lock-keywords', with these limitations: The face is always
338 (c-put-font-lock-face
371 (c-put-font-lock-face (car elem) (cdr elem)
372 'font-lock-type-face))
376 ;; Note that the reference face is a variable that is
378 (c-put-font-lock-face (car elem) (cdr elem)
379 c-reference-face-name))))
386 ;; sets `font-lock-type-face' in languages where
405 ,(+ ncle-depth re-depth 1) font-lock-string-face))))
418 font-lock-string-face)
458 (c-put-font-lock-face
461 'font-lock-function-name-face)
473 (c-put-font-lock-face
475 'font-lock-variable-name-face)
482 (c-put-font-lock-face
485 'font-lock-variable-name-face)))))))
504 (c-put-font-lock-face (match-beginning 1)
506 c-preprocessor-face-name)))
516 `(,(1+ ncle-depth) c-preprocessor-face-name t)))
523 c-negation-char-face-name
530 0 c-preprocessor-face-name))))
532 ;; Make hard spaces visible through an inverted `font-lock-warning-face'.
536 (unless (c-face-name-p 'c-nonbreakable-space-face)
537 (c-make-inverse-face 'font-lock-warning-face
538 'c-nonbreakable-space-face))
539 ''c-nonbreakable-space-face)))
544 ;; fontify that char with `font-lock-warning-face' if the string
563 (c-put-font-lock-face start (1+ start) 'font-lock-warning-face)))))
571 ;; sets `font-lock-type-face' in languages where
574 t `(;; Put a warning face on the opener of unclosed strings that
576 ;; lock packages have a `font-lock-syntactic-face-function' for
593 2 c-constant-face-name)))
595 1 c-constant-face-name))))))
602 2 font-lock-keyword-face)
604 1 font-lock-keyword-face))
637 (not (get-text-property (point) 'face)))
638 (c-put-font-lock-face (point) id-end
639 c-reference-face-name)
666 (or (get-text-property (match-beginning 2) 'face)
667 (c-put-font-lock-face (match-beginning 2)
669 c-reference-face-name))
704 (eval . (list "\\(!\\)[^=]" 1 c-negation-char-face-name))
710 ;; font-lock-keyword-face. It always returns NIL to inhibit this and
753 ;; font-lock-keyword-face. It always returns NIL to inhibit this and
770 id-start id-end id-face pos kwd-sym)
783 id-face (get-text-property id-start 'face))
786 ((eq id-face 'font-lock-type-face)
787 ;; The identifier got the type face so it has already been
791 ((eq id-face 'font-lock-keyword-face)
819 (not (get-text-property id-start 'face)))
822 (c-put-font-lock-face id-start id-end
823 c-reference-face-name)
824 (c-put-font-lock-face id-start id-end
825 'font-lock-type-face)))))
845 id-face got-init
911 id-face (if (and (eq (char-after next-pos) ?\()
916 'font-lock-function-name-face
917 'font-lock-variable-name-face)
931 'face)))
932 (c-put-font-lock-face (car c-last-identifier-range)
934 id-face)))
942 (cond ((eq id-face 'font-lock-function-name-face)
978 ;; ensure that face name aliases in Emacs are resolved.
980 font-lock-type-face
981 c-reference-face-name
982 font-lock-keyword-face))
987 ;; font-lock-keyword-face. It always returns NIL to inhibit this and
999 (let (;; The position where `c-find-decl-spots' stopped.
1066 (c-find-decl-spots
1076 (if (and (eq (get-text-property (point) 'face)
1077 'font-lock-keyword-face)
1199 ;; use the label face at times.
1201 (c-put-font-lock-face (caar c-record-ref-identifiers)
1203 c-label-face-name))
1205 (c-put-font-lock-face (caar c-record-ref-identifiers)
1207 'font-lock-keyword-face))
1211 (c-put-font-lock-face (car kwd) (cdr kwd)
1212 'font-lock-keyword-face))
1216 ;; marker, so return t to `c-find-decl-spots' to signal
1248 '(1 'font-lock-type-face t)
1270 'font-lock-type-face t)
1302 ;; inhibiting spurious font-lock-keyword-face highlighting and another
1332 ;; The first two rules here mostly find occurences that
1345 2 font-lock-type-face)
1347 1 'font-lock-type-face)))
1449 (not (get-text-property id-start 'face))
1464 (eq (get-text-property (1- (point)) 'face)
1465 c-label-face-name))
1473 (c-put-font-lock-face (match-beginning 0) (match-end 0)
1474 c-label-face-name)))
1511 ;; substitute c-label-face-name correctly), and 3) the
1525 c-label-face-name nil t))))))
1567 (unless (memq c-doc-face-name c-literal-faces)
1568 (setq c-literal-faces (cons c-doc-face-name c-literal-faces)))
1846 (c-put-font-lock-face (match-beginning 0)
1849 'font-lock-function-name-face
1850 'font-lock-variable-name-face))
1856 (c-put-font-lock-face (match-beginning 0)
1858 'font-lock-function-name-face)
1878 (c-find-decl-spots
2035 ;; matches PREFIX with `c-doc-face-name'. Assumes comments have been
2036 ;; fontified with `font-lock-comment-face' already. nil is always
2048 ;; existing `c-doc-face-name' face since the existence of that face
2054 (if (eq (get-text-property (point) 'face)
2055 'font-lock-comment-face)
2072 (or (not (c-got-face-at comment-beg
2075 (c-got-face-at (1- comment-beg)
2096 (c-put-font-lock-face region-beg region-end c-doc-face-name)
2127 (defun c-find-invalid-doc-markup (regexp limit)
2131 ;; `c-doc-face-name'. If a match is found then submatch 0 surrounds
2138 (setq start (match-beginning 0)) 'face)
2139 c-doc-face-name))
2152 1 ,c-doc-markup-face-name prepend nil)
2154 0 ,c-doc-markup-face-name prepend nil)
2156 1 ,c-doc-markup-face-name prepend nil)
2158 0 ,c-doc-markup-face-name prepend nil))
2163 1 ,c-doc-markup-face-name prepend nil)))
2177 0 ,c-doc-markup-face-name prepend nil)
2179 3 ,c-doc-markup-face-name prepend nil)
2185 0 ,c-doc-markup-face-name prepend nil)
2187 0 ,c-doc-markup-face-name prepend nil)
2192 (c-find-invalid-doc-markup "[<>&]\\|{@" limit))
2193 0 'font-lock-warning-face prepend nil)))
2222 (markup-faces (list c-doc-markup-face-name c-doc-face-name)))
2233 (c-put-font-lock-face (point) pos markup-faces)
2250 (c-remove-font-lock-face pos (1- end))
2251 (c-put-font-lock-face (1- end) end markup-faces)
2258 (c-remove-font-lock-face pos (min (1+ (point)) (point-max)))
2265 (c-put-font-lock-string-face (match-beginning 0)
2280 (c-put-font-lock-face (point)
2295 0 ,c-doc-markup-face-name prepend nil)
2299 (c-find-invalid-doc-markup "@" limit))
2300 0 'font-lock-warning-face prepend nil)