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

Syntax highlighting with camelCase function names breaks #83

Closed
Scramblejams opened this issue Aug 18, 2014 · 5 comments · Fixed by #84
Closed

Syntax highlighting with camelCase function names breaks #83

Scramblejams opened this issue Aug 18, 2014 · 5 comments · Fixed by #84

Comments

@Scramblejams
Copy link
Contributor

Hi, a comment before an end keyword yields the following:

8-18-2014 15-24-05

def fooBar do
  :foo
# trailing comment
end

To provoke the error I had to try indenting the comment after writing the end keyword.

Also, not sure why the camelcase in the function name is causing a change to the syntax coloring. Was going to wait until I could view it on a pure Linux setup to report it (currently using Windows, Cygwin and Console2 to access a Linux box over ssh), but then I saw the comment indentation bug so I figured I'd throw it in too.

Using elixir-mode 1.4.6 on Emacs 24.

@mattdeboard
Copy link
Contributor

Hm, I can't replicate the indentation bug. I'm doing the following steps:

  1. Writing the following:
def start do
  yadda()
  # Some comment
end
  1. Moving cursor up to the comment line
  2. Hitting <TAB>

I do, however, see the syntax-highlighting issue.

@Scramblejams
Copy link
Contributor Author

Those are the same steps I'm using, so I'm not sure where to go from there.

Though I am noticing some transience in the indentation that occurs from
time to time, nothing I've been able to reproduce unfortunately. For
example, a list comprehension would want to be indented like 4 levels
from the line above. Exiting and reopening emacs resolved it. Perhaps as
those little issues get hunted down over time the comment bug will go away.

On 8/18/2014 15:40, Matt DeBoard wrote:

Hm, I can't replicate the indentation bug. I'm doing the following steps:

  1. Writing the following:

def start do
yadda()

Some comment

end

Moving cursor up to the comment line
Hitting |<TAB>|

I do, however, see the syntax-highlighting issue.


Reply to this email directly or view it on GitHub
#83 (comment).

@mattdeboard
Copy link
Contributor

I drastically simplified the indentation code today, after many months of trying to make it work. I have also been doing a lot of releases so you may have a .elc (compiled elisp file) with some outdated code. That would explain the different behavior after restarting.

This simplification will contribute greatly to eliminating the "whack-a-mole" syndrome with indentation bugs that have been eating this project alive for awhile. I'm going to keep this issue open for the sake of the highlighting bug, but am going to drop the indentation tag.

Out of curiosity, what is the full version of emacs you're running? I am running 24.4.50.2

@Scramblejams
Copy link
Contributor Author

Good to hear, my hat's off to you. Making a smoothly working emacs mode
is a ton of work, I appreciate your efforts.

When you released 1.4.6, I did an rm -Rf ~/.emacs.d/elpa/elixir-mode*
before installing it, so I don't think I've got any old rogue versions
running around.

I'm running emacs 24.3.1, as that was listed as the current stable version on
https://www.gnu.org/software/emacs/.

On 8/18/2014 15:53, Matt DeBoard wrote:

I /drastically/ simplified the indentation code today, after many
months of trying to make it work. I have also been doing a lot of
releases so you may have a .elc (compiled elisp file) with some
outdated code. That would explain the different behavior after
restarting.

This simplification will contribute greatly to eliminating the
"whack-a-mole" syndrome with indentation bugs that have been eating
this project alive for awhile. I'm going to keep this issue open for
the sake of the highlighting bug, but am going to drop the indentation
tag.

Out of curiosity, what is the full version of emacs you're running? I
am running 24.4.50.2


Reply to this email directly or view it on GitHub
#83 (comment).

@mattdeboard
Copy link
Contributor

Yeah I'm slightly rogue running 24.4, probably not the best idea in hindsight. I probably need to set up a VM with 24.3.

@mattdeboard mattdeboard changed the title Trailing comment indentation problem Syntax highlighting with camelCase function names breaks Aug 18, 2014
J3RN pushed a commit to J3RN/emacs-elixir that referenced this issue Apr 24, 2021
* provide completions for protocol functions

* make test not depend on std lib
J3RN pushed a commit to J3RN/emacs-elixir that referenced this issue Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants