;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:48 2007 ;;; from file /home/cyd/emacs/lisp/font-core.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`font-core.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@2389 Defaults for Font Lock mode specified by the major mode. Defaults should be of the form: (KEYWORDS [KEYWORDS-ONLY [CASE-FOLD [SYNTAX-ALIST [SYNTAX-BEGIN ...]]]]) KEYWORDS may be a symbol (a variable or function whose value is the keywords to use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil, syntactic fontification (strings and comments) is not performed. If CASE-FOLD is non-nil, the case of the keywords is ignored when fontifying. If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form (CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table, for keyword and syntactic fontification (see `modify-syntax-entry'). If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move backwards outside any enclosing syntactic block, for syntactic fontification. Typical values are `beginning-of-line' (i.e., the start of the line is known to be outside a syntactic block), or `beginning-of-defun' for programming modes or `backward-paragraph' for textual modes (i.e., the mode-dependent function is known to move outside a syntactic block). If nil, the beginning of the buffer is used as a position outside of a syntactic block, in the worst case. These item elements are used by Font Lock mode to set the variables `font-lock-keywords', `font-lock-keywords-only', `font-lock-keywords-case-fold-search', `font-lock-syntax-table' and `font-lock-beginning-of-syntax-function', respectively. Further item elements are alists of the form (VARIABLE . VALUE) and are in no particular order. Each VARIABLE is made buffer-local before set to VALUE. Currently, appropriate variables include `font-lock-mark-block-function'. If this is non-nil, it should be a function with no args used to mark any enclosing block of text, for fontification via \[font-lock-fontify-block]. Typical values are `mark-defun' for programming modes or `mark-paragraph' for textual modes (i.e., the mode-dependent function is known to put point and mark around a text block relevant to that mode). Other variables include that for syntactic keyword fontification, `font-lock-syntactic-keywords' and those for buffer-specialized fontification functions, `font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function', `font-lock-fontify-region-function', `font-lock-unfontify-region-function', and `font-lock-inhibit-thing-lock'. (defvar font-lock-defaults nil (#$ . 567)) (make-variable-buffer-local 'font-lock-defaults) #@281 Alist of fall-back Font Lock defaults for major modes. Each item should be a list of the form: (MAJOR-MODE . FONT-LOCK-DEFAULTS) where MAJOR-MODE is a symbol and FONT-LOCK-DEFAULTS is a list of default settings. See the variable `font-lock-defaults', which takes precedence. (defvar font-lock-defaults-alist nil (#$ . 3054)) (make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults) #@142 A function which is called when `font-lock-mode' is toggled. It will be passed one argument, which is the current value of `font-lock-mode'. (defvar font-lock-function 'font-lock-default-function (#$ . 3462)) #@97 Non-nil if Font-Lock mode is enabled. Use the command `font-lock-mode' to change this variable. (defvar font-lock-mode nil (#$ . 3677)) (make-variable-buffer-local 'font-lock-mode) #@2347 Toggle Font Lock mode. With arg, turn Font Lock mode off if and only if arg is a non-positive number; if arg is nil, toggle Font Lock mode; anything else turns Font Lock on. (Font Lock is also known as "syntax highlighting".) When Font Lock mode is enabled, text is fontified as you type it: - Comments are displayed in `font-lock-comment-face'; - Strings are displayed in `font-lock-string-face'; - Certain other expressions are displayed in other faces according to the value of the variable `font-lock-keywords'. To customize the faces (colors, fonts, etc.) used by Font Lock for fontifying different parts of buffer text, use \[customize-face]. You can enable Font Lock mode in any major mode automatically by turning on in the major mode's hook. For example, put in your ~/.emacs: (add-hook 'c-mode-hook 'turn-on-font-lock) Alternatively, you can use Global Font Lock mode to automagically turn on Font Lock mode in buffers whose major mode supports it and whose major mode is one of `font-lock-global-modes'. For example, put in your ~/.emacs: (global-font-lock-mode t) Where major modes support different levels of fontification, you can use the variable `font-lock-maximum-decoration' to specify which level you generally prefer. When you turn Font Lock mode on/off the buffer is fontified/defontified, though fontification occurs only if the buffer is less than `font-lock-maximum-size'. To add your own highlighting for some major mode, and modify the highlighting selected automatically via the variable `font-lock-maximum-decoration', you can use `font-lock-add-keywords'. To fontify a buffer, without turning on Font Lock mode and regardless of buffer size, you can use \[font-lock-fontify-buffer]. To fontify a block (the function or paragraph containing point, or a number of lines around point), perhaps because modification on the current line caused syntactic change on other lines, you can use \[font-lock-fontify-block]. See the variable `font-lock-defaults-alist' for the Font Lock mode default settings. You can set your own default settings for some mode, by setting a buffer local value for `font-lock-defaults', via its mode hook. The above is the default behavior of `font-lock-mode'; you may specify your own function which is called when `font-lock-mode' is toggled via `font-lock-function'.  (defalias 'font-lock-mode #[(&optional arg) "\306=\203 ?\202%\203\307!\310V\202% \204\311\202%\312\313\301\"\210\314\n\2043\315 \310H\316=\2035\314 !\210 \203G\317\320\321\314\311$\210\202M\322\320\321\311#\210 \203S\f\323\324 \203]\325\202^\326\"\210\327 \203r\312\330 \203o\331\202p\332\"\210\333 \210 \207" [arg font-lock-mode noninteractive font-lock-function major-mode font-lock-mode-major-mode toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil buffer-name 32 add-hook change-major-mode-hook font-lock-change-mode remove-hook run-hooks font-lock-mode-hook font-lock-mode-on-hook font-lock-mode-off-hook called-interactively-p "Font-Lock mode %sabled" "en" "dis" force-mode-line-update] 5 (#$ . 3866) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode font-lock-mode nil boundp font-lock-mode-map] 5) (defalias 'font-lock-change-mode #[nil "\300\301!\207" [font-lock-mode -1] 2]) #@176 Clear out all `font-lock-face' properties in current buffer. A major mode that uses `font-lock-face' properties might want to put this function onto `change-major-mode-hook'. (defalias 'font-lock-defontify #[nil "\302 \303\214~\210\304ed\305#\210)\306 !*\207" [inhibit-read-only modp buffer-modified-p t remove-list-of-text-properties (font-lock-face) restore-buffer-modified-p] 4 (#$ . 7234)]) (defalias 'font-lock-default-function #[(mode) "\203-\306\301!\210\307 !\310 \236\211\203&\311\nA>\204,\n\211A\311C\244\241\210\202,\310\311D B)\204T\306\301!\210\307 !\310 \236\211\203S\n\312\311\nA\"\241\210\nA\204S\313\n \") \204\206\314\304!\203b\f\204\206 \236A\204\206\205\211\314\315!\205\211 \205\211\205\211 =?\205\211\316!\207" [mode char-property-alias-alist elt font-lock-defaults font-lock-keywords major-mode make-local-variable copy-tree face font-lock-face remq delq boundp font-lock-set-defaults font-lock-mode-internal font-lock-defaults-alist font-lock-mode-major-mode] 5]) #@63 Turn on Font Lock mode (only if the terminal can display it). (defalias 'turn-on-font-lock #[nil "?\205\300 \207" [font-lock-mode] 1 (#$ . 8263)]) #@570 *Modes for which Font Lock mode is automagically turned on. Global Font Lock mode is controlled by the command `global-font-lock-mode'. If nil, means no modes have Font Lock mode automatically turned on. If t, all modes that support Font Lock mode have it automatically turned on. If a list, it should be a list of `major-mode' symbol names for which Font Lock mode should be automatically turned on. The sense of the list is negated if it begins with `not'. For example: (c-mode c++-mode) means that Font Lock mode is turned on for buffers in C and C++ modes only. (custom-declare-variable 'font-lock-global-modes 't '(#$ . -8420) :type '(choice (const :tag "none" nil) (const :tag "all" t) (set :menu-tag "mode specific" :tag "modes" :value (not) (const :tag "Except" not) (repeat :inline t (symbol :tag "mode")))) :group 'font-lock) (defalias 'turn-on-font-lock-if-enabled #[nil "\242\303=\205 A>?\205\304\305 )\207" [font-lock-global-modes major-mode inhibit-quit not nil turn-on-font-lock] 2]) (byte-code "\301B\302\301!\204\303\301\304\"\210\305\301!\207" [current-load-list font-lock-mode-major-mode default-boundp set-default nil make-variable-buffer-local] 3) #@284 Non-nil if Global-Font-Lock mode is enabled. See the command `global-font-lock-mode' for a description of this minor-mode. Setting this variable directly does not take effect; either customize it (see the info node `Easy Customization') or call the function `global-font-lock-mode'. (custom-declare-variable 'global-font-lock-mode '(not (or noninteractive emacs-basic-display)) '(#$ . 9610) :set 'custom-set-minor-mode :initialize 'custom-initialize-safe-default :group 'font-lock :type 'boolean :version "22.1") #@280 Toggle Font-Lock mode in every possible buffer. With prefix ARG, turn Global-Font-Lock mode on if and only if ARG is positive. Font-Lock mode is enabled in all buffers where `turn-on-font-lock-if-enabled' would do it. See `font-lock-mode' for more information on Font-Lock mode. (defalias 'global-font-lock-mode #[(&optional arg dummy) "\305=\203 ?\202%\203\306!\307V\202% \204\310\202%\311\312\301\"\210\313\211\203<\314\315\316\"\210\314\317\320\"\210\314\321\322\"\210\202K\323\315\316\"\210\323\317\320\"\210\323\321\322\"\210\324 \313\211\203u @r\nq\210 \203e\325 \210\202m\f\203m\304\326!\210) A\211\204T*\327\330 \203\200\331\202\201\332\"\210\333 \203\231\334\301!\210\311\335 \203\226\336\202\227\337\"\210\340 \210 \207" [arg global-font-lock-mode buf #1=#:--cl-dolist-temp-- font-lock-mode toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil add-hook after-change-major-mode-hook global-font-lock-mode-enable-in-buffers find-file-hook global-font-lock-mode-check-buffers change-major-mode-hook global-font-lock-mode-cmhh remove-hook buffer-list turn-on-font-lock-if-enabled -1 run-hooks global-font-lock-mode-hook global-font-lock-mode-on-hook global-font-lock-mode-off-hook called-interactively-p customize-mark-as-set "Global-Font-Lock mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 10130) (list (or current-prefix-arg 'toggle))]) (byte-code "\301\302\303\304\305!\205 \305J#\210\306B\307\306!\204\310\306\303\"\210\303\207" [current-load-list add-minor-mode global-font-lock-mode nil boundp global-font-lock-mode-map global-font-lock-mode-buffers default-boundp set-default] 5) (defalias 'global-font-lock-mode-enable-in-buffers #[nil "\306\211\2038\n@\307 !\2031r q\210 \203+\f =\2040\303\310!\210\311 \210 \2020\311 \210 )\nA\211\204*\306\207" [global-font-lock-mode-buffers buf #1=#:--cl-dolist-temp-- font-lock-mode font-lock-mode-major-mode major-mode nil buffer-live-p -1 turn-on-font-lock-if-enabled] 3]) (put 'global-font-lock-mode-enable-in-buffers 'definition-name 'global-font-lock-mode) (defalias 'global-font-lock-mode-check-buffers #[nil "\301 \210\302\303\304\305\"\207" [global-font-lock-mode-buffers global-font-lock-mode-enable-in-buffers nil remove-hook post-command-hook global-font-lock-mode-check-buffers] 3]) (put 'global-font-lock-mode-check-buffers 'definition-name 'global-font-lock-mode) (defalias 'global-font-lock-mode-cmhh #[nil "\300\301p\"\210\302\303\304\"\207" [add-to-list global-font-lock-mode-buffers add-hook post-command-hook global-font-lock-mode-check-buffers] 3]) (byte-code "\300\301\302\303#\210\304\305!\207" [put global-font-lock-mode-cmhh definition-name global-font-lock-mode provide font-core] 4)