(function 'font-lock-function-call-face)
(defun 'font-lock-function-name-face)
(defvar 'font-lock-variable-name-face))))
- (put-text-property sym (+ sym len) 'face face))
- (put-text-property sym (+ sym len) 'face
- (if (equal sym bind)
- 'elisp-binding-variable
- 'elisp-bound-variable))
+ (add-face-text-property sym (+ sym len) face t))
+ (add-face-text-property sym (+ sym len)
+ (if (equal sym bind)
+ 'elisp-binding-variable
+ 'elisp-bound-variable)
+ t)
(put-text-property sym (+ sym len 1) 'cursor-sensor-functions
;; Get a fresh list with SYM hardcoded,
;; so that the value is distinguishable
Non-nil optional argument LOUDLY permits printing status messages.
This is the `font-lock-fontify-region-function' for `emacs-lisp-mode'."
- (if elisp-fontify-semantically
- (let ((beg (save-excursion (goto-char beg) (beginning-of-defun) (point)))
- (end (save-excursion (goto-char end) (end-of-defun)
- (skip-chars-backward " \t\n")
- (point))))
- (font-lock-default-fontify-region beg end loudly)
- (elisp-fontify-region-semantically beg end)
- `(jit-lock-bounds ,beg . ,end))
- (font-lock-default-fontify-region beg end loudly)))
+ (or (and elisp-fontify-semantically
+ (condition-case nil
+ (let ((beg (save-excursion (goto-char beg) (beginning-of-defun)
+ (point)))
+ (end (save-excursion (goto-char end) (end-of-defun)
+ (skip-chars-backward " \t\n")
+ (point))))
+ (font-lock-default-fontify-region beg end loudly)
+ (elisp-fontify-region-semantically beg end)
+ `(jit-lock-bounds ,beg . ,end))
+ (scan-error nil)))
+ (font-lock-default-fontify-region beg end loudly)))
;;;###autoload
(define-derived-mode emacs-lisp-mode lisp-data-mode