(paragraph-start, paragraph-separate): Default values no longer start
[bpt/emacs.git] / lisp / font-lock.el
index 6835d9c..ac36725 100644 (file)
@@ -262,7 +262,9 @@ See `font-lock-make-face' and `list-faces-display'."
                      (list 'font-lock-variable-name-face
                            (if light-bg "DimGray" "Gray90") nil t t nil)
                      (list 'font-lock-type-face
-                           (if light-bg "DimGray" "Gray80") nil t nil t)))
+                           (if light-bg "DimGray" "Gray80") nil t nil t)
+                     (list 'font-lock-reference-face
+                           (if light-bg "Gray50" "LightGray") nil t nil t)))
                    (light-bg           ; light colour background
                     '((font-lock-comment-face "Firebrick")
                       (font-lock-string-face "RosyBrown")
@@ -332,7 +334,11 @@ the face is also set; its value is the face name."
       (goto-char start)
       (beginning-of-line)
       (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
-      (let ((buffer-read-only nil)
+      (let ((inhibit-read-only t)
+           ;; Prevent warnings if the disk file has been altered.
+           (buffer-file-name)
+           ;; Suppress all undo activity.
+           (buffer-undo-list t)
            (modified (buffer-modified-p))
            (cstart (if comment-start-skip
                        (concat "\\s\"\\|" comment-start-skip)
@@ -447,7 +453,10 @@ the face is also set; its value is the face name."
 
 (defun font-lock-unfontify-region (beg end)
   (let ((modified (buffer-modified-p))
-       (buffer-read-only nil))
+       (buffer-undo-list t)
+       (inhibit-read-only t)
+       ;; Prevent warnings if the disk file has been altered.
+       (buffer-file-name))
     (remove-text-properties beg end '(face nil))
     (set-buffer-modified-p modified)))
 
@@ -472,12 +481,14 @@ the face is also set; its value is the face name."
       (if font-lock-no-comments
          (remove-text-properties beg end '(face nil))
        (font-lock-fontify-region beg end))
-      ;; Now scan for keywords, but not if we are inside a comment now.
-      (or (and (not font-lock-no-comments)
-              (let ((state (parse-partial-sexp beg end nil nil 
-                                               font-lock-cache-state)))
-                (or (nth 4 state) (nth 7 state))))
-         (font-lock-hack-keywords beg end)))))
+      (font-lock-hack-keywords beg end))))
+
+;      ;; Now scan for keywords, but not if we are inside a comment now.
+;      (or (and (not font-lock-no-comments)
+;             (let ((state (parse-partial-sexp beg end nil nil 
+;                                              font-lock-cache-state)))
+;               (or (nth 4 state) (nth 7 state))))
+;        (font-lock-hack-keywords beg end))
 \f
 ;;; Fontifying arbitrary patterns
 
@@ -486,7 +497,10 @@ the face is also set; its value is the face name."
   (let ((case-fold-search font-lock-keywords-case-fold-search)
        (keywords font-lock-keywords)
        (count 0)
-       (buffer-read-only nil)
+       ;; Prevent warnings if the disk file has been altered.
+       (buffer-file-name)
+       (inhibit-read-only t)
+       (buffer-undo-list t)
        (modified (buffer-modified-p))
        (old-syntax (syntax-table))
        (bufname (buffer-name)))
@@ -719,7 +733,7 @@ This does fairly subdued highlighting.")
     '("\\\\\\\\\\[\\([^]\\\n]+\\)]" 1 font-lock-reference-face t)
     ;;
     ;; Words inside `' which tend to be function names
-    (let ((word-char "[-+a-zA-Z0-9_.*]"))
+    (let ((word-char "[-+a-zA-Z0-9_:*]"))
       (list (concat "`\\(" word-char word-char "+\\)'")
            1 'font-lock-reference-face t))
     ;;