Skip to content

Commit 59f0ed3

Browse files
authored
Merge pull request #724 from emacs-php/remove-link-face-in-phpdoc
Remove `'link` face in PHPDoc
2 parents d01cfc9 + 41acf76 commit 59f0ed3

16 files changed

+23
-46
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- uses: actions/setup-python@v2
3030
with:
31-
python-version: '3.6'
31+
python-version: '3.11'
3232
architecture: 'x64'
3333
- uses: purcell/setup-emacs@master
3434
with:

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
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.
44

5-
<!-- ## Unreleased -->
5+
## Unreleased
6+
7+
### Removed
8+
9+
* No longer highlights `'link` in PHPDoc ([#724])
10+
* Please use `goto-address-prog-mode` minor mode
11+
12+
[#724]: https://github.com/emacs-php/php-mode/pull/724
613

714
## [1.24.2] - 2022-11-13
815

lisp/php-mode.el

-2
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,6 @@ for \\[find-tag] (which see)."
13711371
(regexp-opt php-phpdoc-type-names 'words)
13721372
"\\)")
13731373
1 font-lock-type-face prepend nil)
1374-
("https?://[^\n\t ]+"
1375-
0 'link prepend nil)
13761374
("^\\(?:/\\*\\)?\\(?:\\s \\|\\*\\)*\\(@[[:alpha:]][-[:alpha:]\\]*\\)" ; "@foo ..." markup.
13771375
1 'php-doc-annotation-tag prepend nil)))
13781376

tests/7.4/arrow-function.php.faces

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * GitHub-Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/506" link font-lock-doc-face)
6-
("\n *\n * " . font-lock-doc-face)
4+
("/**\n * GitHub-Issue: https://github.com/emacs-php/php-mode/issues/506\n *\n * " . font-lock-doc-face)
75
("@see" php-doc-annotation-tag font-lock-doc-face)
8-
(" " . font-lock-doc-face)
9-
("https://wiki.php.net/rfc/arrow_functions_v2" link font-lock-doc-face)
10-
("\n */" . font-lock-doc-face)
6+
(" https://wiki.php.net/rfc/arrow_functions_v2\n */" . font-lock-doc-face)
117
("\n\n")
128
("$" . php-variable-sigil)
139
("fn1" . php-variable-name)

tests/issue-136.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
("@author" php-doc-annotation-tag font-lock-doc-face)
1212
(" USAMI Kenta <[email protected]>\n * " . font-lock-doc-face)
1313
("@link" php-doc-annotation-tag font-lock-doc-face)
14-
(" " . font-lock-doc-face)
15-
("https://github.com/emacs-php/php-mode" link font-lock-doc-face)
16-
("\n * " . font-lock-doc-face)
14+
(" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face)
1715
("@package" php-doc-annotation-tag font-lock-doc-face)
1816
(" " . font-lock-doc-face)
1917
("Emacs\\PHPMode" php-string font-lock-doc-face)

tests/issue-197.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * GitHub Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/197" link font-lock-doc-face)
6-
("\n *\n * Test that member highlighting goes before highlighting of cc-mode\n * types\n */" . font-lock-doc-face)
4+
("/**\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)
75
("\n")
86
("$" . php-variable-sigil)
97
("test" . php-variable-name)

tests/issue-201.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * GitHub Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/201" link font-lock-doc-face)
6-
("\n *\n * Test highighting of " . font-lock-doc-face)
4+
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/201\n *\n * Test highighting of " . font-lock-doc-face)
75
("$" php-doc-$this-sigil php-doc-variable-sigil font-lock-doc-face)
86
("this" php-doc-$this php-variable-name font-lock-doc-face)
97
("\n */" . font-lock-doc-face)

tests/issue-305.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * GitHub Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/305" link font-lock-doc-face)
6-
("\n *\n * Test highighting of " . font-lock-doc-face)
4+
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/305\n *\n * Test highighting of " . font-lock-doc-face)
75
("$" php-doc-variable-sigil font-lock-doc-face)
86
("this_foo" php-variable-name font-lock-doc-face)
97
(", " . font-lock-doc-face)

tests/issue-439.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * GitHub Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/439" link font-lock-doc-face)
6-
("\n */" . font-lock-doc-face)
4+
("/**\n * GitHub Issue: https://github.com/emacs-php/php-mode/issues/439\n */" . font-lock-doc-face)
75
("\n\n")
86
("$" . php-variable-sigil)
97
("a" . php-variable-name)

tests/issue-443.php.27.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
("1); ")
99
("?>" . php-php-tag)
1010
("\n")
11-
("/** GitHub Issue: " . font-lock-doc-face)
12-
("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face)
13-
(" */" . font-lock-doc-face)
11+
("/** GitHub Issue: https://github.com/emacs-php/php-mode/issues/443 */" . font-lock-doc-face)
1412
("\n")
1513
("<?xml" . php-php-tag)
1614
(" version")

tests/issue-443.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
("1); ")
99
("?>" . php-php-tag)
1010
("\n")
11-
("/** GitHub Issue: " . font-lock-doc-face)
12-
("https://github.com/emacs-php/php-mode/issues/443" link font-lock-doc-face)
13-
(" */" . font-lock-doc-face)
11+
("/** GitHub Issue: https://github.com/emacs-php/php-mode/issues/443 */" . font-lock-doc-face)
1412
("\n")
1513
("<?xml" . php-php-tag)
1614
(" version")

tests/lang/doc-comment/comments.php.24.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
("@author" php-doc-annotation-tag font-lock-doc-face)
1212
(" USAMI Kenta <[email protected]>\n * " . font-lock-doc-face)
1313
("@link" php-doc-annotation-tag font-lock-doc-face)
14-
(" " . font-lock-doc-face)
15-
("https://github.com/emacs-php/php-mode" link font-lock-doc-face)
16-
("\n * " . font-lock-doc-face)
14+
(" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face)
1715
("@package" php-doc-annotation-tag font-lock-doc-face)
1816
(" " . font-lock-doc-face)
1917
("Emacs\\PHPMode" php-string font-lock-doc-face)

tests/lang/doc-comment/comments.php.27.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
("@author" php-doc-annotation-tag font-lock-doc-face)
1212
(" USAMI Kenta <[email protected]>\n * " . font-lock-doc-face)
1313
("@link" php-doc-annotation-tag font-lock-doc-face)
14-
(" " . font-lock-doc-face)
15-
("https://github.com/emacs-php/php-mode" link font-lock-doc-face)
16-
("\n * " . font-lock-doc-face)
14+
(" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face)
1715
("@package" php-doc-annotation-tag font-lock-doc-face)
1816
(" " . font-lock-doc-face)
1917
("Emacs\\PHPMode" php-string font-lock-doc-face)

tests/lang/doc-comment/comments.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
("@author" php-doc-annotation-tag font-lock-doc-face)
1212
(" USAMI Kenta <[email protected]>\n * " . font-lock-doc-face)
1313
("@link" php-doc-annotation-tag font-lock-doc-face)
14-
(" " . font-lock-doc-face)
15-
("https://github.com/emacs-php/php-mode" link font-lock-doc-face)
16-
("\n * " . font-lock-doc-face)
14+
(" https://github.com/emacs-php/php-mode\n * " . font-lock-doc-face)
1715
("@package" php-doc-annotation-tag font-lock-doc-face)
1816
(" " . font-lock-doc-face)
1917
("Emacs\\PHPMode" php-string font-lock-doc-face)

tests/lang/doc-comment/issue-8.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
;; -*- mode: emacs-lisp -*-
22
(("<?php" . php-php-tag)
33
("\n\n")
4-
("/**\n * Github Issue: " . font-lock-doc-face)
5-
("https://github.com/emacs-php/php-mode/issues/8" link font-lock-doc-face)
6-
("\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)
4+
("/**\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)
75
("\n\n")
86
("/**\n * " . font-lock-doc-face)
97
("@ORM\\Entity" php-doc-annotation-tag font-lock-doc-face)

tests/lang/doc-comment/return-type.php.faces

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
("\n\n")
44
("/**\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)
55
("@see" php-doc-annotation-tag font-lock-doc-face)
6-
(" " . font-lock-doc-face)
7-
("https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types" link font-lock-doc-face)
8-
("\n */" . font-lock-doc-face)
6+
(" https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types\n */" . font-lock-doc-face)
97
("\n\n")
108
("// " . font-lock-comment-delimiter-face)
119
("Test for premitive type (int)\n" . font-lock-comment-face)

0 commit comments

Comments
 (0)