update packages
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
;; Keywords: php languages convenience align
|
||||
;; Homepage: https://github.com/emacs-php/php-mode
|
||||
;; Version: 1.23.0
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
;; Version: 1.23.0
|
||||
;; Keywords: faces, php
|
||||
;; Homepage: https://github.com/emacs-php/php-mode
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
||||
39
lisp/php-mode/php-local-manual.el
Normal file
39
lisp/php-mode/php-local-manual.el
Normal file
@@ -0,0 +1,39 @@
|
||||
;;; php-local-manual.el --- Tools for local PHP manual -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2020 Friends of Emacs-PHP development
|
||||
|
||||
;; Author: Eric James Michael Ritz
|
||||
;; Maintainer: USAMI Kenta <tadsan@zonu.me>
|
||||
;; URL: https://github.com/emacs-php/php-mode
|
||||
;; Keywords: docs, php
|
||||
;; Version: 2.0.0
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; 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 3 of the License, 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This package helps you search the locally installed PHP Manual.
|
||||
;; If you're only developing online, this feature is probably unnecessary.
|
||||
|
||||
;;; Code:
|
||||
(require 'php-mode)
|
||||
|
||||
(defalias 'php-local-manual-search #'php-search-local-documentation)
|
||||
|
||||
;; TODO: move implementation
|
||||
;; (define-obsolete-function-alias 'php-search-local-documentation #'php-local-manual-search)
|
||||
|
||||
(provide 'php-local-manual)
|
||||
;;; php-local-manual.el ends here
|
||||
@@ -6,7 +6,6 @@
|
||||
;; URL: https://github.com/emacs-php/php-mode
|
||||
;; Keywords: maint
|
||||
;; Version: 1.23.0
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
(define-package "php-mode" "20200507.1755" "Major mode for editing PHP code"
|
||||
(define-package "php-mode" "20210103.1738" "Major mode for editing PHP code"
|
||||
'((emacs "24.3"))
|
||||
:commit "80e3f3888605e1c5821ab4391bd7342c674550a0" :keywords
|
||||
'("languages" "php")
|
||||
:authors
|
||||
:commit "8cdc727e6d4eef81655b90574784e9540f407cda" :authors
|
||||
'(("Eric James Michael Ritz"))
|
||||
:maintainer
|
||||
'("USAMI Kenta" . "tadsan@zonu.me")
|
||||
:keywords
|
||||
'("languages" "php")
|
||||
:url "https://github.com/emacs-php/php-mode")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
|
||||
@@ -318,6 +318,9 @@ In that case set to `NIL'."
|
||||
:tag "PHP Mode Enable Project Local Variable"
|
||||
:type 'boolean)
|
||||
|
||||
(defconst php-mode-cc-vertion
|
||||
(eval-when-compile c-version))
|
||||
|
||||
(defun php-mode-version ()
|
||||
"Display string describing the version of PHP Mode."
|
||||
(interactive)
|
||||
@@ -472,7 +475,7 @@ In that case set to `NIL'."
|
||||
|
||||
(c-lang-defconst c-primitive-type-kwds
|
||||
php '("int" "integer" "bool" "boolean" "float" "double" "real"
|
||||
"string" "object" "void"))
|
||||
"string" "object" "void" "mixed"))
|
||||
|
||||
(c-lang-defconst c-class-decl-kwds
|
||||
"Keywords introducing declarations where the following block (if any)
|
||||
@@ -519,6 +522,9 @@ PHP does not have an \"enum\"-like keyword."
|
||||
(c-lang-defconst c-lambda-kwds
|
||||
php '("function" "use"))
|
||||
|
||||
(c-lang-defconst c-inexpr-block-kwds
|
||||
php '("match"))
|
||||
|
||||
(c-lang-defconst c-other-block-decl-kwds
|
||||
php '("namespace"))
|
||||
|
||||
@@ -643,6 +649,23 @@ but only if the setting is enabled"
|
||||
(beginning-of-line)
|
||||
(if (looking-at-p "\\s-*->") '+ nil))))
|
||||
|
||||
(defun php-c-looking-at-or-maybe-in-bracelist (&optional containing-sexp lim)
|
||||
"Replace `c-looking-at-or-maybe-in-bracelist'.
|
||||
|
||||
CONTAINING-SEXP is the position of the brace/paren/bracket enclosing
|
||||
POINT, or nil if there is no such position, or we do not know it. LIM is
|
||||
a backward search limit."
|
||||
(cond
|
||||
((looking-at-p "{")
|
||||
(save-excursion
|
||||
(c-backward-token-2 2 t lim)
|
||||
;; PHP 8.0 match expression
|
||||
;; echo match ($var) |{
|
||||
;; ↑ matches ↑ initial position
|
||||
(when (looking-at-p (eval-when-compile (rx symbol-start "match" symbol-end)))
|
||||
(cons (point) t))))
|
||||
(t nil)))
|
||||
|
||||
(c-add-style
|
||||
"php"
|
||||
`((c-basic-offset . 4)
|
||||
@@ -1111,6 +1134,13 @@ After setting the stylevars run hooks according to STYLENAME
|
||||
:syntax-table php-mode-syntax-table
|
||||
;; :after-hook (c-update-modeline)
|
||||
;; (setq abbrev-mode t)
|
||||
|
||||
(unless (string= php-mode-cc-vertion c-version)
|
||||
(user-error "CC Mode has been updated. %s"
|
||||
(if (package-installed-p 'php-mode)
|
||||
"Please run `M-x package-reinstall php-mode' command."
|
||||
"Please byte recompile PHP Mode files.")))
|
||||
|
||||
(when php-mode-disable-c-mode-hook
|
||||
(setq-local c-mode-hook nil)
|
||||
(setq-local java-mode-hook nil))
|
||||
@@ -1186,6 +1216,10 @@ After setting the stylevars run hooks according to STYLENAME
|
||||
(setq-local add-log-current-defun-function nil)
|
||||
(setq-local add-log-current-defun-header-regexp php-beginning-of-defun-regexp)
|
||||
|
||||
(when (fboundp 'c-looking-at-or-maybe-in-bracelist)
|
||||
(advice-add #'c-looking-at-or-maybe-in-bracelist
|
||||
:override 'php-c-looking-at-or-maybe-in-bracelist))
|
||||
|
||||
(when (>= emacs-major-version 25)
|
||||
(with-silent-modifications
|
||||
(save-excursion
|
||||
@@ -1518,7 +1552,7 @@ a completion list."
|
||||
("\\<\\(const\\)\\s-+\\(\\_<.+?\\_>\\)" (1 'php-keyword) (2 'php-constant-assign))
|
||||
|
||||
;; Logical operator (!)
|
||||
("\\(![^=]\\)" 1 'php-logical-op)
|
||||
("\\(!\\)[^=]" 1 'php-logical-op)
|
||||
|
||||
;; Highlight special variables
|
||||
("\\(\\$\\)\\(this\\)\\>" (1 'php-$this-sigil) (2 'php-$this))
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
;; Keywords: tools, files
|
||||
;; URL: https://github.com/emacs-php/php-mode
|
||||
;; Version: 1.23.0
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
;; Version: 1.23.0
|
||||
;; Keywords: languages, php
|
||||
;; Homepage: https://github.com/emacs-php/php-mode
|
||||
;; Package-Requires: ((emacs "24.3"))
|
||||
;; License: GPL-3.0-or-later
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
||||
Reference in New Issue
Block a user