Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark-sexp marks more than sexp within comment blocks #154

Open
vellvisher opened this issue Dec 19, 2018 · 1 comment
Open

mark-sexp marks more than sexp within comment blocks #154

vellvisher opened this issue Dec 19, 2018 · 1 comment

Comments

@vellvisher
Copy link

vellvisher commented Dec 19, 2018

Example code with cursor as []:

  // []Start my application.  
  public func application(

Hit C-M-SPC, C-M-@ or mark-sexp, marked region in between []

  // [Start my application.  
  public] func application(

Expected (eg from objc-mode)

  // [Start] my application.  
  public func application(
@taku0
Copy link
Member

taku0 commented Dec 23, 2018

mark-sexp and forward/backward-sexp assume the point is not in a comment or string. We can define some reasonable behavior for such situation. forward-sexp-function is not defined for fundamental-mode nor text-mode. So we must define what is a expected behavior:

  • marking a word
  • marking from the point to the end of the comment/string
  • marking the whole comment/string
  • marking a word or balanced brackets (what if the brackets is not balanced?)
  • marking a Swift token or balanced brackets

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

No branches or pull requests

2 participants