Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'link face in PHPDoc #724

Merged
merged 3 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
## 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

Expand Down
2 changes: 0 additions & 2 deletions lisp/php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down
8 changes: 2 additions & 6 deletions tests/7.4/arrow-function.php.faces
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * GitHub-Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/506" link font-lock-doc-face)
("\n *\n * " . font-lock-doc-face)
("/**\n * GitHub-Issue: https://github.com/emacs-php/php-mode/issues/506\n *\n * " . font-lock-doc-face)
("@see" php-doc-annotation-tag font-lock-doc-face)
(" " . font-lock-doc-face)
("https://wiki.php.net/rfc/arrow_functions_v2" link font-lock-doc-face)
("\n */" . font-lock-doc-face)
(" https://wiki.php.net/rfc/arrow_functions_v2\n */" . font-lock-doc-face)
("\n\n")
("$" . php-variable-sigil)
("fn1" . php-variable-name)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-136.php.faces
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
("@author" php-doc-annotation-tag font-lock-doc-face)
(" USAMI Kenta <tadsan@pixiv.com>\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)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-197.php.faces
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * GitHub Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/197" link font-lock-doc-face)
("\n *\n * Test that member highlighting goes before highlighting of cc-mode\n * types\n */" . font-lock-doc-face)
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/197\n *\n * Test that member highlighting goes before highlighting of cc-mode\n * types\n */" . font-lock-doc-face)
("\n")
("$" . php-variable-sigil)
("test" . php-variable-name)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-201.php.faces
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * GitHub Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/201" link font-lock-doc-face)
("\n *\n * Test highighting of " . font-lock-doc-face)
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/201\n *\n * Test highighting of " . font-lock-doc-face)
("$" php-doc-$this-sigil php-doc-variable-sigil font-lock-doc-face)
("this" php-doc-$this php-variable-name font-lock-doc-face)
("\n */" . font-lock-doc-face)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-305.php.faces
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * GitHub Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/305" link font-lock-doc-face)
("\n *\n * Test highighting of " . font-lock-doc-face)
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/305\n *\n * Test highighting of " . font-lock-doc-face)
("$" php-doc-variable-sigil font-lock-doc-face)
("this_foo" php-variable-name font-lock-doc-face)
(", " . font-lock-doc-face)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-439.php.faces
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * GitHub Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/439" link font-lock-doc-face)
("\n */" . font-lock-doc-face)
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/439\n */" . font-lock-doc-face)
("\n\n")
("$" . php-variable-sigil)
("a" . php-variable-name)
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-443.php.27.faces
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
("1); ")
("?>" . 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")
("<?xml" . php-php-tag)
(" version")
Expand Down
4 changes: 1 addition & 3 deletions tests/issue-443.php.faces
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
("1); ")
("?>" . 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")
("<?xml" . php-php-tag)
(" version")
Expand Down
4 changes: 1 addition & 3 deletions tests/lang/doc-comment/comments.php.24.faces
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
("@author" php-doc-annotation-tag font-lock-doc-face)
(" USAMI Kenta <tadsan@pixiv.com>\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)
Expand Down
4 changes: 1 addition & 3 deletions tests/lang/doc-comment/comments.php.27.faces
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
("@author" php-doc-annotation-tag font-lock-doc-face)
(" USAMI Kenta <tadsan@pixiv.com>\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)
Expand Down
4 changes: 1 addition & 3 deletions tests/lang/doc-comment/comments.php.faces
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
("@author" php-doc-annotation-tag font-lock-doc-face)
(" USAMI Kenta <tadsan@pixiv.com>\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)
Expand Down
4 changes: 1 addition & 3 deletions tests/lang/doc-comment/issue-8.php.faces
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
;; -*- mode: emacs-lisp -*-
(("<?php" . php-php-tag)
("\n\n")
("/**\n * Github Issue: " . font-lock-doc-face)
("https://github.com/emacs-php/php-mode/issues/8" link font-lock-doc-face)
("\n *\n * The code below contains annotations in the comments which begin\n * with the '@' character. The highlighting for these annotations\n * should be different from that used for comments. At the very least\n * php-mode should highlight the part up to the first backslash.\n */" . font-lock-doc-face)
("/**\n * Github Issue: https://github.com/emacs-php/php-mode/issues/8\n *\n * The code below contains annotations in the comments which begin\n * with the '@' character. The highlighting for these annotations\n * should be different from that used for comments. At the very least\n * php-mode should highlight the part up to the first backslash.\n */" . font-lock-doc-face)
("\n\n")
("/**\n * " . font-lock-doc-face)
("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face)
Expand Down
4 changes: 1 addition & 3 deletions tests/lang/doc-comment/return-type.php.faces
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
("\n\n")
("/**\n * Test for type annotation in doc comment\n *\n * The specification is defined in PSR-5 (draft) Appendix A. Types.\n * This implementation contains unstandardized specification.\n *\n * " . font-lock-doc-face)
("@see" php-doc-annotation-tag font-lock-doc-face)
(" " . font-lock-doc-face)
("https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types" link font-lock-doc-face)
("\n */" . font-lock-doc-face)
(" https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types\n */" . font-lock-doc-face)
("\n\n")
("// " . font-lock-comment-delimiter-face)
("Test for premitive type (int)\n" . font-lock-comment-face)
Expand Down