emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/scheme.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/scheme.el
Date: Wed, 05 Oct 2005 10:23:13 -0400

Index: emacs/lisp/progmodes/scheme.el
diff -c emacs/lisp/progmodes/scheme.el:1.55 emacs/lisp/progmodes/scheme.el:1.56
*** emacs/lisp/progmodes/scheme.el:1.55 Sat Sep 17 11:07:16 2005
--- emacs/lisp/progmodes/scheme.el      Wed Oct  5 14:23:13 2005
***************
*** 90,96 ****
      (modify-syntax-entry ?\] ")[  " st)
      (modify-syntax-entry ?{ "(}  " st)
      (modify-syntax-entry ?} "){  " st)
!     (modify-syntax-entry ?\| "\" 23b" st)
  
      ;; Other atom delimiters
      (modify-syntax-entry ?\( "()  " st)
--- 90,101 ----
      (modify-syntax-entry ?\] ")[  " st)
      (modify-syntax-entry ?{ "(}  " st)
      (modify-syntax-entry ?} "){  " st)
!     (modify-syntax-entry ?\| "\" 23bn" st)
!     ;; Guile allows #! ... !# comments.
!     ;; But SRFI-22 defines the comment as #!...\n instead.
!     ;; Also Guile says that the !# should be on a line of its own.
!     ;; It's too difficult to get it right, for too little benefit.
!     ;; (modify-syntax-entry ?! "_ 2" st)
  
      ;; Other atom delimiters
      (modify-syntax-entry ?\( "()  " st)
***************
*** 103,109 ****
      ;; Special characters
      (modify-syntax-entry ?, "'   " st)
      (modify-syntax-entry ?@ "'   " st)
!     (modify-syntax-entry ?# "' 14bn" st)
      (modify-syntax-entry ?\\ "\\   " st)
      st))
  
--- 108,114 ----
      ;; Special characters
      (modify-syntax-entry ?, "'   " st)
      (modify-syntax-entry ?@ "'   " st)
!     (modify-syntax-entry ?# "' 14b" st)
      (modify-syntax-entry ?\\ "\\   " st)
      st))
  
***************
*** 167,175 ****
    (setq font-lock-defaults
          '((scheme-font-lock-keywords
             scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
!           nil t (("+-*/.<>=!?$%_&~^:#" . "w")) beginning-of-defun
            (font-lock-mark-block-function . mark-defun)
!           (font-lock-syntactic-face-function . 
lisp-font-lock-syntactic-face-function))))
  
  (defvar scheme-mode-line-process "")
  
--- 172,182 ----
    (setq font-lock-defaults
          '((scheme-font-lock-keywords
             scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
!           nil t (("+-*/.<>=!?$%_&~^:" . "w") (?#. "w 14"))
!           beginning-of-defun
            (font-lock-mark-block-function . mark-defun)
!           (font-lock-syntactic-face-function
!            . scheme-font-lock-syntactic-face-function))))
  
  (defvar scheme-mode-line-process "")
  
***************
*** 344,349 ****
--- 351,366 ----
  
  (defvar scheme-font-lock-keywords scheme-font-lock-keywords-1
    "Default expressions to highlight in Scheme modes.")
+ 
+ (defun scheme-font-lock-syntactic-face-function (state)
+   (if (nth 3 state)
+       ;; In a string.
+       (if (eq (char-after (nth 8 state)) ?|)
+           ;; This is not a string, but a |...| symbol.
+           nil
+         font-lock-string-face)
+     ;; In a comment.
+     font-lock-comment-face))
  
  ;;;###autoload
  (define-derived-mode dsssl-mode scheme-mode "DSSSL"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]