;ELC ;;; compiled by simon@duality.gnu.ai.mit.edu on Mon Jun 24 03:49:24 1996 ;;; from file /home/gp2/simon/Emacs/lisp/fast-lock.el ;;; emacs version 19.31.1. ;;; 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.29"))) (error "`fast-lock.el' was compiled for Emacs 19.29 or later")) (byte-code "!\n= !" [require font-lock system-type ms-dos msdos-long-file-names error "`fast-lock' was written for long file name systems"] 2) #@47 Submit via mail a bug report on fast-lock.el. (defalias 'fast-lock-submit-bug-report #[nil #@529 ("ƉQ&)" . [t reporter-prompt-for-summary-p reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.10" (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:"])(#$ . 739) nil 9 (#$ . 641) nil]) (byte-code "! B! B!  B‡" [boundp fast-lock-mode nil current-load-list fast-lock-cache-timestamp fast-lock-cache-filename] 2) #@832 *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: (let ((home (expand-file-name (abbreviate-file-name (file-truename "~/"))))) (list (cons (concat "^" (regexp-quote home)) ".") "~/.emacs-flc")) => (("^/your/true/home/directory/" . ".") "~/.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")) (#$ . -1459)) #@527 *Minimum size of a buffer for cached fontification. Only buffers more than this can have associated Font Lock cache files saved. If nil, means cache files are never created. If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), where MAJOR-MODE is a symbol or t (meaning the default). For example: ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576)) means that the minimum size is 25K for buffers in C or C++ modes, one megabyte for buffers in Rmail mode, and size is irrelevant otherwise. (defvar fast-lock-minimum-size 25600 (#$ . -2376)) #@242 *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)) (#$ . -2960)) #@222 *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 (#$ . -3285)) #@108 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-face-list] 3) (#$ . 3559)) #@1194 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: (setq font-lock-support-mode 'fast-lock-mode) 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) #@341 ("!\n0 >?0\f0\f!V0 ?L /0/0!)!L!L G0 ?G0 " . [make-local-variable fast-lock-mode buffer-file-truename font-lock-inhibit-thing-lock arg prefix-numeric-value 0 font-lock-mode font-lock-support-mode t fast-lock-cache-timestamp nil fast-lock-cache-filename font-lock-fontified fast-lock-read-cache])(#$ . 5107) nil 3 (#$ . 3863) "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 #@448 (" !L00 00@\" ͏A)0! ?@0\f," . [fast-lock-cache-directories buffer-modified-p t font-lock-fontified fontified inhibit-read-only modified directories make-local-variable nil fast-lock-cache-directory directory (byte-code "0!\n!0\nʼn$" [directory fast-lock-cache-name fast-lock-cache-filename file-readable-p load t] 5) ((error) (quit)) set-buffer-modified-p fast-lock-cache-filename])(#$ . 5938) nil 4 (#$ . 5489) 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) #@632 ("0q\n! 0 ?0p!0 ?00 Y0 K0 !8=0ed$00 >0@\"s0!0!0\"A*X0)," . [buffer font-lock-value-in-major-mode fast-lock-minimum-size visited-file-modtime nil saved file-timestamp min-size fast-lock-mode buffer-modified-p verify-visited-file-modtime fast-lock-cache-timestamp 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])(#$ . 7193) nil 6 (#$ . 6427) nil]) #@41 Unconditionally turn on Fast Lock mode. (defalias 'turn-on-fast-lock #[nil #@31 ("!" . [fast-lock-mode t])(#$ . 7946) nil 2 (#$ . 7865)]) (defalias 'fast-lock-after-fontify-buffer #[nil #@189 ("0!0!0 \"Ɖ" . [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])(#$ . 8062) nil 3]) (defalias (quote fast-lock-after-unfontify-buffer) (quote ignore)) (defalias 'fast-lock-save-cache-after-save-file #[nil #@75 (" >0 " . [save-buffer fast-lock-save-events fast-lock-save-cache])(#$ . 8396) nil 2]) (defalias 'fast-lock-save-cache-before-kill-buffer #[nil #@75 (" >0 " . [kill-buffer fast-lock-save-events fast-lock-save-cache])(#$ . 8552) nil 2]) (defalias 'fast-lock-save-caches-before-kill-emacs #[nil #@97 (" > 0 \"" . [kill-emacs fast-lock-save-events mapcar fast-lock-save-cache buffer-list])(#$ . 8708) nil 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) #@359 ("0+0\n;0\n+0\f! Ɏ\n@\"**0\nA* 50J0 !A0 J0 J0Ϗ)" . [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))])(#$ . 9131) nil 4 (#$ . 8830)]) #@739 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'. If the same file has different cache path names when edited on different machines, e.g., on one machine the cache file name has the prefix `#home', perhaps due to automount, try putting in your `~/.emacs' something like: (setq directory-abbrev-alist (cons '("^/home/" . "/") directory-abbrev-alist)) Emacs automagically removes the common `/tmp_mnt' automount prefix by default. See `fast-lock-cache-directory'. (defalias 'fast-lock-cache-name #[(directory) #@362 ("\n0\nP !=0ɂ0  !! \"\"#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 0C" [c chars-alist] 2] mapchars file-name-as-directory mapconcat char-to-string apply append mapcar ""])(#$ . 10318) nil 8 (#$ . 9527)]) (defalias 'fast-lock-save-cache-1 #[(file timestamp) #@598 ("!  \"ˏ! \f=&0ς10\f=00т10#\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"])(#$ . 10771) nil 5]) (defalias 'fast-lock-cache-data #[(version timestamp keywords properties &rest ignored) #@608 (":\f0A@ \f!\n!)  \n U;0 ;0\n;0\f A0i0 \"ҏ =[0Ղg0=f0ׂg0#==w0+" . [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])(#$ . 11483) nil 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 #@243 ("~ 0 d‰  b0 @ A e  $Q0\f $E0\f BB-00 BB0." . [fast-lock-save-faces face-list nil end start face regions properties limit faces text-property-any text-property-not-all])(#$ . 12453) nil 7 (#$ . 12117)]) #@190 Set all `face' text properties to PROPERTIES in the current buffer. Any existing `face' text properties are removed first. See `fast-lock-get-face-properties' for the format of PROPERTIES. (defalias 'fast-lock-set-face-properties #[(properties) #@388 ("  \n \f~ed\"O0@@D@AA\n$0\n@\nA@ #\nAA;0)\f?]0 ]0!.\n" . [nil plist regions buffer-modified-p modified t inhibit-read-only buffer-undo-list before-change-functions after-change-functions deactivate-mark buffer-file-name buffer-file-truename font-lock-unfontify-region properties face set-text-properties set-buffer-modified-p])(#$ . 12987) nil 5 (#$ . 12735)]) (byte-code " Ž \"*MM\"!6!*B#!A\"\"\"\"![\" i \" !" [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."] 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."] add-hook font-lock-after-fontify-buffer-hook fast-lock-after-fontify-buffer boundp font-lock-inhibit-thing-lock nil current-load-list put variable-documentation "List of Font Lock mode related modes that should not be turned on." fboundp font-lock-compile-keywords defalias identity after-save-hook fast-lock-save-cache-after-save-file kill-buffer-hook fast-lock-save-cache-before-kill-buffer kill-emacs-hook fast-lock-save-caches-before-kill-emacs add-minor-mode fast-lock-mode minor-mode-alist append ((fast-lock-mode nil)) provide fast-lock] 4)