[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 4b4a375 043/405: Using lexical bindings for a
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 4b4a375 043/405: Using lexical bindings for all files |
Date: |
Sat, 13 Jul 2019 09:59:39 -0400 (EDT) |
branch: externals/phps-mode
commit 4b4a375072c32aff0c5149e7c83a841be42116bf
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Using lexical bindings for all files
---
phps-automation.el | 4 ++--
phps-flycheck.el | 2 +-
phps-flymake.el | 2 +-
phps-font-lock.el | 2 +-
phps-functions.el | 24 ++++++++++--------------
phps-lexer.el | 2 +-
phps-map.el | 2 +-
phps-mode.el | 2 +-
phps-semantic.el | 2 +-
phps-syntax-table.el | 2 +-
phps-tags.el | 2 +-
phps-test-functions.el | 2 +-
phps-test-lexer.el | 2 +-
phps-test-parser.el | 2 +-
phps-test.el | 2 +-
15 files changed, 25 insertions(+), 29 deletions(-)
diff --git a/phps-automation.el b/phps-automation.el
index 46687fc..cfbeb21 100644
--- a/phps-automation.el
+++ b/phps-automation.el
@@ -1,4 +1,4 @@
-;;; phps-automation --- Generate a Wisent Parser file
+;;; phps-automation --- Generate a Wisent Parser file -*- lexical-binding: t
-*-
;;; Commentary:
@@ -13,7 +13,7 @@
(add-to-list 'load-path (expand-file-name
"~/.emacs.d/emacs-wisent-grammar-converter/"))
-(require 'emacs-wisent-grammar-converter)
+(autoload 'emacs-wisent-grammar-converter/generate-grammar-from-filename
"emacs-wisent-grammar-converter")
(let ((php-yacc-url
"https://raw.githubusercontent.com/php/php-src/master/Zend/zend_language_parser.y")
(php-yacc-file (expand-file-name "zend_language_parser.y"))
diff --git a/phps-flycheck.el b/phps-flycheck.el
index f736662..b86c200 100644
--- a/phps-flycheck.el
+++ b/phps-flycheck.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-flycheck.el --- Flycheck support for PHP with Semantic
integration
+;;; phps-mode/phps-flycheck.el --- Flycheck support for PHP with Semantic
integration -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-flymake.el b/phps-flymake.el
index 05dddca..8e7992b 100644
--- a/phps-flymake.el
+++ b/phps-flymake.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-flymake.el --- Major mode for PHP with Semantic integration
+;;; phps-mode/phps-flymake.el --- Major mode for PHP with Semantic integration
-*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-font-lock.el b/phps-font-lock.el
index 7b23db9..d34941f 100644
--- a/phps-font-lock.el
+++ b/phps-font-lock.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-font-lock.el --- Font Lock for PHP Semantic
+;;; phps-mode/phps-font-lock.el --- Font Lock for PHP Semantic -*-
lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-functions.el b/phps-functions.el
index 9c67d3a..052405e 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-functions.el --- Mode functions for PHPs
+;;; phps-mode/phps-functions.el --- Mode functions for PHPs -*-
lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
@@ -46,20 +46,16 @@
(in-scripting (nth 0 start)))
;; Are we in scripting?
- (if in-scripting
- (let* ((indent-start (* (+ (nth 1 start) (nth 2 start)) tab-width))
- (indent-end (* (+ (nth 1 end) (nth 2 end)) tab-width))
- (indent-diff 0))
- (when (and (> indent-start indent-end)
- (looking-at-p "^[][ \t)(}{};]+\\($\\|?>\\)"))
- (setq indent-diff (- indent-start indent-end)))
- (setq indent-level (- indent-start indent-diff))
+ (when in-scripting
+ (let ((indent-start (* (+ (nth 1 start) (nth 2 start)) tab-width))
+ (indent-end (* (+ (nth 1 end) (nth 2 end)) tab-width))
+ (indent-diff 0))
+ (when (and (> indent-start indent-end)
+ (looking-at-p "^[][ \t)(}{};]+\\($\\|?>\\)"))
+ (setq indent-diff (- indent-start indent-end)))
+ (let ((indent-level (- indent-start indent-diff)))
(message "inside scripting, start: %s, end: %s, indenting to
column %s " start end indent-level)
- (indent-line-to indent-level))
- (progn
- ;; (message "Outside scripting %s" start)
- ;; (indent-relative)
- ))))))
+ (indent-line-to indent-level))))))))
(defun phps-mode/indent-region ()
"Indent region."
diff --git a/phps-lexer.el b/phps-lexer.el
index 2a2c9d1..c281b93 100644
--- a/phps-lexer.el
+++ b/phps-lexer.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-lexer.wy -- Lexer for PHP
+;;; phps-mode/phps-lexer.wy -- Lexer for PHP -*- lexical-binding: t -*-
;; Copyright (C) 2018 Free Software Foundation, Inc.
;;
diff --git a/phps-map.el b/phps-map.el
index e398e31..48fd26a 100644
--- a/phps-map.el
+++ b/phps-map.el
@@ -1,4 +1,4 @@
-;; phps-mode/phps-map.el --- Map for major mode
+;; phps-mode/phps-map.el --- Map for major mode -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-mode.el b/phps-mode.el
index 0d5c19d..d950c00 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -1,4 +1,4 @@
-;;; phps-mode.el --- Major mode for PHP with Semantic integration
+;;; phps-mode.el --- Major mode for PHP with Semantic integration -*-
lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-semantic.el b/phps-semantic.el
index 0840283..a7e4d1a 100644
--- a/phps-semantic.el
+++ b/phps-semantic.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-semantic.el --- Semantic functions for PHP
+;;; phps-mode/phps-semantic.el --- Semantic functions for PHP -*-
lexical-binding: t -*-
;; Copyright (C) 2017 Christian Johansson
diff --git a/phps-syntax-table.el b/phps-syntax-table.el
index b482143..6ca5812 100644
--- a/phps-syntax-table.el
+++ b/phps-syntax-table.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-syntax-table.el --- Major mode for PHP with Semantic
integration
+;;; phps-mode/phps-syntax-table.el --- Major mode for PHP with Semantic
integration -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-tags.el b/phps-tags.el
index 892d76d..3cb54a8 100644
--- a/phps-tags.el
+++ b/phps-tags.el
@@ -1,4 +1,4 @@
-;;; phps-mode/phps-tags.el --- PHP LALR parser for Emacs
+;;; phps-mode/phps-tags.el --- PHP LALR parser for Emacs -*- lexical-binding:
t -*-
;; Copyright (C) 2001-2006, 2009-2018 Free Software Foundation, Inc.
diff --git a/phps-test-functions.el b/phps-test-functions.el
index 003ea4d..d207c62 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -1,4 +1,4 @@
-;;; phps-test-functions.el --- Tests for functions
+;;; phps-test-functions.el --- Tests for functions -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-test-lexer.el b/phps-test-lexer.el
index aabd220..db5fb53 100644
--- a/phps-test-lexer.el
+++ b/phps-test-lexer.el
@@ -1,4 +1,4 @@
-;;; phps-test-lexer.el --- Tests for Semantic Lexer
+;;; phps-test-lexer.el --- Tests for Semantic Lexer -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-test-parser.el b/phps-test-parser.el
index ad873ba..1aab194 100644
--- a/phps-test-parser.el
+++ b/phps-test-parser.el
@@ -1,4 +1,4 @@
-;;; phps-test-parser.el --- Tests for Semantic parser
+;;; phps-test-parser.el --- Tests for Semantic parser -*- lexical-binding: t
-*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
diff --git a/phps-test.el b/phps-test.el
index 60b73b2..595fcf9 100644
--- a/phps-test.el
+++ b/phps-test.el
@@ -1,4 +1,4 @@
-;;; phps-test.el --- Commons for tests
+;;; phps-test.el --- Commons for tests -*- lexical-binding: t -*-
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
- [elpa] externals/phps-mode 1b891ea 031/405: More work on indentation and related tests, (continued)
- [elpa] externals/phps-mode 1b891ea 031/405: More work on indentation and related tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c6e5255 038/405: Merge branch 'master' of https://github.com/cjohansson/emacs-phps-mode, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3837d9c 001/405: My initial commit, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6776468 037/405: Started worked with adding references to tokens from point meta information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode feb5724 039/405: Various debug work, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e36d477 045/405: token-number from point now is the same format as (nth), Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b437374 040/405: Fixed bug in parsing of object parameters inside double quoted string, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7161184 041/405: Handles stacked states better, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c625217 042/405: Added flag for PSR-2 white-space settings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b629c4b 050/405: Updated comments and TODOs, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4b4a375 043/405: Using lexical bindings for all files,
Stefan Monnier <=
- [elpa] externals/phps-mode c040358 046/405: Point lexer token information makes more sense, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 94492c4 048/405: Added changes tracking to functions from lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode be46d9c 044/405: Added lexer autoload to functions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a259292 047/405: Changed indentation function to work solely on tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4098f46 049/405: Started with incremental lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode da1d1de 051/405: Temporary lexer after change until other work is ready, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 990d3dd 054/405: Added test for indentation of multiple-line doc comment, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dd80d27 055/405: Started work on detecting doc comment blocks, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e1b7160 053/405: (newline-and-indent) now working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8aa1ab6 059/405: Another test for getting point data inside doc block, Stefan Monnier, 2019/07/13