Skip to content
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
7 changes: 7 additions & 0 deletions php-mode-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,13 @@ style from Drupal."
(php-mode)
(should-not (buffer-modified-p))))

(ert-deftest php-mode-test-issue-314 ()
"Activating php-mode should not move point."
(with-php-mode-test ("issue-314.php")
(let ((orig-point (point)))
(php-mode)
(should (eq (point) orig-point)))))

(ert-deftest php-mode-test-issue-310 ()
"Proper indentation after function with return type."
(with-php-mode-test ("issue-310.php" :indent t :magic t)))
Expand Down
3 changes: 2 additions & 1 deletion php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,8 @@ PHP heredoc."

(when (>= emacs-major-version 25)
(with-silent-modifications
(php-syntax-propertize-function (point-min) (point-max)))))
(save-excursion
(php-syntax-propertize-function (point-min) (point-max))))))


;; Define function name completion function
Expand Down
3 changes: 3 additions & 0 deletions tests/issue-314.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

// It's the apostrophe.