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

Lines Matching +defs:set +defs:file +defs:modes

9 ;; This file is part of GNU Emacs.
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
34 ;; highlighting and a set of appropriate faces is provided. The
36 ;; be recognized the next time the corresponding file is read (when
37 ;; file patterns is turned on).
58 ;; Put the following code in your .emacs file. This turns on
65 ;; there by hi-lock) include the following in your .emacs file:
67 ;; (setq hi-lock-file-patterns-policy 'ask)
69 ;; If you get tired of being asked each time a file is loaded replace
85 ;; Sample file patterns:
101 (defcustom hi-lock-file-patterns-range 10000
103 When a file is visited and hi-lock mode is on, patterns starting
119 (defcustom hi-lock-exclude-modes
121 "List of major modes in which hi-lock will not run.
127 (defcustom hi-lock-file-patterns-policy 'ask
128 "Specify when hi-lock should use patterns found in file.
131 as first argument); if nil or `never' or anything else, don't use file
133 :type '(choice (const :tag "Do not use file patterns" never)
134 (const :tag "Ask about file patterns" ask)
135 (function :tag "Function to check file patterns"))
140 (put 'hi-lock-file-patterns-policy 'risky-local-variable t)
205 (defvar hi-lock-file-patterns nil
206 "Patterns found in file for hi-lock. Should not be changed.")
221 (defvar hi-lock-file-patterns-prefix "Hi-lock"
222 "Search target for finding hi-lock patterns at top of file.")
239 (make-variable-buffer-local 'hi-lock-file-patterns)
240 (put 'hi-lock-file-patterns 'permanent-local t)
289 `global-hi-lock-mode' or in your .emacs file (global-hi-lock-mode 1).
310 be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
313 any valid `font-lock-keywords' form is acceptable. When a file is
314 loaded the patterns are read if `hi-lock-file-patterns-policy is
316 `hi-lock-file-patterns-policy' is bound to a function and that
328 \(number of characters into buffer) `hi-lock-file-patterns-range'.
331 is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
334 hi-lock-file-patterns)
349 versions before 22 use the following in your .emacs file:
365 hi-lock-file-patterns)
369 (when hi-lock-file-patterns
370 (font-lock-remove-keywords nil hi-lock-file-patterns)
371 (setq hi-lock-file-patterns nil))
384 (unless (memq major-mode hi-lock-exclude-modes)
406 (hi-lock-set-pattern
431 (hi-lock-set-pattern regexp face))
451 (hi-lock-set-pattern regexp face))
457 "Remove highlighting of each match to REGEXP set by hi-lock.
521 hi-lock-file-patterns-prefix
525 (when (> (point) hi-lock-file-patterns-range)
526 (warn "Inserted keywords not close enough to top of file")))
568 (defun hi-lock-set-pattern (regexp face)
594 (defun hi-lock-set-file-patterns (patterns)
595 "Replace file patterns list with PATTERNS and refontify."
596 (when (or hi-lock-file-patterns patterns)
597 (font-lock-remove-keywords nil hi-lock-file-patterns)
598 (setq hi-lock-file-patterns patterns)
599 (font-lock-add-keywords nil hi-lock-file-patterns t)
605 (unless (memq major-mode hi-lock-exclude-modes)
607 (target-regexp (concat "\\<" hi-lock-file-patterns-prefix ":")))
613 (+ (point) hi-lock-file-patterns-range) t)
625 ((functionp hi-lock-file-patterns-policy)
626 (funcall hi-lock-file-patterns-policy all-patterns))
627 ((eq hi-lock-file-patterns-policy 'ask)
630 (hi-lock-set-file-patterns all-patterns)
638 (font-lock-add-keywords nil hi-lock-file-patterns t)