11
11
(defconst php-mode-version-number " 1.15.3"
12
12
" PHP Mode version number." )
13
13
14
- (defconst php-mode-modified " 2015-02-16 "
14
+ (defconst php-mode-modified " 2015-03-04 "
15
15
" PHP Mode build date." )
16
16
17
17
; ;; License
@@ -868,6 +868,15 @@ This is was done due to the problem reported here:
868
868
" See `php-c-at-vsemi-p' ."
869
869
)
870
870
871
+ (defsubst php-in-string-p ()
872
+ (nth 3 (syntax-ppss )))
873
+
874
+ (defsubst php-in-comment-p ()
875
+ (nth 4 (syntax-ppss )))
876
+
877
+ (defsubst php-in-string-or-comment-p ()
878
+ (nth 8 (syntax-ppss )))
879
+
871
880
(defun php-lineup-string-cont (langelem )
872
881
" Line up string toward equal sign or dot
873
882
e.g.
@@ -876,9 +885,12 @@ $str = 'some'
876
885
this ^ lineup"
877
886
(save-excursion
878
887
(goto-char (cdr langelem))
879
- (when (or (search-forward " =" (line-end-position ) t )
880
- (search-forward " ." (line-end-position ) t ))
881
- (vector (1- (current-column ))))))
888
+ (let (ret finish)
889
+ (while (and (not finish) (re-search-forward " [=.]" (line-end-position ) t ))
890
+ (unless (php-in-string-or-comment-p)
891
+ (setq finish t
892
+ ret (vector (1- (current-column ))))))
893
+ ret)))
882
894
883
895
(defun php-lineup-arglist-intro (langelem )
884
896
(save-excursion
@@ -911,12 +923,6 @@ the string HEREDOC-START."
911
923
(string-match " \\ w+" heredoc-start)
912
924
(concat " ^\\ (" (match-string 0 heredoc-start) " \\ )\\ W" ))
913
925
914
- (defsubst php-in-string-p ()
915
- (nth 3 (syntax-ppss )))
916
-
917
- (defsubst php-in-comment-p ()
918
- (nth 4 (syntax-ppss )))
919
-
920
926
(defun php-syntax-propertize-function (start end )
921
927
" Apply propertize rules from START to END."
922
928
; ; (defconst php-syntax-propertize-function
0 commit comments