X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/034babe1e173ce643c6a419db156916e792c0ebd..cdf71ff2ef86e20d8892da4a938a93e1a0c5377b:/lisp/progmodes/antlr-mode.el diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 0415aa910d..594b628ad4 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1,6 +1,6 @@ ;;; antlr-mode.el --- major mode for ANTLR grammar files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 ;; Free Software Foundation, Inc. ;; ;; Author: Christoph.Wedler@sap.com @@ -12,7 +12,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -319,7 +319,7 @@ function and REGEXP is a regular expression. If `antlr-language' equals to a MODE, the line starting at the first non-whitespace is matched by the corresponding REGEXP, and the line is -part of an header action, indent the line at column 0 instead according +part of a header action, indent the line at column 0 instead according to the normal rules of `antlr-indent-line'." :group 'antlr :type '(repeat (cons (function :tag "Major mode") regexp))) @@ -568,7 +568,7 @@ The standard value contains the following functions as READ-FN: general value, or `antlr-read-boolean' with ARGs = \(PROMPT TABLE) which reads a boolean value or a member of TABLE. PROMPT is the prompt when asking for a new value. If non-nil, TABLE is a table for completion or -a function evaluating to such a table. The return value is quoted iff +a function evaluating to such a table. The return value is quoted if AS-STRING is non-nil and is either t or a symbol which is a member of `antlr-options-style'.") @@ -829,7 +829,7 @@ in the grammar's actions and semantic predicates, see `antlr-font-lock-maximum-decoration'.") (defvar antlr-default-face 'antlr-default) -(defface antlr-default +(defface antlr-default '((t nil)) "Face to prevent strings from language dependent highlighting. Do not change." :group 'antlr) @@ -925,7 +925,7 @@ group. The string matched by the first group is highlighted with ("\\$\\sw+" (0 keyword-face)) ;; the tokens are already fontified as string/docstrings: (,(lambda (limit) - (if antlr-literal-regexp + (if antlr-font-lock-literal-regexp (antlr-re-search-forward antlr-font-lock-literal-regexp limit))) (1 antlr-literal-face t) :XEMACS (0 nil)) ; XEmacs bug workaround @@ -1659,7 +1659,7 @@ Return \(LEVEL OPTION LOCATION)." :active active)) (sort (mapcar 'car (elt antlr-options-alists (1- level))) 'string-lessp)))) - + ;;;=========================================================================== ;;; Insert option: determine section-kind @@ -1936,7 +1936,7 @@ For OLD, see `antlr-insert-option-do'." ;; stuff (no =, {, } or /) at point is not followed by ";" (insert ";") (backward-char))) - + (defun antlr-insert-option-space (area old) "Find appropriate place to insert option, insert newlines/spaces. For AREA and OLD, see `antlr-insert-option-do'." @@ -1956,7 +1956,7 @@ For AREA and OLD, see `antlr-insert-option-do'." (setq orig (point)) (goto-char orig))) (skip-chars-forward " \t") - + (if (looking-at "$\\|//") ;; just comment after point => skip (+ lines w/ same col comment) (let ((same (if (> (match-end 0) (match-beginning 0)) @@ -2203,8 +2203,8 @@ part SUPER in the result of `antlr-file-dependencies'. CLASSES is the part \(CLASS-SPEC ...) in the result of `antlr-directory-dependencies'. The result looks like \(OPTION WITH-UNKNOWN GLIB ...). OPTION is the -complete \"-glib\" option. WITH-UNKNOWN has value t iff there is none -or more than one grammar file for at least one super grammar. +complete \"-glib\" option. WITH-UNKNOWN is t if there is none or more +than one grammar file for at least one super grammar. Each GLIB looks like \(GRAMMAR-FILE \. EVOCAB). GRAMMAR-FILE is a file in which a super-grammar is defined. EVOCAB is the value of the export @@ -2241,9 +2241,8 @@ called interactively, the buffers are always saved, see also variable (interactive (antlr-run-tool-interactive)) (or saved (save-some-buffers (not antlr-ask-about-save))) (let ((default-directory (file-name-directory file))) - (require 'compile) ; only `compile' autoload - (compile-internal (concat command " " (file-name-nondirectory file)) - "No more errors" "Antlr-Run"))) + (compilation-start (concat command " " (file-name-nondirectory file)) + nil #'(lambda (mode-name) "*Antlr-Run*")))) (defun antlr-run-tool-interactive () ;; code in `interactive' is not compiled