]> code.delx.au - gnu-emacs/blobdiff - lisp/fast-lock.el
(timezone-parse-date): Match forms 1 and 2 first.
[gnu-emacs] / lisp / fast-lock.el
index 75a5082bc63fee26ffca16fdb4d49cc203c79853..09ecd27d4e0295e16df2ab6f75b57c45baebe18e 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Simon Marshall <simon@gnu.ai.mit.edu>
 ;; Keywords: faces files
-;; Version: 3.12
+;; Version: 3.12.01
 
 ;;; This file is part of GNU Emacs.
 
 ;; - Removed `fast-lock-submit-bug-report' and bade farewell
 ;; 3.11--3.12:
 ;; - Added Custom support (Hrvoje Niksic help)
+;; - Made `save-buffer-state' wrap `inhibit-point-motion-hooks'
 ;; - Made `fast-lock-cache-data' simplify calls of `font-lock-compile-keywords'
+;; 3.12--3.13:
+;; - Removed `byte-*' variables from `eval-when-compile' (Erik Naggum hint)
 \f
 ;;; Code:
 
   ;; We don't do this at the top-level as we only use non-autoloaded macros.
   (require 'cl)
   ;;
-  ;; I prefer lazy code---and lazy mode.
-  (setq byte-compile-dynamic t byte-compile-dynamic-docstrings t)
-  ;; But, we make sure that the code is as zippy as can be.
-  (setq byte-optimize t)
-  ;;
   ;; We use this to preserve or protect things when modifying text properties.
   (defmacro save-buffer-state (varlist &rest body)
     "Bind variables according to VARLIST and eval BODY restoring buffer state."
             (let ((faces (, face)))
               (while (unless (memq (car faces) fast-lock-save-faces)
                        (setq faces (cdr faces))))
-              faces))))))
+              faces)))))
+  ;;
+  ;; We use this for compatibility with a future Emacs.
+  (or (fboundp 'defcustom)
+      (defmacro defcustom (symbol value doc &rest args) 
+       (` (defvar (, symbol) (, value) (, doc))))))
 
 ;(defun fast-lock-submit-bug-report ()
 ;  "Submit via mail a bug report on fast-lock.el."
 ;  (interactive)
 ;  (let ((reporter-prompt-for-summary-p t))
-;    (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.12"
+;    (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.12.01"
 ;     '(fast-lock-cache-directories fast-lock-minimum-size
 ;       fast-lock-save-others fast-lock-save-events fast-lock-save-faces
 ;       fast-lock-verbose)
 \f
 ;; User Variables:
 
-(defgroup fast-lock nil
-  "Font Lock support mode to cache fontification."
-  :link '(custom-manual "(emacs)Support Modes")
-  :group 'font-lock)
-
 (defcustom fast-lock-cache-directories '("." "~/.emacs-flc")
 ; - `internal', keep each file's Font Lock cache file in the same file.
 ; - `external', keep each file's Font Lock cache file in the same directory.
@@ -253,7 +251,10 @@ For example:
 
 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'."
-  :type '(repeat (radio (cons regexp directory) directory))
+  :type '(repeat (radio (directory :tag "directory")
+                       (cons :tag "Matching"
+                             (regexp :tag "regexp")
+                             (directory :tag "directory"))))
   :group 'fast-lock)
 
 (defcustom fast-lock-minimum-size (* 25 1024)
@@ -265,10 +266,17 @@ 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."
-  :type '(radio (const :tag "None" nil)
-               (integer :tag "Size")
-               (repeat (cons (symbol :tag "Major Mode")
-                             (integer :tag "Size"))))
+  :type '(choice (const :tag "none" nil)
+                (integer :tag "size")
+                (repeat :menu-tag "mode specific" :tag "mode specific"
+                        :value ((t . nil))
+                        (cons :tag "Instance"
+                              (radio :tag "Mode"
+                                     (const :tag "all" t)
+                                     (symbol :tag "name"))
+                              (radio :tag "Size"
+                                     (const :tag "none" nil)
+                                     (integer :tag "size")))))
   :group 'fast-lock)
 
 (defcustom fast-lock-save-events '(kill-buffer kill-emacs)
@@ -276,7 +284,9 @@ for buffers in Rmail mode, and size is irrelevant otherwise."
 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."
-  :type '(set (const kill-buffer) (const save-buffer) (const kill-emacs))
+  :type '(set (const :tag "buffer saving" save-buffer)
+             (const :tag "buffer killing" kill-buffer)
+             (const :tag "emacs killing" kill-emacs))
   :group 'fast-lock)
 
 (defcustom fast-lock-save-others t
@@ -289,9 +299,9 @@ Font Lock cache files saved.  Ownership may be unknown for networked files."
 (defcustom fast-lock-verbose font-lock-verbose
   "*If non-nil, means show status messages for cache processing.
 If a number, only buffers greater than this size have processing messages."
-  :type '(radio (const :tag "Never" nil)
-               (const :tag "Always" t)
-               (integer :tag "Size"))
+  :type '(choice (const :tag "never" nil)
+                (const :tag "always" t)
+                (integer :tag "size"))
   :group 'fast-lock)
 
 (defvar fast-lock-save-faces