From 239b5577f9076c9089a03c5743c5b7b2c180a036 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 2 Jan 2023 02:31:59 +0900 Subject: [PATCH 1/3] Remove 'link face to http addresses in PHPDoc --- lisp/php-mode.el | 2 -- tests/7.4/arrow-function.php.faces | 8 ++------ tests/issue-136.php.faces | 4 +--- tests/issue-197.php.faces | 4 +--- tests/issue-201.php.faces | 4 +--- tests/issue-305.php.faces | 4 +--- tests/issue-439.php.faces | 4 +--- tests/issue-443.php.27.faces | 4 +--- tests/issue-443.php.faces | 4 +--- tests/lang/doc-comment/comments.php.24.faces | 4 +--- tests/lang/doc-comment/comments.php.27.faces | 4 +--- tests/lang/doc-comment/comments.php.faces | 4 +--- tests/lang/doc-comment/issue-8.php.faces | 4 +--- tests/lang/doc-comment/return-type.php.faces | 4 +--- 14 files changed, 14 insertions(+), 44 deletions(-) diff --git a/lisp/php-mode.el b/lisp/php-mode.el index b6130ded..d55b8653 100644 --- a/lisp/php-mode.el +++ b/lisp/php-mode.el @@ -1371,8 +1371,6 @@ for \\[find-tag] (which see)." (regexp-opt php-phpdoc-type-names 'words) "\\)") 1 font-lock-type-face prepend nil) - ("https?://[^\n\t ]+" - 0 'link prepend nil) ("^\\(?:/\\*\\)?\\(?:\\s \\|\\*\\)*\\(@[[:alpha:]][-[:alpha:]\\]*\\)" ; "@foo ..." markup. 1 'php-doc-annotation-tag prepend nil))) diff --git a/tests/7.4/arrow-function.php.faces b/tests/7.4/arrow-function.php.faces index acfcbc5d..a944ea2c 100644 --- a/tests/7.4/arrow-function.php.faces +++ b/tests/7.4/arrow-function.php.faces @@ -1,13 +1,9 @@ ;; -*- mode: emacs-lisp -*- (("\n * " . font-lock-doc-face) ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) + (" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face) ("@package" php-doc-annotation-tag font-lock-doc-face) (" " . font-lock-doc-face) ("Emacs\\PHPMode" php-string font-lock-doc-face) diff --git a/tests/issue-197.php.faces b/tests/issue-197.php.faces index cd223c5b..94f2abef 100644 --- a/tests/issue-197.php.faces +++ b/tests/issue-197.php.faces @@ -1,9 +1,7 @@ ;; -*- mode: emacs-lisp -*- (("" . php-php-tag) ("\n") - ("/** GitHub Issue: " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face) - (" */" . font-lock-doc-face) + ("/** GitHub Issue: https://github.com/emacs-php/php-mode/issues/443 */" . font-lock-doc-face) ("\n") ("" . php-php-tag) ("\n") - ("/** GitHub Issue: " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face) - (" */" . font-lock-doc-face) + ("/** GitHub Issue: https://github.com/emacs-php/php-mode/issues/443 */" . font-lock-doc-face) ("\n") ("\n * " . font-lock-doc-face) ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) + (" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face) ("@package" php-doc-annotation-tag font-lock-doc-face) (" " . font-lock-doc-face) ("Emacs\\PHPMode" php-string font-lock-doc-face) diff --git a/tests/lang/doc-comment/comments.php.27.faces b/tests/lang/doc-comment/comments.php.27.faces index e48028c8..b659a0ab 100644 --- a/tests/lang/doc-comment/comments.php.27.faces +++ b/tests/lang/doc-comment/comments.php.27.faces @@ -11,9 +11,7 @@ ("@author" php-doc-annotation-tag font-lock-doc-face) (" USAMI Kenta \n * " . font-lock-doc-face) ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) + (" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face) ("@package" php-doc-annotation-tag font-lock-doc-face) (" " . font-lock-doc-face) ("Emacs\\PHPMode" php-string font-lock-doc-face) diff --git a/tests/lang/doc-comment/comments.php.faces b/tests/lang/doc-comment/comments.php.faces index e6748c07..c8491911 100644 --- a/tests/lang/doc-comment/comments.php.faces +++ b/tests/lang/doc-comment/comments.php.faces @@ -11,9 +11,7 @@ ("@author" php-doc-annotation-tag font-lock-doc-face) (" USAMI Kenta \n * " . font-lock-doc-face) ("@link" php-doc-annotation-tag font-lock-doc-face) - (" " . font-lock-doc-face) - ("https://github.com/emacs-php/php-mode" link font-lock-doc-face) - ("\n * " . font-lock-doc-face) + (" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face) ("@package" php-doc-annotation-tag font-lock-doc-face) (" " . font-lock-doc-face) ("Emacs\\PHPMode" php-string font-lock-doc-face) diff --git a/tests/lang/doc-comment/issue-8.php.faces b/tests/lang/doc-comment/issue-8.php.faces index 82ce4723..5a107591 100644 --- a/tests/lang/doc-comment/issue-8.php.faces +++ b/tests/lang/doc-comment/issue-8.php.faces @@ -1,9 +1,7 @@ ;; -*- mode: emacs-lisp -*- ((" Date: Mon, 2 Jan 2023 02:36:21 +0900 Subject: [PATCH 2/3] GitHub Actions: use Python 3.11 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6432169b..812bb683 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/setup-python@v2 with: - python-version: '3.6' + python-version: '3.11' architecture: 'x64' - uses: purcell/setup-emacs@master with: From 41acf76a2779cbdc4f46bf31fae198424d7f380c Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 2 Jan 2023 02:51:17 +0900 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46645760..c2856de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - +## Unreleased + +### Removed + + * No longer highlights `'link` in PHPDoc ([#724]) + * Please use `goto-address-prog-mode` minor mode + +[#724]: https://github.com/emacs-php/php-mode/pull/724 ## [1.24.2] - 2022-11-13