;ELC ;;; compiled by roland@churchy.gnu.ai.mit.edu on Fri Jun 2 23:05:18 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/fast-lock.el ;;; emacs version 19.28.92.3. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.28.90"))) (error "`fast-lock.el' was compiled for Emacs 19.29 or later")) (require (quote font-lock)) #@47 Submit via mail a bug report on fast-lock.el. (defalias 'fast-lock-submit-bug-report #[nil "ƉQ&)" [t reporter-prompt-for-summary-p reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.06" (fast-lock-cache-directories fast-lock-minimum-size fast-lock-save-others fast-lock-save-events fast-lock-save-faces) nil "Hi Si.,\n\nI want to report a bug. I've read the `Bugs' section of `Info' on Emacs, so I\nknow how to make a clear and unambiguous report. To reproduce the bug:\n\nStart a fresh Emacs via `" invocation-name " -no-init-file -no-site-file'.\nIn the `*scratch*' buffer, evaluate:"] 9 (#$ . 514) nil]) (byte-code "! B! B!  B‡" [boundp fast-lock-mode nil current-load-list fast-lock-cache-timestamp fast-lock-cache-filename] 2) #@712 Directories in which Font Lock cache files are saved and read. Each item should be either DIR or a cons pair of the form (REGEXP . DIR) where DIR is a directory name (relative or absolute) and REGEXP is a regexp. An attempt will be made to save or read Font Lock cache files using these items until one succeeds (i.e., until a readable or writable one is found). If an item contains REGEXP, DIR is used only if the buffer file name matches REGEXP. For example: (list (cons (concat "^" (regexp-quote (expand-file-name "~"))) ".") "~/.emacs-flc") would cause a file's current directory to be used if the file is under your home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'. (defvar fast-lock-cache-directories (quote ("." "~/.emacs-flc")) (#$ . 1307)) #@154 If non-nil, the minimum size for buffers. Only buffers more than this can have associated Font Lock cache files saved. If nil, means size is irrelevant. (defvar fast-lock-minimum-size 25600 (#$ . 2103)) #@251 A list of events under which caches will be saved. Valid events are `save-buffer', `kill-buffer' and `kill-emacs'. If concurrent editing sessions use the same associated cache file for a file's buffer, then you should add `save-buffer' to this list. (defvar fast-lock-save-events (quote (kill-buffer kill-emacs)) (#$ . 2313)) #@221 If non-nil, save Font Lock cache files irrespective of file owner. If nil, means only buffer files known to be owned by you can have associated Font Lock cache files saved. Ownership may be unknown for networked files. (defvar fast-lock-save-others t (#$ . 2646)) #@118 A list of faces that will be saved in a Font Lock cache file. If nil, means information for all faces will be saved. (defvar fast-lock-save-faces (byte-code " Ž \"*Ƈ" [match-data match-data ((store-match-data match-data)) string-match "XEmacs" emacs-version (font-lock-string-face font-lock-doc-string-face font-lock-type-face font-lock-function-name-face font-lock-comment-face font-lock-keyword-face)] 3) (#$ . 2918)) #@1199 Toggle Fast Lock mode. With arg, turn Fast Lock mode on if and only if arg is positive and the buffer is associated with a file. Enable it automatically in your `~/.emacs' by: (add-hook 'font-lock-mode-hook 'turn-on-fast-lock) If Fast Lock mode is enabled, and the current buffer does not contain any text properties, any associated Font Lock cache is used if its timestamp matches the buffer's file, and its `font-lock-keywords' match those that you are using. Font Lock caches may be saved: - When you save the file's buffer. - When you kill an unmodified file's buffer. - When you exit Emacs, for all unmodified or saved buffers. Depending on the value of `fast-lock-save-events'. See also the commands `fast-lock-read-cache' and `fast-lock-save-cache'. Use \[font-lock-fontify-buffer] to fontify the buffer if the cache is bad. Various methods of control are provided for the Font Lock cache. In general, see variable `fast-lock-cache-directories' and function `fast-lock-cache-name'. For saving, see variables `fast-lock-minimum-size', `fast-lock-save-events', `fast-lock-save-others' and `fast-lock-save-faces'. Use \[fast-lock-submit-bug-report] to send bug reports or feedback. (defalias 'fast-lock-mode #[(&optional arg) "!   !V ?L **\"!!L!L B?B " [make-local-variable fast-lock-mode buffer-file-name arg prefix-numeric-value 0 font-lock-mode add-hook font-lock-mode-hook turn-on-fast-lock 1 fast-lock-cache-timestamp nil fast-lock-cache-filename font-lock-fontified fast-lock-read-cache] 3 (#$ . 3356) "P"]) #@405 Read the Font Lock cache for the current buffer. The following criteria must be met for a Font Lock cache file to be read: - Fast Lock mode must be turned on in the buffer. - The buffer must not be modified. - The buffer's `font-lock-keywords' must match the cache's. - The buffer file's timestamp must match the cache's. - Criteria imposed by `fast-lock-cache-directories'. See `fast-lock-mode'. (defalias 'fast-lock-read-cache #[nil "  !L= =@\"\f-\f!ЏA*! I\f," [fast-lock-cache-directories buffer-modified-p t font-lock-fontified fontified inhibit-read-only modified directories nil fast-lock-cache-filename make-local-variable fast-lock-cache-directory directory fast-lock-cache-name file (byte-code "!É$" [file file-readable-p load t] 5) ((error) (quit)) set-buffer-modified-p] 5 (#$ . 4937) nil]) #@707 Save the Font Lock cache of BUFFER or the current buffer. The following criteria must be met for a Font Lock cache file to be saved: - Fast Lock mode must be turned on in the buffer. - The event must be one of `fast-lock-save-events'. - The buffer must be at least `fast-lock-minimum-size' bytes long. - The buffer file must be owned by you, or `fast-lock-save-others' must be t. - The buffer must contain at least one `face' text property. - The buffer must not be modified. - The buffer file's timestamp must be the same as the file's on disk. - The on disk file's timestamp must be different than the buffer's cache. - Criteria imposed by `fast-lock-cache-directories'. See `fast-lock-mode'. (defalias 'fast-lock-save-cache #[(&optional buffer) "q  ?p!\f? 2 X C !8=ed$ >@\"k!~!~\f\"A*P)+" [buffer visited-file-modtime nil saved file-timestamp fast-lock-mode buffer-modified-p verify-visited-file-modtime fast-lock-cache-timestamp fast-lock-minimum-size buffer-size fast-lock-save-others user-uid 2 file-attributes buffer-file-name text-property-not-all face fast-lock-cache-directories directories (nil error) fast-lock-cache-directory t dir fast-lock-cache-name file file-writable-p fast-lock-save-cache-1] 6 (#$ . 5823) nil]) #@41 Unconditionally turn on Fast Lock mode. (defalias 'turn-on-fast-lock #[nil "!" [fast-lock-mode 1] 2 (#$ . 7172)]) (defalias 'fast-lock-after-fontify-buffer #[nil "!! \"Ɖ" [fast-lock-cache-filename file-writable-p delete-file message "File %s font lock cache cannot be deleted" buffer-name nil fast-lock-cache-timestamp] 3]) (defalias 'fast-lock-after-save-hook #[nil " > " [save-buffer fast-lock-save-events fast-lock-save-cache] 2]) (defalias 'fast-lock-kill-buffer-hook #[nil " > " [kill-buffer fast-lock-save-events fast-lock-save-cache] 2]) (defalias 'fast-lock-kill-emacs-hook #[nil " > \"" [kill-emacs fast-lock-save-events mapcar fast-lock-save-cache buffer-list] 3]) #@237 Return usable directory based on DIRECTORY. Returns nil if the directory does not exist, or, if CREATE non-nil, cannot be created. DIRECTORY may be a string or a cons pair of the form (REGEXP . DIR). See `fast-lock-cache-directories'. (defalias 'fast-lock-cache-directory #[(directory create) "+\n;\n+\f! Ɏ\n@\"**\nA* 5J !A J JϏ)" [buffer-file-name nil directory expand-file-name buffer-file-truename case-fold-search bufile match-data match-data ((store-match-data match-data)) string-match dir file-accessible-directory-p create (byte-code " \" " [make-directory dir t] 3) ((error))] 4 (#$ . 7900)]) #@345 Return full cache path name using caching DIRECTORY. If DIRECTORY is `.', the path is the buffer file name appended with `.flc'. Otherwise, the path name is constructed from DIRECTORY and the buffer's true abbreviated file name, with all `/' characters in the name replaced with `#' characters, and appended with `.flc'. See `fast-lock-mode'. (defalias 'fast-lock-cache-name #[(directory) "\n\nP !=ɂ  !! \"\"#Q+" [directory "." buffer-file-name ".flc" expand-file-name buffer-file-truename bufile system-type emx ((47 35) (35 35 35) (58 59) (59 59 59)) ((47 35) (35 35 35)) chars-alist #[(c) " A C" [c chars-alist] 2] mapchars file-name-as-directory mapconcat char-to-string apply append mapcar ""] 8 (#$ . 8561)]) (defalias 'fast-lock-save-cache-1 #[(file timestamp) "!  \"ˏ! \f=&ς1\f=0т1#\f+" [generate-new-buffer " *fast-lock*" buffer-name t saved buname tpbuf message "Saving %s font lock cache..." nil (byte-code "\fD D D\"qed %\f\f  )ʇ" [print fast-lock-cache-data 2 quote timestamp font-lock-keywords fast-lock-get-face-properties tpbuf write-region file nil quietly fast-lock-cache-timestamp fast-lock-cache-filename] 7) ((error (byte-code "" [error saved] 1)) (quit (byte-code "" [quit saved] 1))) kill-buffer "Saving %s font lock cache... %s." error "failed" quit "aborted" "done"] 5]) (defalias 'fast-lock-cache-data #[(version timestamp keywords properties &rest ignored) ":\fA@ \f!\n!)  \n U; ;\n;\f Ai \"ҏ =[Ղg=fׂg#==w=+" [timestamp font-lock-keywords current font-lock-compile-keywords keywords visited-file-modtime buffer-name t loaded buname buf-timestamp version 2 buffer-modified-p nil message "Loading %s font lock cache..." (fast-lock-set-face-properties properties) ((error (byte-code "" [error loaded] 1)) (quit (byte-code "" [quit loaded] 1))) "Loading %s font lock cache... %s." error "failed" quit "aborted" "done" font-lock-fontified fast-lock-cache-timestamp file fast-lock-cache-filename] 5]) #@283 Return a list of all `face' text properties in the current buffer. Each element of the list is of the form (VALUE START1 END1 START2 END2 ...) where VALUE is a `face' property value and STARTx and ENDx are positions. Only those `face' VALUEs in `fast-lock-save-faces' are returned. (defalias 'fast-lock-get-face-properties #[nil "~ d‰  b @ A e  $Q\f $E\f BB- BB." [fast-lock-save-faces face-list nil end start face regions properties limit faces text-property-any text-property-not-all] 7 (#$ . 10702)]) #@215 Set all `face' text properties to PROPERTIES in the current buffer. Any existing `face' text properties are removed first. Leaves buffer modified. See `fast-lock-get-face-properties' for the format of PROPERTIES. (defalias 'fast-lock-set-face-properties #[(properties) "~ed\" 2 @@D @A + @ A@\f# AA A*)" [font-lock-unfontify-region properties face regions plist set-text-properties] 5 (#$ . 11286)]) (byte-code " Ž \"*M Ɏ \"*%M!0\"\"\"\"LB!" [match-data match-data ((store-match-data match-data)) string-match "XEmacs" emacs-version fast-lock-get-face-properties #[nil "~!\n+" [nil cell properties map-extents #[(extent ignore) " !B \n >B ! !\n 6  ABBA\nEB*)ʇ" [extent-face extent value fast-lock-save-faces extent-start-position extent-end-position end start properties cell nil] 5]] 2 "Return a list of all `face' text properties in the current buffer.\nEach element of the list is of the form (VALUE START1 END1 START2 END2 ...)\nwhere VALUE is a `face' property value and STARTx and ENDx are positions.\nOnly those `face' VALUEs in `fast-lock-save-faces' are returned."] match-data ((store-match-data match-data)) fast-lock-set-face-properties #[(properties) "~ed\" 0 @@ @A\n)\n@\nA@ #\nAA A*)" [font-lock-unfontify-region properties regions face font-lock-set-face] 5 "Set all `face' text properties to PROPERTIES in the current buffer.\nAny existing `face' text properties are removed first.\nSee `fast-lock-get-face-properties' for the format of PROPERTIES."] fboundp font-lock-compile-keywords defalias identity add-hook after-save-hook fast-lock-after-save-hook kill-buffer-hook fast-lock-kill-buffer-hook kill-emacs-hook fast-lock-kill-emacs-hook fast-lock-mode minor-mode-alist (fast-lock-mode " Fast") provide fast-lock] 3)