[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] code for contextual behavior of < key

From: Jorge Araya Navarro
Subject: [Javascript] code for contextual behavior of < key
Date: Fri, 13 Sep 2019 23:20:35 +0000 (UTC)


As an ex-user of rjsx-mode a current user of js-mode on Emacs 27.x I missed the contextual behavior of the < key where it would insert an empty tag (</>) when attempting to write JSX code and inserting a plain < character when you don't. The code was originally written by Felipe (@felipeochoa on Github) and what I did was essentially a copy and paste with added test cases:

repository: https://gitlab.com/shackra/colibri

This thing still misses another function for expanding a balanced tag when the user deletes the / character of a self-closing tag, I don't think that code is trivial and maybe I wouldn't be able to extract it from rjsx-mode as with the extracted code.

I was wondering:

- doing this copy and pasting in regards to js-jsx-electric-lt is somewhat a violation of Felipe copyright?
- is this extraction missing something?
- If the author of rjsx-mode is here, would you donate parts of your code to js.el so people can have a better experience when dealing with JSX?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]