(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")
(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)
(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)))
(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
(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)))
'("\\\\\\\\\\[\\([^]\\\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))
;;