X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/08b3caa982199bd7939d9d6877203ada5d0083b5..29c72a6e4382d33779f7706719cb784ee4c4ef88:/lisp/progmodes/antlr-mode.el diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 25e3f7f003..742bcf726e 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1,11 +1,11 @@ ;;; antlr-mode.el --- major mode for ANTLR grammar files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -;; Free Software Foundation, Inc. -;; +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. + ;; Author: Christoph.Wedler@sap.com ;; Keywords: languages, ANTLR, code generator -;; Version: (see `antlr-version' below) +;; Version: 2.2c ;; X-URL: http://antlr-mode.sourceforge.net/ ;; This file is part of GNU Emacs. @@ -835,6 +835,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-default-face 'face-alias 'antlr-default) +(put 'antlr-font-lock-default-face 'obsolete-face "22.1") (defvar antlr-keyword-face 'antlr-keyword) (defface antlr-keyword @@ -846,6 +847,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-keyword-face 'face-alias 'antlr-keyword) +(put 'antlr-font-lock-keyword-face 'obsolete-face "22.1") (defvar antlr-syntax-face 'antlr-keyword) (defface antlr-syntax @@ -857,6 +859,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-syntax-face 'face-alias 'antlr-syntax) +(put 'antlr-font-lock-syntax-face 'obsolete-face "22.1") (defvar antlr-ruledef-face 'antlr-ruledef) (defface antlr-ruledef @@ -868,6 +871,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-ruledef-face 'face-alias 'antlr-ruledef) +(put 'antlr-font-lock-ruledef-face 'obsolete-face "22.1") (defvar antlr-tokendef-face 'antlr-tokendef) (defface antlr-tokendef @@ -879,6 +883,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-tokendef-face 'face-alias 'antlr-tokendef) +(put 'antlr-font-lock-tokendef-face 'obsolete-face "22.1") (defvar antlr-ruleref-face 'antlr-ruleref) (defface antlr-ruleref @@ -888,6 +893,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-ruleref-face 'face-alias 'antlr-ruleref) +(put 'antlr-font-lock-ruleref-face 'obsolete-face "22.1") (defvar antlr-tokenref-face 'antlr-tokenref) (defface antlr-tokenref @@ -897,6 +903,7 @@ Do not change." :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-tokenref-face 'face-alias 'antlr-tokenref) +(put 'antlr-font-lock-tokenref-face 'obsolete-face "22.1") (defvar antlr-literal-face 'antlr-literal) (defface antlr-literal @@ -910,6 +917,7 @@ It is used to highlight strings matched by the first regexp group of :group 'antlr) ;; backward-compatibility alias (put 'antlr-font-lock-literal-face 'face-alias 'antlr-literal) +(put 'antlr-font-lock-literal-face 'obsolete-face "22.1") (defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" "Regexp matching literals with special syntax highlighting, or nil. @@ -929,7 +937,7 @@ group. The string matched by the first group is highlighted with `((antlr-invalidate-context-cache) ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))" (1 antlr-tokendef-face)) - ("\\$\\sw+" (0 keyword-face)) + ("\\$\\sw+" (0 antlr-keyword-face)) ;; the tokens are already fontified as string/docstrings: (,(lambda (limit) (if antlr-font-lock-literal-regexp @@ -943,7 +951,7 @@ group. The string matched by the first group is highlighted with (3 antlr-keyword-face) (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser")) antlr-keyword-face - type-face))) + font-lock-type-face))) (,(lambda (limit) (antlr-re-search-forward "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>" @@ -1079,8 +1087,7 @@ Used for `antlr-slow-syntactic-context'.") ;; checkdoc-params: (dummies) "Invalidate context cache for syntactical context information." :XEMACS ; XEmacs bug workaround - (save-excursion - (set-buffer (get-buffer-create " ANTLR XEmacs bug workaround")) + (with-current-buffer (get-buffer-create " ANTLR XEmacs bug workaround") (buffer-syntactic-context-depth) nil) :EMACS @@ -2174,8 +2181,7 @@ export vocabulary specified in that file." "\\'")) classes dependencies) (unwind-protect - (save-excursion - (set-buffer temp-buffer) + (with-current-buffer temp-buffer (widen) ; just in case... (dolist (file grammar) (when (and (file-regular-p file) @@ -2512,7 +2518,7 @@ ANTLR's syntax and influences the auto indentation, see (let ((context (antlr-syntactic-context))) (not (and (numberp context) (or (zerop context) - (memq last-command-char '(?\{ ?\})))))))) + (memq last-command-event '(?\{ ?\})))))))) (self-insert-command (prefix-numeric-value arg)) (self-insert-command (prefix-numeric-value arg)) (antlr-indent-line)))