Skip to content

Add string-cont lineup function which detect equal sign or dot#211

Closed
Abdillah wants to merge 1 commit into
emacs-php:masterfrom
Abdillah:master
Closed

Add string-cont lineup function which detect equal sign or dot#211
Abdillah wants to merge 1 commit into
emacs-php:masterfrom
Abdillah:master

Conversation

@Abdillah

Copy link
Copy Markdown
Contributor

The indentation of string continuation based on equal or dot on the previous line.

@ejmr

ejmr commented Jan 24, 2015

Copy link
Copy Markdown
Collaborator

Thank you for the patch. I merged it as commit 6baad9e.

@ejmr ejmr closed this Jan 24, 2015
syohex added a commit to syohex/php-mode that referenced this pull request Jan 28, 2015
- Fix byte compile warnings
- Add unit test
- Correct dot case
  '(re-search-forward ".")' makes no sense. Because '.' matches any
  single character.
- Simplify the code
ejmr pushed a commit that referenced this pull request Jan 29, 2015
- Fix byte compile warnings
- Add unit test
- Correct dot case
  '(re-search-forward ".")' makes no sense. Because '.' matches any
  single character.
- Simplify the code

Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
zonuexe added a commit that referenced this pull request Jul 16, 2026
Resolve the indentation behaviours that were deferred when the
cc-mode independent engine was first ported from js.el:

* php-indent--skip-term-backward now skips comments and newlines
  between chain links, so a `->' chain aligns to the first `->' even
  when comment lines are interleaved (issues #115, #135).
* A chain rooted in a `::' static access is no longer aligned to the
  operator; like CC Mode it is treated as a plain statement
  continuation, and inside argument lists it is indented as an
  ordinary element without the continued-expression bonus
  (php-indent--static-chain-in-list-p).
* New php-indent--statement-continuation-indentation indents lines
  that continue an unterminated statement (stacked member modifiers,
  a lone `extends', a broken `return'/`yield', a return-type `):')
  one php-indent-offset beyond the statement's first line.
* New php-indent--concat-continuation-indentation aligns a leading
  `.' string-concatenation line to the `=' of the assignment it
  continues (issue #211).
* When a brace is preceded by a parameter/condition list, the bracket
  indentation now anchors to the start of the whole statement, which
  may lie on an earlier line than the `(' (namespace-block fixture).
* php-indent-chain-indent is no longer set buffer-locally by the
  coding styles; like the old php-mode-lineup-cascaded-calls it is a
  plain global user option (issues #237, #623).
zonuexe added a commit that referenced this pull request Jul 16, 2026
Resolve the indentation behaviours that were deferred when the
cc-mode independent engine was first ported from js.el:

* php-indent--skip-term-backward now skips comments and newlines
  between chain links, so a `->' chain aligns to the first `->' even
  when comment lines are interleaved (issues #115, #135).
* A chain rooted in a `::' static access is no longer aligned to the
  operator; like CC Mode it is treated as a plain statement
  continuation, and inside argument lists it is indented as an
  ordinary element without the continued-expression bonus
  (php-indent--static-chain-in-list-p).
* New php-indent--statement-continuation-indentation indents lines
  that continue an unterminated statement (stacked member modifiers,
  a lone `extends', a broken `return'/`yield', a return-type `):')
  one php-indent-offset beyond the statement's first line.
* New php-indent--concat-continuation-indentation aligns a leading
  `.' string-concatenation line to the `=' of the assignment it
  continues (issue #211).
* When a brace is preceded by a parameter/condition list, the bracket
  indentation now anchors to the start of the whole statement, which
  may lie on an earlier line than the `(' (namespace-block fixture).
* php-indent-chain-indent is no longer set buffer-locally by the
  coding styles; like the old php-mode-lineup-cascaded-calls it is a
  plain global user option (issues #237, #623).
zonuexe added a commit that referenced this pull request Jul 16, 2026
Resolve the indentation behaviours that were deferred when the
cc-mode independent engine was first ported from js.el:

* php-indent--skip-term-backward now skips comments and newlines
  between chain links, so a `->' chain aligns to the first `->' even
  when comment lines are interleaved (issues #115, #135).
* A chain rooted in a `::' static access is no longer aligned to the
  operator; like CC Mode it is treated as a plain statement
  continuation, and inside argument lists it is indented as an
  ordinary element without the continued-expression bonus
  (php-indent--static-chain-in-list-p).
* New php-indent--statement-continuation-indentation indents lines
  that continue an unterminated statement (stacked member modifiers,
  a lone `extends', a broken `return'/`yield', a return-type `):')
  one php-indent-offset beyond the statement's first line.
* New php-indent--concat-continuation-indentation aligns a leading
  `.' string-concatenation line to the `=' of the assignment it
  continues (issue #211).
* When a brace is preceded by a parameter/condition list, the bracket
  indentation now anchors to the start of the whole statement, which
  may lie on an earlier line than the `(' (namespace-block fixture).
* php-indent-chain-indent is no longer set buffer-locally by the
  coding styles; like the old php-mode-lineup-cascaded-calls it is a
  plain global user option (issues #237, #623).
zonuexe added a commit that referenced this pull request Jul 16, 2026
Resolve the indentation behaviours that were deferred when the
cc-mode independent engine was first ported from js.el:

* php-indent--skip-term-backward now skips comments and newlines
  between chain links, so a `->' chain aligns to the first `->' even
  when comment lines are interleaved (issues #115, #135).
* A chain rooted in a `::' static access is no longer aligned to the
  operator; like CC Mode it is treated as a plain statement
  continuation, and inside argument lists it is indented as an
  ordinary element without the continued-expression bonus
  (php-indent--static-chain-in-list-p).
* New php-indent--statement-continuation-indentation indents lines
  that continue an unterminated statement (stacked member modifiers,
  a lone `extends', a broken `return'/`yield', a return-type `):')
  one php-indent-offset beyond the statement's first line.
* New php-indent--concat-continuation-indentation aligns a leading
  `.' string-concatenation line to the `=' of the assignment it
  continues (issue #211).
* When a brace is preceded by a parameter/condition list, the bracket
  indentation now anchors to the start of the whole statement, which
  may lie on an earlier line than the `(' (namespace-block fixture).
* php-indent-chain-indent is no longer set buffer-locally by the
  coding styles; like the old php-mode-lineup-cascaded-calls it is a
  plain global user option (issues #237, #623).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants