[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/font-lock.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/font-lock.el |
Date: |
Wed, 11 May 2005 14:52:19 -0400 |
Index: emacs/lisp/font-lock.el
diff -c emacs/lisp/font-lock.el:1.248 emacs/lisp/font-lock.el:1.249
*** emacs/lisp/font-lock.el:1.248 Wed May 11 16:27:25 2005
--- emacs/lisp/font-lock.el Wed May 11 18:52:17 2005
***************
*** 1314,1323 ****
(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 (state face beg
! (comment-end-regexp
! (regexp-quote
! (replace-regexp-in-string "^ *" "" comment-end))))
(if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
(goto-char start)
;;
--- 1314,1323 ----
(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)
;;
***************
*** 1333,1350 ****
(setq state (parse-partial-sexp (point) end nil nil state
'syntax-table))
(when face (put-text-property beg (point) 'face face))
! (when (eq face 'font-lock-comment-face)
;; Find the comment delimiters
;; and use font-lock-comment-delimiter-face for them.
(save-excursion
(goto-char beg)
! (if (and comment-start-skip (looking-at comment-start-skip))
(put-text-property beg (match-end 0) 'face
! 'font-lock-comment-delimiter-face)))
! (if (and comment-end
! (looking-back comment-end-regexp (point-at-bol)))
(put-text-property (match-beginning 0) (point) 'face
! 'font-lock-comment-delimiter-face))))
(< (point) end))
(setq state (parse-partial-sexp (point) end nil nil state
'syntax-table)))))
--- 1333,1350 ----
(setq state (parse-partial-sexp (point) end nil nil state
'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))
(put-text-property (match-beginning 0) (point) 'face
! font-lock-comment-delimiter-face))))
(< (point) end))
(setq state (parse-partial-sexp (point) end nil nil state
'syntax-table)))))
***************
*** 1856,1862 ****
; (put 'font-lock-fontify-more 'menu-enable '(identity))
; (put 'font-lock-fontify-less 'menu-enable '(identity)))
;
! ;;; Put the appropriate symbol property values on now. See above.
;(put 'global-font-lock-mode 'menu-selected 'global-font-lock-mode)
;(put 'font-lock-mode 'menu-selected 'font-lock-mode)
;(put 'font-lock-fontify-more 'menu-enable '(nth 2 font-lock-fontify-level))
--- 1856,1862 ----
; (put 'font-lock-fontify-more 'menu-enable '(identity))
; (put 'font-lock-fontify-less 'menu-enable '(identity)))
;
! ; ;; Put the appropriate symbol property values on now. See above.
;(put 'global-font-lock-mode 'menu-selected 'global-font-lock-mode)
;(put 'font-lock-mode 'menu-selected 'font-lock-mode)
;(put 'font-lock-fontify-more 'menu-enable '(nth 2 font-lock-fontify-level))
***************
*** 1890,1896 ****
; (font-lock-fontify-level (1+ (car font-lock-fontify-level)))
; (error "No more decoration")))
;
! ;;; This should be called by `font-lock-set-defaults'.
;(defun font-lock-set-menu ()
; ;; Activate less/more fontification entries if there are multiple levels
for
; ;; the current buffer. Sets `font-lock-fontify-level' to be of the form
--- 1890,1896 ----
; (font-lock-fontify-level (1+ (car font-lock-fontify-level)))
; (error "No more decoration")))
;
! ; ;; This should be called by `font-lock-set-defaults'.
;(defun font-lock-set-menu ()
; ;; Activate less/more fontification entries if there are multiple levels
for
; ;; the current buffer. Sets `font-lock-fontify-level' to be of the form
***************
*** 1911,1917 ****
; (setq font-lock-fontify-level (list level (> level 1)
; (< level (1- (length keywords))))))))
;
! ;;; This should be called by `font-lock-unset-defaults'.
;(defun font-lock-unset-menu ()
; ;; Deactivate less/more fontification entries.
; (setq font-lock-fontify-level nil))
--- 1911,1917 ----
; (setq font-lock-fontify-level (list level (> level 1)
; (< level (1- (length keywords))))))))
;
! ; ;; This should be called by `font-lock-unset-defaults'.
;(defun font-lock-unset-menu ()
; ;; Deactivate less/more fontification entries.
; (setq font-lock-fontify-level nil))
***************
*** 1919,1925 ****
;;; End of Menu support.
;;; Various regexp information shared by several modes.
! ;;; Information specific to a single mode should go in its load library.
;; Font Lock support for C, C++, Objective-C and Java modes is now in
;; cc-fonts.el (and required by cc-mode.el). However, the below function
--- 1919,1925 ----
;;; End of Menu support.
;;; Various regexp information shared by several modes.
! ; ;; Information specific to a single mode should go in its load library.
;; Font Lock support for C, C++, Objective-C and Java modes is now in
;; cc-fonts.el (and required by cc-mode.el). However, the below function
***************
*** 2071,2079 ****
;; ELisp and CLisp `&' keywords as types.
'("\\&\\sw+\\>" . font-lock-type-face)
;;
! ;;; This is too general -- rms.
! ;;; A user complained that he has functions whose names start with `do'
! ;;; and that they get the wrong color.
;;; ;; CL `with-' and `do-' constructs
;;; '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1
font-lock-keyword-face)
)))
--- 2071,2079 ----
;; ELisp and CLisp `&' keywords as types.
'("\\&\\sw+\\>" . font-lock-type-face)
;;
! ;;; This is too general -- rms.
! ;;; A user complained that he has functions whose names start with `do'
! ;;; and that they get the wrong color.
;;; ;; CL `with-' and `do-' constructs
;;; '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1
font-lock-keyword-face)
)))
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Daniel Pfeiffer, 2005/05/05
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Lute Kamstra, 2005/05/10
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Stefan Monnier, 2005/05/11
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Richard M . Stallman, 2005/05/11
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Kim F . Storm, 2005/05/12
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Stefan Monnier, 2005/05/12
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Stefan Monnier, 2005/05/12
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Stefan Monnier, 2005/05/12
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Richard M . Stallman, 2005/05/16
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Daniel Pfeiffer, 2005/05/17
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Daniel Pfeiffer, 2005/05/18
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Stefan Monnier, 2005/05/20
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Lute Kamstra, 2005/05/22
- [Emacs-diffs] Changes to emacs/lisp/font-lock.el, Richard M . Stallman, 2005/05/29