1111(defconst php-mode-version-number " 1.15.3"
1212 " PHP Mode version number." )
1313
14- (defconst php-mode-modified " 2015-02-16 "
14+ (defconst php-mode-modified " 2015-03-04 "
1515 " PHP Mode build date." )
1616
1717; ;; License
@@ -868,6 +868,15 @@ This is was done due to the problem reported here:
868868 " See `php-c-at-vsemi-p' ."
869869 )
870870
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+
871880(defun php-lineup-string-cont (langelem )
872881 " Line up string toward equal sign or dot
873882e.g.
@@ -876,9 +885,12 @@ $str = 'some'
876885this ^ lineup"
877886 (save-excursion
878887 (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)))
882894
883895(defun php-lineup-arglist-intro (langelem )
884896 (save-excursion
@@ -911,12 +923,6 @@ the string HEREDOC-START."
911923 (string-match " \\ w+" heredoc-start)
912924 (concat " ^\\ (" (match-string 0 heredoc-start) " \\ )\\ W" ))
913925
914- (defsubst php-in-string-p ()
915- (nth 3 (syntax-ppss )))
916-
917- (defsubst php-in-comment-p ()
918- (nth 4 (syntax-ppss )))
919-
920926(defun php-syntax-propertize-function (start end )
921927 " Apply propertize rules from START to END."
922928 ; ; (defconst php-syntax-propertize-function
0 commit comments