diff options
author | meta <meta@FreeBSD.org> | 2019-10-28 08:15:51 +0800 |
---|---|---|
committer | meta <meta@FreeBSD.org> | 2019-10-28 08:15:51 +0800 |
commit | 8204f03c58fd4a24b02390eee6fc5386f9ef275c (patch) | |
tree | f5c25a75046ef781b472e5aa401a194964bc477b /lang | |
parent | 088c39477f11b7993607d57df551bec322babf8f (diff) | |
download | freebsd-ports-gnome-8204f03c58fd4a24b02390eee6fc5386f9ef275c.tar.gz freebsd-ports-gnome-8204f03c58fd4a24b02390eee6fc5386f9ef275c.tar.zst freebsd-ports-gnome-8204f03c58fd4a24b02390eee6fc5386f9ef275c.zip |
lang/php-mode.el: backport from upstream to fix error with recent snapshot of Emacs
PR: 241189
Submitted by: Yasuhiro KIMURA <yasu@utahime.org> (maintainer)
Obtained from: https://github.com/emacs-php/php-mode/pull/580
Diffstat (limited to 'lang')
-rw-r--r-- | lang/php-mode.el/Makefile | 5 | ||||
-rw-r--r-- | lang/php-mode.el/files/patch-75d3ee1ead7557175e6aeb2ad8efdd73ee3c9332 | 61 |
2 files changed, 62 insertions, 4 deletions
diff --git a/lang/php-mode.el/Makefile b/lang/php-mode.el/Makefile index 9bc4bdd844ae..67a7dccaf9e0 100644 --- a/lang/php-mode.el/Makefile +++ b/lang/php-mode.el/Makefile @@ -4,6 +4,7 @@ PORTNAME= php-mode.el PORTVERSION= 1.22.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= lang elisp PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} @@ -12,10 +13,6 @@ COMMENT= PHP mode for GNU Emacs LICENSE= GPLv3 -.if ${FLAVOR:U} == devel_full || ${FLAVOR:U} == devel_nox -BROKEN= php.el:232:10:Error: Symbol's function definition is void: rx-form -.endif - USES= emacs gmake USE_GITHUB= yes GH_ACCOUNT= emacs-php diff --git a/lang/php-mode.el/files/patch-75d3ee1ead7557175e6aeb2ad8efdd73ee3c9332 b/lang/php-mode.el/files/patch-75d3ee1ead7557175e6aeb2ad8efdd73ee3c9332 new file mode 100644 index 000000000000..d79f7697d143 --- /dev/null +++ b/lang/php-mode.el/files/patch-75d3ee1ead7557175e6aeb2ad8efdd73ee3c9332 @@ -0,0 +1,61 @@ +From 75d3ee1ead7557175e6aeb2ad8efdd73ee3c9332 Mon Sep 17 00:00:00 2001 +From: Charlie McMackin <charliemac@gmail.com> +Date: Sun, 29 Sep 2019 11:52:54 -0500 +Subject: [PATCH] Replace rx-form with rx-to-string + +`rx-form` is being removed in an upcoming version of Emacs and its rewrite of +`rx`. Replacing it with `rx-to-string` is backwards and future compatible. +--- + php.el | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git php.el php.el +index 64286da..ea36fc3 100644 +--- php.el ++++ php.el +@@ -177,24 +177,24 @@ keywords that can appear in method signatures, e.g. 'final' and + which will be the name of the method." + (when (stringp visibility) + (setq visibility (list visibility))) +- (rx-form `(: line-start +- (* (syntax whitespace)) +- ,@(if visibility +- `((* (or "abstract" "final" "static") +- (+ (syntax whitespace))) +- (or ,@visibility) +- (+ (syntax whitespace)) +- (* (or "abstract" "final" "static") +- (+ (syntax whitespace)))) +- '((* (* (or "abstract" "final" "static" +- "private" "protected" "public") +- (+ (syntax whitespace)))))) +- "function" +- (+ (syntax whitespace)) +- (? "&" (* (syntax whitespace))) +- (group (+ (or (syntax word) (syntax symbol)))) +- (* (syntax whitespace)) +- "("))) ++ (rx-to-string `(: line-start ++ (* (syntax whitespace)) ++ ,@(if visibility ++ `((* (or "abstract" "final" "static") ++ (+ (syntax whitespace))) ++ (or ,@visibility) ++ (+ (syntax whitespace)) ++ (* (or "abstract" "final" "static") ++ (+ (syntax whitespace)))) ++ '((* (* (or "abstract" "final" "static" ++ "private" "protected" "public") ++ (+ (syntax whitespace)))))) ++ "function" ++ (+ (syntax whitespace)) ++ (? "&" (* (syntax whitespace))) ++ (group (+ (or (syntax word) (syntax symbol)))) ++ (* (syntax whitespace)) ++ "("))) + + (defun php-create-regexp-for-classlike (type) + "Accepts a `TYPE' of a 'classlike' object as a string, such as +-- +2.23.0 + |