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

#167 fontify triple-quoted-string, fixed #203

Merged
merged 1 commit into from
May 26, 2015
Merged

#167 fontify triple-quoted-string, fixed #203

merged 1 commit into from
May 26, 2015

Conversation

andreas-roehler
Copy link
Contributor

No description provided.

(0 (ignore (elixir-syntax-propertize-interpolation)))))
start end)))

;; (defun elixir-syntax-propertize-function (start end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete lines 327-335

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am 26.05.2015 um 20:49 schrieb Matt DeBoard:

Please delete lines 327-335


Reply to this email directly or view it on GitHub
https://github.com/elixir-lang/emacs-elixir/pull/203/files#r31066466.

This is obsolet now. There is a new pull-request. Fixes TQS only.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand? This is in the new PR (#203)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am 26.05.2015 um 20:59 schrieb Matt DeBoard:

In elixir-mode.el
#203 (comment):

  • (0 (ignore (elixir-syntax-stringify))))
  • ((rx (group "#{" (0+ (not (any "}"))) "}"))
  • (0 (ignore (elixir-syntax-propertize-interpolation))))))

+(defun elixir-syntax-propertize-function (start end)

  • (let ((case-fold-search nil))
  • (goto-char start)
  • (funcall
  • (syntax-propertize-rules
    
  •  ((elixir-rx string-delimiter)
    
  •   (0 (ignore (elixir-syntax-stringify))))
    
  •  ((rx (group "#{" (0+ (not (any "}"))) "}"))
    
  •   (0 (ignore (elixir-syntax-propertize-interpolation)))))
    
  • start end)))
    
    +;; (defun elixir-syntax-propertize-function (start end)

Not sure I understand? This is in the new PR (#203
#203)

Yes. Could you precise your question?

First part of syntax-propertize-rules is the fix.
Second part non-functional for the moment (interpolation is broken as
announced)

Will go on here after merge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, you have done enough work for the project, I'll take care of these little cleanups. Thank you so much, this has been a long time coming!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I meant was
bc2aa4f
... but no worries was simple enough to do myself. Thanks again I am sure
tons of users will be very happy at your improvements.

On Tue, May 26, 2015 at 2:11 PM, Andreas Röhler notifications@github.com
wrote:

In elixir-mode.el
#203 (comment)
:

  • (0 (ignore (elixir-syntax-stringify))))
  • ((rx (group "#{" (0+ (not (any "}"))) "}"))
  • (0 (ignore (elixir-syntax-propertize-interpolation))))))

+(defun elixir-syntax-propertize-function (start end)

  • (let ((case-fold-search nil))
  • (goto-char start)
  • (funcall
  • (syntax-propertize-rules
    
  •  ((elixir-rx string-delimiter)
    
  •   (0 (ignore (elixir-syntax-stringify))))
    
  •  ((rx (group "#{" (0+ (not (any "}"))) "}"))
    
  •   (0 (ignore (elixir-syntax-propertize-interpolation)))))
    
  • start end)))
    
    +;; (defun elixir-syntax-propertize-function (start end)

Am 26.05.2015 um 20:59 schrieb Matt DeBoard:
In elixir-mode.el <
https://github.com/elixir-lang/emacs-elixir/pull/203#discussion_r31067476>:

  • (0 (ignore (elixir-syntax-stringify)))) > + ((rx (group "#{" (0+ (not
    (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation)))))) > + > +(defun
    elixir-syntax-propertize-function (start end) > + (let ((case-fold-search
    nil)) > + (goto-char start) > + (funcall > + (syntax-propertize-rules > +
    ((elixir-rx string-delimiter) > + (0 (ignore (elixir-syntax-stringify)))) >
  • ((rx (group "#{" (0+ (not (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation))))) > + start end))) > + > +;;
    (defun elixir-syntax-propertize-function (start end) Not sure I understand?
    This is in the new PR (#167 fontify triple-quoted-string, fixed #203
    #167 fontify triple-quoted-string, fixed #203 <
    https://github.com/elixir-lang/emacs-elixir/pull/203>)
    Yes. Could you precise your question? First part of
    syntax-propertize-rules is the fix. Second part non-functional for the
    moment (interpolation is broken as announced) Will go on here after merge.


Reply to this email directly or view it on GitHub
https://github.com/elixir-lang/emacs-elixir/pull/203/files#r31068707.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am 26.05.2015 um 21:30 schrieb Matt DeBoard:

In elixir-mode.el
#203 (comment):

  • (0 (ignore (elixir-syntax-stringify))))
  • ((rx (group "#{" (0+ (not (any "}"))) "}"))
  • (0 (ignore (elixir-syntax-propertize-interpolation))))))

+(defun elixir-syntax-propertize-function (start end)

  • (let ((case-fold-search nil))
  • (goto-char start)
  • (funcall
  • (syntax-propertize-rules
    
  •  ((elixir-rx string-delimiter)
    
  •   (0 (ignore (elixir-syntax-stringify))))
    
  •  ((rx (group "#{" (0+ (not (any "}"))) "}"))
    
  •   (0 (ignore (elixir-syntax-propertize-interpolation)))))
    
  • start end)))
    
    +;; (defun elixir-syntax-propertize-function (start end)
    All I meant was
    bc2aa4f
    ... but no worries was simple enough to do myself. Thanks again I am
    sure tons of users will be very happy at your improvements.
    … <#>
    On Tue, May 26, 2015 at 2:11 PM, Andreas Röhler
    notifications@github.com wrote: In elixir-mode.el
    #167 fontify triple-quoted-string, fixed #203 (comment)
    : > + (0 (ignore (elixir-syntax-stringify)))) > + ((rx (group "#{" (0+
    (not (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation)))))) > + > +(defun
    elixir-syntax-propertize-function (start end) > + (let
    ((case-fold-search nil)) > + (goto-char start) > + (funcall > +
    (syntax-propertize-rules > + ((elixir-rx string-delimiter) > + (0
    (ignore (elixir-syntax-stringify)))) > + ((rx (group "#{" (0+ (not
    (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation))))) > + start end))) > + >
    +;; (defun elixir-syntax-propertize-function (start end) Am 26.05.2015
    um 20:59 schrieb Matt DeBoard: In elixir-mode.el <
    https://github.com/elixir-lang/emacs-elixir/pull/203#discussion_r31067476>:
  • (0 (ignore (elixir-syntax-stringify)))) > + ((rx (group "#{" (0+
    (not (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation)))))) > + > +(defun
    elixir-syntax-propertize-function (start end) > + (let
    ((case-fold-search nil)) > + (goto-char start) > + (funcall > +
    (syntax-propertize-rules > + ((elixir-rx string-delimiter) > + (0
    (ignore (elixir-syntax-stringify)))) > + ((rx (group "#{" (0+ (not
    (any "}"))) "}")) > + (0 (ignore
    (elixir-syntax-propertize-interpolation))))) > + start end))) > + >
    +;; (defun elixir-syntax-propertize-function (start end) Not sure I
    understand? This is in the new PR (#167 fontify triple-quoted-string, fixed #203
    #167 fontify triple-quoted-string, fixed #203
    #167 fontify triple-quoted-string, fixed #203 <
    https://github.com/elixir-lang/emacs-elixir/pull/203>
    #167 fontify triple-quoted-string, fixed #203) Yes. Could
    you precise your question? First part of syntax-propertize-rules is
    the fix. Second part non-functional for the moment (interpolation is
    broken as announced) Will go on here after merge. — Reply to this
    email directly or view it on GitHub
    https://github.com/elixir-lang/emacs-elixir/pull/203/files#r31068707.

Well, glad being useful. Decently translated some work done at
python-mode. Should mention Dave Love, who was the first solving this AFAIK.

@mattdeboard mattdeboard self-assigned this May 26, 2015
@mattdeboard
Copy link
Contributor

This looks very good to me! I think automatic indentation would be really valuable but that can definitely wait for a different PR.

Once those lines are deleted I will merge this in. This will get released ASAP.

@tonini
Copy link
Contributor

tonini commented May 26, 2015

@mattdeboard @andreas-roehler this is awesome! :shipit:

@mattdeboard
Copy link
Contributor

I have a little file called foo.ex I use to manually poke at things like this.

I added a @heredoc to a fn like so to test the capability, and it all looks great.

@mattdeboard
Copy link
Contributor

  @heredoc"""
  How "is" everyone r{doing} today, %Foo{hmm}??"
  """
  def foobar( %ExUnit.Test{} = test ) do
    a_case = test.case
                      stuff()
  end

All the various special cases and stuff just retain their string highlighting which is perfect. I manually indented the 2nd and third lines of the heredoc.

@tonini
Copy link
Contributor

tonini commented May 26, 2015

This is amazing! :) We need to release this as you said ASAP :D

@mattdeboard mattdeboard merged commit 6dd478b into elixir-editors:master May 26, 2015
J3RN pushed a commit to J3RN/emacs-elixir that referenced this pull request Apr 24, 2021
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