Index: emacs/lisp/font-lock.el
diff -c emacs/lisp/font-lock.el:1.253 emacs/lisp/font-lock.el:1.254
*** emacs/lisp/font-lock.el:1.253 Fri May 13 03:34:32 2005
--- emacs/lisp/font-lock.el Sun May 15 14:28:55 2005
***************
*** 1311,1322 ****
;;; Syntactic fontification functions.
(defun font-lock-fontify-syntactically-region (start end &optional loudly
ppss)
"Put proper face on each string and comment between START and END.
START should be at the beginning of a line."
(let ((comment-end-regexp
! (regexp-quote
! (replace-regexp-in-string "^ *" "" comment-end)))
state face beg)
(if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
(goto-char start)
--- 1311,1329 ----
;;; Syntactic fontification functions.
+ (defvar font-lock-comment-start-skip nil
+ "If non-nil, Font Lock mode uses this instead of `comment-start-skip'.")
+
+ (defvar font-lock-comment-end-skip nil
+ "If non-nil, Font Lock mode uses this instead of `comment-end'.")
+
(defun font-lock-fontify-syntactically-region (start end &optional loudly
ppss)
"Put proper face on each string and comment between START and END.
START should be at the beginning of a line."
(let ((comment-end-regexp
! (or font-lock-comment-end-skip
! (regexp-quote
! (replace-regexp-in-string "^ *" "" comment-end))))
state face beg)
(if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
(goto-char start)
***************
*** 1334,1345 ****
'syntax-table))
(when face (put-text-property beg (point) 'face face))
(when (and (eq face 'font-lock-comment-face)
! comment-start-skip)
;; Find the comment delimiters
;; and use font-lock-comment-delimiter-face for them.
(save-excursion
(goto-char beg)
! (if (looking-at comment-start-skip)
(put-text-property beg (match-end 0) 'face
font-lock-comment-delimiter-face)))
(if (looking-back comment-end-regexp (point-at-bol))
--- 1341,1354 ----
'syntax-table))
(when face (put-text-property beg (point) 'face face))
(when (and (eq face 'font-lock-comment-face)
! (or font-lock-comment-start-skip
! comment-start-skip))
;; Find the comment delimiters
;; and use font-lock-comment-delimiter-face for them.
(save-excursion
(goto-char beg)
! (if (looking-at (or font-lock-comment-start-skip
! comment-start-skip))
(put-text-property beg (match-end 0) 'face
font-lock-comment-delimiter-face)))
(if (looking-back comment-end-regexp (point-at-bol))
_______________________________________________
Emacs-diffs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-diffs