File tree Expand file tree Collapse file tree 1 file changed +12
-22
lines changed Expand file tree Collapse file tree 1 file changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -885,29 +885,19 @@ POS is a position on the line in question.
885
885
This is was done due to the problem reported here:
886
886
887
887
URL `https://answers.launchpad.net/nxhtml/+question/43320' "
888
- (if (not php-template-compatibility)
889
- nil
890
- (setq pos (or pos (point )))
891
- (let ((here (point ))
892
- ret)
893
- (save-match-data
888
+ (save-excursion
889
+ (if pos
894
890
(goto-char pos)
895
- (beginning-of-line )
896
- (setq ret (looking-at
897
- (rx
898
- (or (seq
899
- bol
900
- (0+ space)
901
- " <"
902
- (in " a-z\\ ?" ))
903
- (seq
904
- (0+ not-newline)
905
- (in " a-z\\ ?" )
906
- " >"
907
- (0+ space)
908
- eol))))))
909
- (goto-char here)
910
- ret)))
891
+ (setq pos (point )))
892
+ (unless (php-in-string-or-comment-p)
893
+ (or
894
+ ; ; Detect HTML/XML tag and PHP tag (<?php, <?=, ?>)
895
+ (when php-mode-template-compatibility
896
+ (beginning-of-line )
897
+ (looking-at-p
898
+ (eval-when-compile
899
+ (rx (or (: bol (0+ space) " <" (in " a-z\\ ?" ))
900
+ (: (0+ not-newline) (in " a-z\\ ?" ) " >" (0+ space) eol))))))))))
911
901
912
902
(defun php-c-vsemi-status-unknown-p ()
913
903
" Always return NIL. See `php-c-at-vsemi-p' ."
You can’t perform that action at this time.
0 commit comments