emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/font-lock.el


From: Daniel Pfeiffer
Subject: [Emacs-diffs] Changes to emacs/lisp/font-lock.el
Date: Mon, 16 May 2005 16:35:40 -0400

Index: emacs/lisp/font-lock.el
diff -c emacs/lisp/font-lock.el:1.254 emacs/lisp/font-lock.el:1.255
*** emacs/lisp/font-lock.el:1.254       Sun May 15 14:28:55 2005
--- emacs/lisp/font-lock.el     Mon May 16 20:35:39 2005
***************
*** 1967,2075 ****
  
  (defconst lisp-font-lock-keywords-1
    (eval-when-compile
!     (list
!      ;;
!      ;; Definitions.
!      (list (concat "(\\(def\\("
!                  ;; Function declarations.
!                  
"\\(advice\\|varalias\\|alias\\|generic\\|macro\\*?\\|method\\|"
!                    "setf\\|subst\\*?\\|un\\*?\\|"
!                    
"ine-\\(condition\\|\\(?:derived\\|minor\\|generic\\)-mode\\|"
!                    "method-combination\\|setf-expander\\|skeleton\\|widget\\|"
!                    
"function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
!                  ;; Variable declarations.
!                  "\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
!                  ;; Structure declarations.
!                  "\\(class\\|group\\|theme\\|package\\|struct\\|type\\)"
!                  "\\)\\)\\>"
!                  ;; Any whitespace and defined object.
!                  "[ \t'\(]*"
!                  "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
!          '(1 font-lock-keyword-face)
!          '(9 (cond ((match-beginning 3) font-lock-function-name-face)
!                    ((match-beginning 6) font-lock-variable-name-face)
!                    (t font-lock-type-face))
!              nil t))
!      ;;
!      ;; Emacs Lisp autoload cookies.
!      '("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend)
!      ))
    "Subdued level highlighting for Lisp modes.")
  
  (defconst lisp-font-lock-keywords-2
    (append lisp-font-lock-keywords-1
     (eval-when-compile
!      (list
!       ;;
!       ;; Control structures.  Emacs Lisp forms.
!       (cons (concat
!            "(" (regexp-opt
!                 '("cond" "if" "while" "let" "let*"
!                   "prog" "progn" "progv" "prog1" "prog2" "prog*"
!                   "inline" "lambda" "save-restriction" "save-excursion"
!                   "save-window-excursion" "save-selected-window"
!                   "save-match-data" "save-current-buffer" "unwind-protect"
!                   "condition-case" "track-mouse"
!                   "eval-after-load" "eval-and-compile" "eval-when-compile"
!                   "eval-when"
!                   "with-category-table"
!                   "with-current-buffer" "with-electric-help"
!                   "with-local-quit" "with-no-warnings"
!                   "with-output-to-string" "with-output-to-temp-buffer"
!                   "with-selected-window" "with-syntax-table"
!                   "with-temp-buffer" "with-temp-file" "with-temp-message"
!                   "with-timeout" "with-timeout-handler") t)
!            "\\>")
!           1)
!       ;;
!       ;; Control structures.  Common Lisp forms.
!       (cons (concat
!            "(" (regexp-opt
!                 '("when" "unless" "case" "ecase" "typecase" "etypecase"
!                   "ccase" "ctypecase" "handler-case" "handler-bind"
!                   "restart-bind" "restart-case" "in-package"
!                   "break" "ignore-errors"
!                   "loop" "do" "do*" "dotimes" "dolist" "the" "locally"
!                   "proclaim" "declaim" "declare" "symbol-macrolet"
!                   "lexical-let" "lexical-let*" "flet" "labels" "compiler-let"
!                   "destructuring-bind" "macrolet" "tagbody" "block" "go"
!                   "multiple-value-bind" "multiple-value-prog1"
!                   "return" "return-from"
!                   "with-accessors" "with-compilation-unit"
!                   "with-condition-restarts" "with-hash-table-iterator"
!                   "with-input-from-string" "with-open-file"
!                   "with-open-stream" "with-output-to-string"
!                   "with-package-iterator" "with-simple-restart"
!                   "with-slots" "with-standard-io-syntax") t)
!            "\\>")
!           1)
!       ;;
!       ;; Exit/Feature symbols as constants.
!       (list (concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>"
!                   "[ \t']*\\(\\sw+\\)?")
!           '(1 font-lock-keyword-face)
!           '(2 font-lock-constant-face nil t))
!       ;;
!       ;; Erroneous structures.
!       
'("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 
font-lock-warning-face)
!       ;;
!       ;; Words inside \\[] tend to be for `substitute-command-keys'.
!       '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
!       ;;
!       ;; Words inside `' tend to be symbol names.
!       '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
!       ;;
!       ;; Constant values.
!       '("\\<:\\sw+\\>" 0 font-lock-builtin-face)
!       ;;
!       ;; 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)
        )))
    "Gaudy level highlighting for Lisp modes.")
  
--- 1967,2072 ----
  
  (defconst lisp-font-lock-keywords-1
    (eval-when-compile
!     `(;; Definitions.
!       (,(concat "(\\(def\\("
!               ;; Function declarations.
!               "\\(advice\\|varalias\\|alias\\|generic\\|macro\\*?\\|method\\|"
!               "setf\\|subst\\*?\\|un\\*?\\|"
!               "ine-\\(condition\\|\\(?:derived\\|minor\\|generic\\)-mode\\|"
!               "method-combination\\|setf-expander\\|skeleton\\|widget\\|"
!               "function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
!               ;; Variable declarations.
!               "\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
!               ;; Structure declarations.
!               "\\(class\\|group\\|theme\\|package\\|struct\\|type\\)"
!               "\\)\\)\\>"
!               ;; Any whitespace and defined object.
!               "[ \t'\(]*"
!               "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
!        (1 font-lock-keyword-face)
!        (9 (cond ((match-beginning 3) font-lock-function-name-face)
!               ((match-beginning 6) font-lock-variable-name-face)
!               (t font-lock-type-face))
!         nil t))
!       ;; Emacs Lisp autoload cookies.
!       ("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend)
!       ;; Regexp negated char group.
!       ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
    "Subdued level highlighting for Lisp modes.")
  
  (defconst lisp-font-lock-keywords-2
    (append lisp-font-lock-keywords-1
     (eval-when-compile
!      `(;; Control structures.  Emacs Lisp forms.
!        (,(concat
!         "(" (regexp-opt
!              '("cond" "if" "while" "let" "let*"
!                "prog" "progn" "progv" "prog1" "prog2" "prog*"
!                "inline" "lambda" "save-restriction" "save-excursion"
!                "save-window-excursion" "save-selected-window"
!                "save-match-data" "save-current-buffer" "unwind-protect"
!                "condition-case" "track-mouse"
!                "eval-after-load" "eval-and-compile" "eval-when-compile"
!                "eval-when"
!                "with-category-table"
!                "with-current-buffer" "with-electric-help"
!                "with-local-quit" "with-no-warnings"
!                "with-output-to-string" "with-output-to-temp-buffer"
!                "with-selected-window" "with-syntax-table"
!                "with-temp-buffer" "with-temp-file" "with-temp-message"
!                "with-timeout" "with-timeout-handler") t)
!         "\\>")
!         .  1)
!        ;; Control structures.  Common Lisp forms.
!        (,(concat
!         "(" (regexp-opt
!              '("when" "unless" "case" "ecase" "typecase" "etypecase"
!                "ccase" "ctypecase" "handler-case" "handler-bind"
!                "restart-bind" "restart-case" "in-package"
!                "break" "ignore-errors"
!                "loop" "do" "do*" "dotimes" "dolist" "the" "locally"
!                "proclaim" "declaim" "declare" "symbol-macrolet"
!                "lexical-let" "lexical-let*" "flet" "labels" "compiler-let"
!                "destructuring-bind" "macrolet" "tagbody" "block" "go"
!                "multiple-value-bind" "multiple-value-prog1"
!                "return" "return-from"
!                "with-accessors" "with-compilation-unit"
!                "with-condition-restarts" "with-hash-table-iterator"
!                "with-input-from-string" "with-open-file"
!                "with-open-stream" "with-output-to-string"
!                "with-package-iterator" "with-simple-restart"
!                "with-slots" "with-standard-io-syntax") t)
!         "\\>")
!         . 1)
!        ;; Exit/Feature symbols as constants.
!        (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>"
!                "[ \t']*\\(\\sw+\\)?")
!       (1 font-lock-keyword-face)
!       (2 font-lock-constant-face nil t))
!        ;; Erroneous structures.
!        
("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 
font-lock-warning-face)
!        ;; Words inside \\[] tend to be for `substitute-command-keys'.
!        ("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
!        ;; Words inside `' tend to be symbol names.
!        ("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
!        ;; Constant values.
!        ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
!        ;; ELisp and CLisp `&' keywords as types.
!        ("\\&\\sw+\\>" . font-lock-type-face)
!        ;; Make regexp grouping constructs bold, so they stand out.
!        ("\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?"
!       (1 font-lock-comment-face prepend)
!       (2 'bold prepend)
!       (3 font-lock-type-face prepend t))
!        ;; Underline innermost grouping, so that you can more easily see what 
belongs together.
!        ;; 2005-05-12: Font-lock can go into an unbreakable endless loop on 
this -- something's broken.
!        
;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]"
!        ;;1 'underline prepend)
  ;;;  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)
        )))
    "Gaudy level highlighting for Lisp modes.")
  




reply via email to

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