branch: externals/phps-mode commit f5c2072c9286548702a263a0c72842d87619d751 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Updated copyright for inclusion in ELPA --- README.md | 2 +- phps-mode-automation-header.wy | 27 ++++++++++----------------- phps-mode-automation.el | 19 +++++++++++++++++-- phps-mode-flycheck.el | 8 ++------ phps-mode-flymake.el | 10 ++++------ phps-mode-font-lock.el | 8 ++------ phps-mode-functions.el | 7 +++---- phps-mode-lexer.el | 9 +-------- phps-mode-map.el | 8 ++------ phps-mode-semantic.el | 7 ++----- phps-mode-syntax-table.el | 8 ++------ phps-mode-tags.el | 4 ++++ phps-mode-test-functions.el | 8 ++------ phps-mode-test-integration.el | 8 ++------ phps-mode-test-lexer.el | 8 ++------ phps-mode-test-parser.el | 8 ++------ phps-mode-test-syntax-table.el | 8 ++------ phps-mode-test.el | 7 ++----- phps-mode.el | 9 +++------ 19 files changed, 65 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 378f1bb..a5cce8b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PHPs - Experiment with a Semantic Mode for Emacs +# PHPs - Another Semantic Major-Mode for PHP in Emacs [](https://www.gnu.org/licenses/gpl-3.0.txt) [](https://travis-ci.org/cjohansson/emacs-phps-mode) diff --git a/phps-mode-automation-header.wy b/phps-mode-automation-header.wy index 86f574e..664fc31 100644 --- a/phps-mode-automation-header.wy +++ b/phps-mode-automation-header.wy @@ -1,31 +1,25 @@ ;;; phps.wy -- Semantic LALR grammar for PHP -;; Copyright (C) 2002-2018 Free Software Foundation, Inc. -;; -;; Author: Christian Johansson <christ...@cvj.se> -;; Maintainer: Christian Johansson <christ...@cvj.se> -;; Created: 11 Mar 2018 -;; Keywords: syntax +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. -;; 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 3 of the License, or -;; (at your option) any later version. +;; This program 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) any later version. -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run `wisent-make-parsers' or "C-c C-c" to generate grammar-file in Emacs Lisp. ;; ;; Based on the Zend PHP Parser YACC https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y @@ -37,7 +31,6 @@ ;;; Code: - %package phps-mode-tags %provide phps-mode-phps-wy diff --git a/phps-mode-automation.el b/phps-mode-automation.el index cfbeb21..2a31e55 100644 --- a/phps-mode-automation.el +++ b/phps-mode-automation.el @@ -1,9 +1,25 @@ ;;; phps-automation --- Generate a Wisent Parser file -*- lexical-binding: t -*- +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. -;;; Commentary: +;; This file is not part of GNU Emacs. + +;; This program 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) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. +;;; Commentary: + ;;; Uses a parser to convert LALR Yacc grammar to Wisent grammar ;;; AST should be like this: (root (block (rule (logic)))) @@ -11,7 +27,6 @@ ;;; Code: - (add-to-list 'load-path (expand-file-name "~/.emacs.d/emacs-wisent-grammar-converter/")) (autoload 'emacs-wisent-grammar-converter/generate-grammar-from-filename "emacs-wisent-grammar-converter") diff --git a/phps-mode-flycheck.el b/phps-mode-flycheck.el index 315ad23..8216a46 100644 --- a/phps-mode-flycheck.el +++ b/phps-mode-flycheck.el @@ -1,6 +1,6 @@ ;;; phps-mode-flycheck.el --- Flycheck support for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018-2019 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Please see README.md from the same repository for extended documentation. ;;; Code: - (defun phps-mode-flycheck-init () "Add flycheck support for phps-mode." diff --git a/phps-mode-flymake.el b/phps-mode-flymake.el index 4045ed8..ead108d 100644 --- a/phps-mode-flymake.el +++ b/phps-mode-flymake.el @@ -1,6 +1,6 @@ ;;; phps-mode-flymake.el --- Flymake support for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,22 +15,20 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Please see README.md from the same repository for extended documentation. ;;; Code: - (require 'flymake) +;; TODO Implement this + (defun phps-mode-flymake-init () "PHP specific init-cleanup routines. diff --git a/phps-mode-font-lock.el b/phps-mode-font-lock.el index 9127546..59e0574 100644 --- a/phps-mode-font-lock.el +++ b/phps-mode-font-lock.el @@ -1,6 +1,6 @@ ;;; phps-mode-font-lock.el --- Font Lock for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Please see README.md from the same repository for extended documentation. ;;; Code: - (defun phps-mode-font-lock-init () "Apply font-lock." diff --git a/phps-mode-functions.el b/phps-mode-functions.el index 2e5160e..79df173 100644 --- a/phps-mode-functions.el +++ b/phps-mode-functions.el @@ -1,6 +1,6 @@ ;;; phps-mode-functions.el --- Mode functions for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018-2019 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,9 +15,8 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + ;;; Commentary: diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el index c3f0eb1..46161c5 100644 --- a/phps-mode-lexer.el +++ b/phps-mode-lexer.el @@ -1,11 +1,6 @@ ;;; phps-mode-lexer.el -- Lexer for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018 Free Software Foundation, Inc. -;; -;; Author: Christian Johansson <christ...@cvj.se> -;; Maintainer: Christian Johansson <christ...@cvj.se> -;; Created: 11 Mar 2018 -;; Keywords: syntax +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -25,7 +20,6 @@ ;;; Commentary: - ;; Based on the Zend PHP Lexer and Parser https://github.com/php/php-src/blob/master/Zend/zend_language_scanner.l ;; which is using re2c. ;; @@ -35,7 +29,6 @@ ;;; Code: - (autoload 'phps-mode-functions-get-buffer-changes-start "phps-mode-functions") (autoload 'phps-mode-functions-reset-buffer-changes-start "phps-mode-functions") diff --git a/phps-mode-map.el b/phps-mode-map.el index a87ff78..230e091 100644 --- a/phps-mode-map.el +++ b/phps-mode-map.el @@ -1,6 +1,6 @@ ;; phps-mode-map.el --- Map for PHPs -*- lexical-binding:t -*- -;; Copyright (C) 2018-2019 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Please see README.md from the same repository for extended documentation. ;;; Code: - ;; NOTE This variable will be created automatically (defvar phps-mode-map nil "Key-map for major mode.") diff --git a/phps-mode-semantic.el b/phps-mode-semantic.el index 95e6e21..25a0eb5 100644 --- a/phps-mode-semantic.el +++ b/phps-mode-semantic.el @@ -1,6 +1,6 @@ ;;; phps-mode-semantic.el --- Semantic for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,9 +15,7 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: @@ -25,7 +23,6 @@ ;;; Code: - (require 'semantic) (require 'semantic/ctxt) (require 'semantic/doc) diff --git a/phps-mode-syntax-table.el b/phps-mode-syntax-table.el index f278f20..636c71c 100644 --- a/phps-mode-syntax-table.el +++ b/phps-mode-syntax-table.el @@ -1,6 +1,6 @@ ;;; phps-mode-syntax-table.el --- Syntax table for PHPs -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Please see README.md from the same repository for extended documentation. ;;; Code: - (defvar phps-mode-syntax-table (let ((phps-mode-syntax-table (make-syntax-table))) diff --git a/phps-mode-tags.el b/phps-mode-tags.el index 6024015..9e13cf0 100644 --- a/phps-mode-tags.el +++ b/phps-mode-tags.el @@ -1,5 +1,7 @@ ;;; phps-mode-tags.el --- PHP LALR parser for Emacs -*- lexical-binding: t -*- +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. + ;; This file is not part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify @@ -15,10 +17,12 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. + ;;; Commentary: ;; TODO Make similar to /Users/christianjohansson/Documents/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/semantic/wisent/java-tags.el.gz + ;;; Code: (require 'semantic/wisent) diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el index 31a29c0..8a3b771 100644 --- a/phps-mode-test-functions.el +++ b/phps-mode-test-functions.el @@ -1,6 +1,6 @@ ;;; phps-mode-test-functions.el --- Tests for functions -*- lexical-binding: t -*- -;; Copyright (C) 2018-2019 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run from terminal make functions-test ;;; Code: - (autoload 'phps-mode-test-with-buffer "phps-mode-test") (autoload 'phps-mode-functions-verbose "phps-mode-functions") (autoload 'phps-mode-functions-indent-line "phps-mode-functions") diff --git a/phps-mode-test-integration.el b/phps-mode-test-integration.el index 27a3981..f8cbc16 100644 --- a/phps-mode-test-integration.el +++ b/phps-mode-test-integration.el @@ -1,6 +1,6 @@ ;;; phps-mode-test-integration.el --- Tests for integration -*- lexical-binding: t -*- -;; Copyright (C) 2019 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run from terminal make test-integration ;;; Code: - (autoload 'phps-mode-test-with-buffer "phps-mode-test") (autoload 'phps-mode-test-incremental-vs-intial-buffer "phps-mode-test") (autoload 'phps-mode-functions-get-lines-indent "phps-mode-functions") diff --git a/phps-mode-test-lexer.el b/phps-mode-test-lexer.el index bc34a72..dd83226 100644 --- a/phps-mode-test-lexer.el +++ b/phps-mode-test-lexer.el @@ -1,6 +1,6 @@ ;;; phps-mode-test-lexer.el --- Tests for lexer -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run from terminal make lexer-test ;;; Code: - (autoload 'phps-mode-test-with-buffer "phps-mode-test") (autoload 'phps-mode-lexer-init "phps-mode-lexer") (autoload 'phps-mode-lexer-get-point-data "phps-mode-lexer") diff --git a/phps-mode-test-parser.el b/phps-mode-test-parser.el index 13dfb1e..01c4dbf 100644 --- a/phps-mode-test-parser.el +++ b/phps-mode-test-parser.el @@ -1,6 +1,6 @@ ;;; phps-mode-test-parser.el --- Tests for parser -*- lexical-binding: t -*- -;; Copyright (C) 2018 Christian Johansson +;; Copyright (C) 2017-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run from terminal make test-parser ;;; Code: - (defun phps-mode-test-parser() "Run test for lexer." ;; (message "-- Running all tests for parser... --\n") diff --git a/phps-mode-test-syntax-table.el b/phps-mode-test-syntax-table.el index f274d58..76a8207 100644 --- a/phps-mode-test-syntax-table.el +++ b/phps-mode-test-syntax-table.el @@ -1,6 +1,6 @@ ;;; phps-mode-test-syntax-table.el --- Tests for syntax-table -*- lexical-binding: t -*- -;; Copyright (C) 2019 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,20 +15,16 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: - ;; Run from terminal make functions-test ;;; Code: - (autoload 'phps-mode-test-with-buffer "phps-mode-test") (autoload 'phps-mode-functions-verbose "phps-mode-functions") (autoload 'phps-mode-functions-indent-line "phps-mode-functions") diff --git a/phps-mode-test.el b/phps-mode-test.el index 57da431..3289877 100644 --- a/phps-mode-test.el +++ b/phps-mode-test.el @@ -1,6 +1,6 @@ ;;; phps-mode-test.el --- Commons for tests -*- lexical-binding: t -*- -;; Copyright (C) 2018-2019 Christian Johansson +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. ;; This file is not part of GNU Emacs. @@ -15,9 +15,7 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: @@ -25,7 +23,6 @@ ;;; Code: - (autoload 'phps-mode "phps-mode") (autoload 'phps-mode-lexer-get-tokens "phps-mode-lexer") (autoload 'phps-mode-functions-get-imenu "phps-mode-functions") diff --git a/phps-mode.el b/phps-mode.el index adfd681..fcfc9be 100644 --- a/phps-mode.el +++ b/phps-mode.el @@ -1,5 +1,7 @@ ;;; phps-mode.el --- Major mode for PHP with Semantic integration -*- lexical-binding: t -*- +;; Copyright (C) 2018-2019 Free Software Foundation, Inc. + ;; Author: Christian Johansson <github.com/cjohansson> ;; Maintainer: Christian Johansson <github.com/cjohansson> ;; Created: 3 Mar 2018 @@ -10,8 +12,6 @@ ;; Package-Requires: ((emacs "26")) -;; Copyright (C) 2018-2019 Christian Johansson - ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or @@ -25,9 +25,7 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. ;;; Commentary: @@ -39,7 +37,6 @@ ;;; Code: - (autoload 'phps-mode-flycheck-init "phps-mode-flycheck") (autoload 'phps-mode-flymake-init "phps-mode-flymake") (autoload 'phps-mode-font-lock-init "phps-mode-font-lock")