all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jorge Araya Navarro <jorgejavieran@yahoo.com.mx>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: [Javascript] code for contextual behavior of < key
Date: Fri, 13 Sep 2019 23:20:35 +0000 (UTC)	[thread overview]
Message-ID: <1620828980.1114868.1568416835445@mail.yahoo.com> (raw)
In-Reply-To: 1620828980.1114868.1568416835445.ref@mail.yahoo.com

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

Hello!
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?

[-- Attachment #2: Type: text/html, Size: 1661 bytes --]

       reply	other threads:[~2019-09-13 23:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1620828980.1114868.1568416835445.ref@mail.yahoo.com>
2019-09-13 23:20 ` Jorge Araya Navarro [this message]
2019-09-14  1:41   ` [Javascript] code for contextual behavior of < key Jorge Javier Araya Navarro
2019-09-14  7:23     ` Eli Zaretskii
2019-09-14 16:32       ` Jorge Javier Araya Navarro
2019-09-18 21:14       ` Jorge Araya Navarro
2019-09-20  7:28         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1620828980.1114868.1568416835445@mail.yahoo.com \
    --to=jorgejavieran@yahoo.com.mx \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.