/[emacs]/emacs/lisp/fast-lock.el
ViewVC logotype

Diff of /emacs/lisp/fast-lock.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by sds, Tue Nov 27 15:52:52 2001 UTC revision 1.25.4.1 by miles, Fri Apr 4 06:20:05 2003 UTC
# Line 34  Line 34 
34  ;; See also the lazy-lock package.  (But don't use the two at the same time!)  ;; See also the lazy-lock package.  (But don't use the two at the same time!)
35    
36  ;; Installation:  ;; Installation:
37  ;;  ;;
38  ;; Put in your ~/.emacs:  ;; Put in your ~/.emacs:
39  ;;  ;;
40  ;; (setq font-lock-support-mode 'fast-lock-mode)  ;; (setq font-lock-support-mode 'fast-lock-mode)
# Line 67  Line 67 
67  ;; 1.01--2.00: complete rewrite---not worth the space to document  ;; 1.01--2.00: complete rewrite---not worth the space to document
68  ;; - Changed structure of text properties cache and threw out file mod checks  ;; - Changed structure of text properties cache and threw out file mod checks
69  ;; 2.00--2.01:  ;; 2.00--2.01:
70  ;; - Made `condition-case' forms understand `quit'.  ;; - Made `condition-case' forms understand `quit'.
71  ;; - Made `fast-lock' require `font-lock'  ;; - Made `fast-lock' require `font-lock'
72  ;; - Made `fast-lock-cache-name' chase links (from Ben Liblit)  ;; - Made `fast-lock-cache-name' chase links (from Ben Liblit)
73  ;; 2.01--3.00:  ;; 2.01--3.00:
# Line 230  Line 230 
230   ;;   ;;
231   ;; We use this for compatibility with a future Emacs.   ;; We use this for compatibility with a future Emacs.
232   (or (fboundp 'defcustom)   (or (fboundp 'defcustom)
233       (defmacro defcustom (symbol value doc &rest args)       (defmacro defcustom (symbol value doc &rest args)
234         `(defvar ,symbol ,value ,doc))))         `(defvar ,symbol ,value ,doc))))
235    
236  ;(defun fast-lock-submit-bug-report ()  ;(defun fast-lock-submit-bug-report ()
# Line 534  See `fast-lock-cache-directories'." Line 534  See `fast-lock-cache-directories'."
534  ;; than one file would have the same cache name in that directory, if the luser  ;; than one file would have the same cache name in that directory, if the luser
535  ;; made a link from one relative cache directory to another.  (Phew!)  ;; made a link from one relative cache directory to another.  (Phew!)
536  (defun fast-lock-cache-name (directory)  (defun fast-lock-cache-name (directory)
537    "Return full cache path name using caching DIRECTORY.    "Return full cache file name using caching DIRECTORY.
538  If DIRECTORY is `.', the path is the buffer file name appended with `.flc'.  If DIRECTORY is `.', the file name is the buffer file name appended with `.flc'.
539  Otherwise, the path name is constructed from DIRECTORY and the buffer's true  Otherwise, the file name is constructed from DIRECTORY and the buffer's true
540  abbreviated file name, with all `/' characters in the name replaced with `#'  abbreviated file name, with all `/' characters in the name replaced with `#'
541  characters, and appended with `.flc'.  characters, and appended with `.flc'.
542    
543  If the same file has different cache path names when edited on different  If the same file has different cache file names when edited on different
544  machines, e.g., on one machine the cache file name has the prefix `#home',  machines, e.g., on one machine the cache file name has the prefix `#home',
545  perhaps due to automount, try putting in your `~/.emacs' something like:  perhaps due to automount, try putting in your `~/.emacs' something like:
546    
# Line 553  See `fast-lock-cache-directory'." Line 553  See `fast-lock-cache-directory'."
553        (concat buffer-file-name ".flc")        (concat buffer-file-name ".flc")
554      (let* ((bufile (expand-file-name buffer-file-truename))      (let* ((bufile (expand-file-name buffer-file-truename))
555             (chars-alist             (chars-alist
556              (if (memq system-type '(emx windows-nt))              (if (memq system-type '(emx windows-nt cygwin))
557                  '((?/ . (?#)) (?# . (?# ?#)) (?: . (?\;)) (?\; . (?\; ?\;)))                  '((?/ . (?#)) (?# . (?# ?#)) (?: . (?\;)) (?\; . (?\; ?\;)))
558                '((?/ . (?#)) (?# . (?# ?#)))))                '((?/ . (?#)) (?# . (?# ?#)))))
559             (mapchars             (mapchars
# Line 807  See `fast-lock-get-face-properties'." Line 807  See `fast-lock-get-face-properties'."
807              (font-lock-set-face (nth 0 regions) (nth 1 regions) face)              (font-lock-set-face (nth 0 regions) (nth 1 regions) face)
808              (setq regions (nthcdr 2 regions)))              (setq regions (nthcdr 2 regions)))
809            (setq face-properties (cdr face-properties))))            (setq face-properties (cdr face-properties))))
810        ;; XEmacs does not support the `syntax-table' text property.              ;; XEmacs does not support the `syntax-table' text property.
811        ))        ))
812    ;;    ;;
813    ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook.    ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook.

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.25.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26