Git Product home page Git Product logo

js2-mode's People

Watchers

 avatar  avatar

js2-mode's Issues

Escaped quote in the string doesn't add quote in last part of a string.

What steps will reproduce the problem?
1. Type var x = "u";
2. After the u type \"

What is the expected output? What do you see instead?
Expected output is: var x = "u\"";
Instead I get: var x = "u\";


What version of the product are you using? On what operating system?
I'm using js2-0406 on emacs 22.0.91.1 and EmacsW32 1.10 on Windows XP

Please provide any additional information below.
This is also the case with single quotes as it's matching the string
characters. This only happens in the last character index of a string.

Original issue reported on code.google.com by [email protected] on 8 Apr 2008 at 7:26

keywords as properties and methods

js2-mode treats this as an error, and while I haven't actually read this
part of the js spec, Spidermonkey/Firefox doesn't:

var foo = {};
foo.return = 42;
foo.import();

This wouldn't come up much, except that Firefox 3 now has a way to import
scripts via Components.utilities.import() that is becoming more and more
common.

Original issue reported on code.google.com by [email protected] on 10 Apr 2008 at 11:54

Comments with special characters mess up parsing of the rest of the program

What steps will reproduce the problem?
1. Put a character like {,},(,),',",[,] ... etc in a comment and parsing
breaks after that point.

What version of the product are you using? On what operating system?
Emacs 21 js2-20080403.el

I have a attached a file that illustrates the problem. Other test cases
should be able to reproduce and I would be happy to supply them.

Original issue reported on code.google.com by [email protected] on 6 Apr 2008 at 6:52

Attachments:

namespace cleanliness nit

I noticed this:

(defvar emacs22 (>= emacs-major-version 22))

It is a bit friendlier to always be namespace-clean.
I suggest renaming this to 'js2-emacs22' or the like.
Also, I noticed a couple explicit tests of the version elsewhere, eg:

  (if (>= emacs-major-version 22)
      (c-setup-paragraph-variables))

Original issue reported on code.google.com by [email protected] on 18 Apr 2008 at 10:51

Warning on byte-compile

On js2-20080413.el, GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600), WindowsXP
1. byte-compile-file c:/Documents and Settings/HOME/js2.el
2. Unexpected warning:

  Compiling file c:/Documents and Settings/HOME/js2.el at Wed Apr 16
15:53:10 2008
  Entering directory `c:/Documents and Settings/HOME/'

  In end of data:
  js2.el:10647:1:Warning: the following functions might not be defined at 
 runtime: position, delete-if





Original issue reported on code.google.com by [email protected] on 16 Apr 2008 at 2:57

lisp error opening .js file

What steps will reproduce the problem?
1. Open <a specific .js file>
2.
3.

What is the expected output? What do you see instead?

Expected a nicely highlighted file, got a backtrace.

What version of the product are you using? On what operating system?

The version is:

;;; This file was auto-generated on Sun Apr 06 23:28:49 2008 from files:

On emacs 22.2.1 on Centos 5.1.

Please provide any additional information below.

Attached error trace.

Original issue reported on code.google.com by [email protected] on 8 Apr 2008 at 12:34

Attachments:

Use \ instead of concatenation for multi-line strings

When pressing <Enter> inside a string literal, js2-mode currently uses 
string concatenation to create a new line:

var x = 'first line'
    + 'second line';

It would be better - in terms of number of characters, readability and 
performance - to use a backspace to escape the new line instead:

var x = 'first line\
second line';

Original issue reported on code.google.com by [email protected] on 4 Apr 2008 at 1:35

Unexpected behavior with js2-mode-find-tag

What steps will reproduce the problem?
1. Switch to buffer test-tags.js, and insert the following sans <POINT>
markers:

function tags() {
    funcallA<POINT>();
}

function tags2(a, b) {
    funcallB<POINT>
}


2. Invoke find-tag interactively with point at each marker.
3. Notice the default completion suggestions. In the first <POINT>, the
suggestion is "function", and the second is funcallB\n}\n.

What is the expected output? What do you see instead?

With find-tag-default, you would get funcallA and funcallB, respectively.
This behavior is quite useful when you want to do a tag lookup for a quick
arg check before entering them.

What version of the product are you using? On what operating system?

js2-version is a variable defined in `js2-mode.el'.
Its value is "1.7.0"
js2-mode-version is a variable defined in `js2-mode.el'.
Its value is 20080413
GNU Emacs 22.2.50.1 (i386-mingw-nt6.0.6001)
 of 2008-04-07 on SLAG

Original issue reported on code.google.com by [email protected] on 15 Apr 2008 at 6:25

Configurable indentation behavior

I'm really not looking for another 25K lines of indenting code, but...
Would it be possible to make the tab behavior customizable?  I want to turn
off the indentation cycling on tab.  I'd rather have it be occasionally
wrong than have it move the line around.

I just started using js2-mode, so perhaps I will get used to it in time,
but so far it is driving me a little nutty.


Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 9:28

Empty multiline comments parsed incorrectly

Empty multiline comments of the form /**/ appear to be improperly parsed.
If I write /**/foo/**/ the entire thing, including "foo", is highlighted as
a comment. Just putting /**/ highlights everything following it as a syntax
error.

Original issue reported on code.google.com by [email protected] on 2 Apr 2008 at 5:51

Components.utils.import() not parsed correctly

What steps will reproduce the problem?

Write this code:

const Cu = Components.utils;
Cu.import("...");

Then move the cursor above it and type C-x '

What is the expected output? What do you see instead?

You'll get an error in the '.' before 'import', presumably because it's
interpreting 'import' as a keyword, which is not correct in this case (I
think).

What version of the product are you using? On what operating system?

Aquamacs 1.3, OS X Leopard

Please provide any additional information below.

Thanks for your work so far!  I'm really excited about having a solid js
mode for emacs.

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 9:15

properties in an object literal that contain functions are not always highlighted as a function

What steps will reproduce the problem?

Consider the following code:

function generateQI(iids)
{
    return function(iid)
    {
        // …
    };
}

var obj = {
    foo: function() { },
    QueryInterface: generateQI([iface1, iface2])
};

What is the expected output? What do you see instead?

The expected outcome is that both property names 'foo' and 'QueryInterface'
are styled using font-lock-function-name-face. Instead 'QueryInterface' is
using font-lock-variable-name-face.

What version of the product are you using? On what operating system?

Emacs 22.0.60.2, js2-20080413.el

Please provide any additional information below.

This example is drawn from common usage in the Firefox codebase, but
obviously it could occur anywhere.

Original issue reported on code.google.com by [email protected] on 17 Apr 2008 at 12:28

No code in svn

there is no code in svn.

Personally, I have my emacs customizations in svn and like to use externals
on as many projects as possible. While I could write a script to get the
latest version from this web page, it is unnecessary pain. Would it be
possible to put the code into svn?

thanks, muro

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 8:12

Simply opening a file in js2-mode will "fix" whitespace

Mozilla is a large codebase in JS... it has lots of files with trailing
spaces (for example). Simply *opening* those files in JS2-mode causes the
trailing whitespace to be removed.

I expect that opening a file will not alter that file at all. The only time
trailing whitespace should be stripped is when I edit a particular line.

Using js2-20080413.el with GNU emacs 22.1.1 on FC8.

Original issue reported on code.google.com by [email protected] on 16 Apr 2008 at 4:20

byte-compile failed in

What steps will reproduce the problem?
1. Execute M-x byte-compile-file<RET>
2. Specify js2.el (js2-20080330.el)

What is the expected output? What do you see instead?
Compiling file /Users/water/.emacs.d/js2.el at Mon Mar 31 09:56:48 2008
js2.el:1539:13:Error: Wrong number of arguments: (lambda (var) (\` (setq (\, 
var) (- 1 (\, var))))), 
2

What version of the product are you using? On what operating system?
js2-20080330.el
GNU Emacs 22.1.50.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
 of 2008-01-17 on cf-ppc-macosx.usr.sourceforge.jp

Please provide any additional information below.


Original issue reported on code.google.com by BrianTRice on 31 Mar 2008 at 5:01

Installation instructions don't work for Aquamacs 1.3 distribution

What steps will reproduce the problem?
1. Install js2-mode on Aquamacs as described in the file.
2. Open any JavaScript source file.

What is the expected output? js2-mode is working.

What do you see instead? "File mode specification error: (invalid-function
(js2-mode))"

What version of the product are you using? On what operating system?
Aquamacs 1.3 on MacOS 10.5.2.

Please provide any additional information below.

Can be fixed by changing '("\\.js$" js2-mode) to '("\\.js$" . js2-mode)

Not sure if this is not some sort of lamer safeguard. If so, feel free to
trash this issue :)

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 6:32

instanceOf can have side effects

What steps will reproduce the problem?
function foo(req)
{
  req instanceOf Components.interfaces.nsIChannel;
}

What is the expected output? What do you see instead?

  The first line of this function foo is flagged with a warning, because it
thinks that the expression will have no effect. This is not always the
case. In any xulrunner app this will cause the object 'req' to acquire new
properties and methods taken from the nsIChannel interface if req supports
that interface. It's equivalent to
req.QueryInterface(Components.interfaces.nsIChannel);

What version of the product are you using? On what operating system?

  20080406 in Emacs 23.0.60.2 on Linux



Original issue reported on code.google.com by [email protected] on 14 Apr 2008 at 6:26

Variable defined in closure considered undefined

What steps will reproduce the problem?
1. Try the following test program:

var testColors = function () {
  var var1 = false;
  var fun1 = function () {
    var1 = true;
  };
  return {A: function () {fun1();}};
} ();

The var1 variable is colored Orange in the function fun1, and if you put
the mouse cursor on it it says "Undeclared Variable" in the minibuffer.  

What is the expected output? What do you see instead?

var1 is declared above fun1 and captured by the closure and so it should
not be called "Undeclared Variable".  I suspect it should not be colored
Orange as well (I'm not yet sure of the coloring scheme).

What version of the product are you using? On what operating system?

js2-20080406.el on GNU Emacs 23.0.60.1 (X11, gtk) on Mac OS X 10.4.11


Original issue reported on code.google.com by [email protected] on 11 Apr 2008 at 1:59

support html-mode, mmm-mode and mumamo

It should be possible to instruct the js2-mode scanner to treat HTML (or
XML) regions between <script> tags and on* attributes as whitespace or
comments.

mmm-mode is tricky because it invokes your mode once for each sub-region,
but js2-mode really needs to treat the buffer as one big scope.  Should be
easier once the skip-html stuff is added to the scanner.

have to look at mumamo as well.

Original issue reported on code.google.com by [email protected] on 19 Apr 2008 at 9:30

Improper flagging of inconsistent return usage

What steps will reproduce the problem?
1. Fire up emacs
2. Load up the code below and switch to js2-mode, 20080406 release
3. Notice the return inside the inner function is flagged as inconsistent, but 
should not be

What is the expected output? What do you see instead?
I expect the code to not be flagged

What version of the product are you using? On what operating system?
20080406 release. Default emacs on Leopard / OSX

Please provide any additional information below.
Here's the code to repro:

function foo(n){
  if(n < 5) return;
  var add = function(a) {
    return n+a; // this should not be flagged
  };
  add(10);
}

Original issue reported on code.google.com by [email protected] on 8 Apr 2008 at 8:42

add c-mode indentation keys

Adam de Boor writes:
> I just typed C-M-q to reindent the body of an if that I'd just wrapped
> in an outer if and was horrified to discover it's not bound to
> anything in js2-mode. in C it's bound to `c-indent-exp`, which takes the
> balanced expression after point (e.g. brace-bounded block) and indents
> each line. in case you've got a spare moment.

Need to go through and make sure the default bindings work.  This issue is
depending on adding the beginning-of-defun etc. support.

Original issue reported on code.google.com by [email protected] on 15 Apr 2008 at 10:59

Doxymacs font locking doesn't fontify Doxygen comments

What steps will reproduce the problem?
1. Load doxymacs (require 'doxymacs)
2. Load js2-mode (require 'js2-mode)
3. Visit a JavaScript file (C-x C-f somefile.js)
4. Enable js2-mode (M-x js2-mode)
5. Enable doxymacs mode (M-x doxymacs-mode)
6. Enable doxymacs font locking (M-x doxymacs-font-lock)

What is the expected output? What do you see instead?
I expect Doxymacs to highlight the Doxygen comments and operations (e.g.
\param, \return, etc.) but instead all parts of all comments (both Qt style
and Javadoc style) are solid comment colored [green].

What version of the product are you using? On what operating system?
GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-03-30
js2-20080403.el

Please provide any additional information below.
At first I wasn't sure this problem was in js2-mode, since Doxygen doesn't
officially support JavaScript, but I can also use Doxymacs with font
locking correctly in even Standard ML source code, so that makes me think
that Doxymacs should probably work everywhere in every kind of source code.

Original issue reported on code.google.com by [email protected] on 4 Apr 2008 at 6:21

lisp error opening .js file

What steps will reproduce the problem?
1. Open <a specific .js file>
2.
3.

What is the expected output? What do you see instead?

Expected a nicely highlighted file, got a backtrace.

What version of the product are you using? On what operating system?

The version is:

;;; This file was auto-generated on Sun Apr 06 23:28:49 2008 from files:

On emacs 22.2.1 on Centos 5.1.

Please provide any additional information below.

Attached error trace.

Original issue reported on code.google.com by [email protected] on 8 Apr 2008 at 12:35

Attachments:

Error opening a js file

When opening any js file I get this error:
File mode specification error: (void-variable emacs22)

I use Emacs 23.0.60.1 from svn in Debian Sid.


Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 9:17

"jump-to-function" to go to a function definition

It'll be nice to be able to jump to a function's declaration. A a key 
combination (C-c C-g?) that asks 
for the function name in minibuffer (defaults to the word at the current cursor 
location) and jumps 
to it. Right now I use incremental search to navigate.. I see that a "jumpable" 
list of all the functions 
is already there in the menu but it'll be better if I could just key-in the 
function name I want to 
visit.

Original issue reported on code.google.com by [email protected] on 18 Apr 2008 at 7:12

js2-use-font-lock-faces doesn't work with "emacs somefile.js"

What steps will reproduce the problem?
1. Install js2-mode and the proper autoloads/filetype hooks as per the
installation instructions.
2. Add (setq js2-use-font-lock-faces t) to your .emacs
3. In a command line, run "emacs somefile.js"

What is the expected output? What do you see instead?
I expect Emacs to use my font-lock style. Instead, it's using the
non-font-lock default faces.

If I open emacs without a Javascript file and then open a Javascript file
from within Emacs, the highlighting is correct. The issue only appears when
the initial file is Javascript.

What version of the product are you using? On what operating system?

js2-mode was generated on Thu Apr 3 17:54:54 2008.

GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2008-03-05

Original issue reported on code.google.com by [email protected] on 5 Apr 2008 at 6:57

Multi-line comment breaking

What steps will reproduce the problem?
1. Write small multiline comment, for example: / * <ENTER> t e s t
2. Try to break it, for example: C-n t e s t <ENTER> t e s t
3.

What is the expected output? What do you see instead?
Expected text like:
/*
 * test comment
 */test
test

I see:
/*
 * test comment

test*/test

What version of the product are you using? On what operating system?
GNU Emacs 22.0.98.1 (i386-mingw-nt5.1.2600) of 2007-04-17 on
LENNART-69DE564 (patched) on Windows XP

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 4:04

Mis-parses regular expression with a / inside a character class

Here's the code:

    var patterns = {
        traditional:
/^(?:[A-Za-z0-9+/]{4})*[A-Za-z0-9+/]{2}(?:[A-Za-z0-9+/]{2}|[A-Za-z0-9+/]=|==)$/,
        urlSafe:    
/^(?:[A-Za-z0-9\-_]{4})*[A-Za-z0-9\-_]{2}(?:[A-Za-z0-9\-_]{2}|[A-Za-z0-9\-_]=|==
)$/
    };

The mis-highlighting begins at the / within the character class in the 
first pattern, which your parser interprets as the end of the pattern.  

The obvious work-around is to use new RegExp for patterns that contain
slashes, which is honestly a pretty good idea in the first place. 

This is Ubuntu 7.10 with the latest emacs-snapshot from
http://ppa.launchpad.net/avassalotti/ubuntu.

(defvar js2-mode-version 20080330
  "Release number for `js2-mode'.")

$ emacs --version
GNU Emacs 23.0.60.1
Copyright (C) 2008 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

$ uname -a
Linux demandred 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686
GNU/Linux

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 8:31

"Illegal character" stops syntax highlighting and errors searching

What steps will reproduce the problem?
1. Write code:
var a = 1;
var b b = 2;
var c c = 3;
var d = 4;
#
var e = 5;
var f f = 6;

2. Try to search for all errors (C-x ')
3.

What is the expected output? What do you see instead?
Expected: cursor position will cycle throw lines 2, 3, 5, 7. Also, lines 6
and 7 must be highlighted.
I see: cursor position cycles throw lines 2, 3, 5 but not line 7. Also,
lines 6 and 7 aren't highlighted.


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 4:22

byte-compile failed in emacs 21

In emacs 21, byte-compile fails with the following error:

Compiling file /root/svn/mercury/lib/conf/elisp/js2.el at Mon Mar 31
08:02:08 2008
  !! File error (("Cannot open load file" "cc-defs.el"))

Locate finds /usr/share/emacs/21.4/lisp/progmodes/cc-defs.elc, which is in
the emacs load-path. 

Downloading http://cc-mode.sourceforge.net/src/cc-defs.el seems to fix the
issue.

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 3:19

Support emacs eldoc mode

Add support for eldoc mode, which shows documentation and signature in the
echo area when you hover over a function or variable.

One source of info is the list of javascript built-in functions and
properties you're maintaining.

Another source of eldoc info could be jsdoc markup.

Original issue reported on code.google.com by sdeasey on 1 Apr 2008 at 4:17

Typing #( seems to cause Emacs to loop infinitely

What steps will reproduce the problem?
1. Save all work in current Emacs session!
2. Use said Emacs session, or start a fresh Emacs session
3. js2-mode in *scratch* or some other interesting place
4. Type #(
5. Try to do something else

What is the expected output? What do you see instead?

It seems that this sequence triggers an infinite loop, session is
unrecoverable (\C-g will not save you, unfortunately). The Emacs process
needs to be taken down at the operating system level.

What version of the product are you using? On what operating system?

js2-version is a variable defined in `js2-mode.el'.
Its value is "1.7.0"
js2-mode-version is a variable defined in `js2-mode.el'.
Its value is 20080413
GNU Emacs 22.2.50.1 (i386-mingw-nt6.0.6001)
 of 2008-04-07 on SLAG

Original issue reported on code.google.com by [email protected] on 16 Apr 2008 at 1:05

command to toggle syntax error reporting

Some users dislike having syntax errors and warnings highlighted while
they're editing their code.  They would still like to be able to enable
syntax error reporting on demand.

Should add a command and corresponding menu option to toggle the
`js2-mode-show-parse-errors' and `js2-mode-show-strict-warnings' variables.

Original issue reported on code.google.com by [email protected] on 19 Apr 2008 at 9:26

Typing closing square bracket "]" results in a ")" instead

What steps will reproduce the problem?
1. install js2-20080401
2. try typing a reference to an array element a[i], it ends up as a[i)

What is the expected output? What do you see instead?
I expected a "]", I got a ")".  

What version of the product are you using? On what operating system?
js2-20080401 on Aquamacs 1.3a (based on emacs 22.1.91.2), OS X 10.5

Please provide any additional information below.
I had to manually set emacs22 to t in order for the mode to load. Not sure
if that was the right thing to do, but it seemed to work.

Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 10:19

Abbrev definitions are created in the fundamental mode's abbrev table

What steps will reproduce the problem?
1. Type ac into a js2-mode buffer.
2. Invoke inverse-add-mode-abbrev interactively.
3. Type appendChild and press enter.
4. Write the abbrevs file via write-abbrev-file
5. Notice the abbreviation for "ac" in ~/.abbrev_defs

What is the expected output? What do you see instead?

Should be under js2-mode-abbrev-table, which isn't defined. Instead, shows
up in fundamental-mode, which is not desired.

Please provide any additional information below.

Most major modes defvar a table and setq it in the *-mode() function, e.g.

(defvar js2-mode-abbrev-table nil
  "Abbrev table in use in `js2-mode' buffers.")
(define-abbrev-table 'js2-mode-abbrev-table ())

(defun js2-mode ()
  ...
  (setq local-abbrev-table js2-mode-abbrev-table))

Original issue reported on code.google.com by [email protected] on 15 Apr 2008 at 6:33

Patch for ELPA upload

I run ELPA, the Emacs Lisp Package Archive.  It is an easy way for
Emacs users to download and install 3rd party packages.  See:
   http://tromey.com/elpa/

I'd like to upload your mode to ELPA.  I needed the attached patch.
It adds a couple autoload cookies and a version header (ELPA uses
the elisp comment formatting guidelines to do its work).

Generally I don't upload packages unless the maintainer is amenable.
To upload an update, you would simply email the new version to
[email protected].

Let me know what you think.
Thanks,
Tom.

Original issue reported on code.google.com by [email protected] on 5 Apr 2008 at 3:07

Attachments:

Surprising backward-sexp behavior

What steps will reproduce the problem?
1. In js2-mode buffer, insert the following sans point marker:

if (true)<POINT> {
}

2. With cursor at <POINT>, invoke backward-sexp (typically C-M-b).

What is the expected output? What do you see instead?

I use this function frequently in other modes, so I have a hardwired
expectation that it will move to the matching start paren, as it does
normally (and by normal in this case, I mean lisp-mode, which is rather
abnormal in a way). In this case, though, it jumps before the if ...

<ACTUAL>if <EXPECTED>(true) {
}

I'm really not sure if this is a bug or if this was intended ... I run into
it quite frequently though. If it's just me, I can pretty easily work
around it in my mode hook, so no big deal.

What version of the product are you using? On what operating system?

js2-mode-version is a variable defined in `js2-mode.el'.
Its value is 20080413
GNU Emacs 22.2.50.1 (i386-mingw-nt6.0.6001)
 of 2008-04-07 on SLAG

Original issue reported on code.google.com by [email protected] on 18 Apr 2008 at 7:09

Escaping doubling quote when it's not the last part of a string escapes the escape character.

What steps will reproduce the problem?
1. Type var x = "u\"";
2. Then before the u type \"
3. You end up with \\" which ruins the string

What is the expected output? What do you see instead?
Expected output is: var x = "\"u\"";
Instead I get: var x = "\\"u\"";

What version of the product are you using? On what operating system?
I'm using js2-0406 on emacs 22.0.91.1 and EmacsW32 1.10 on Windows XP

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Apr 2008 at 7:20

'#' character hangs Emacs

What steps will reproduce the problem?
1. Create new buffer
2. Turn on js2-mode
3. type '#'

What is the expected output? What do you see instead?
The output is all right but Emacs hangs.

What version of the product are you using? On what operating system?
js2-20080413.el
GNU Emacs 22.0.98.1 (i386-mingw-nt5.1.2600) of 2007-04-17 on
LENNART-69DE564 (patched)

Please provide any additional information below.
The issue have place only if js2-skip-preprocessor-directives is nil
btw: thank you for support cpp

Original issue reported on code.google.com by [email protected] on 17 Apr 2008 at 10:46

Show functions/properties on a 'bad list' in warning face

You can currently choose the level of javascript feature support: e4x,
yield etc. But people don't choose the level of the language they want to
code to, they pick some subset of features from the browsers they're targeting.

What's needed is some kind of bad list. Functions, properties etc. on the
bad list would be shown with the warning face (orange underline) and show a
message in the echo area.

Ideally, this bad list would be maintained in a plain text file. You would
download the prototype js lib, and when hacking on it, js2-mode would use
the bad list supplied by prototype. When you used some built-in function
which the prototype hackers figured out is broken/slow etc. on IE6,
js2-mode would warn you to use a replacement from the prototype lib.

If the bad list is maintained as a plain text file, then perhaps the
javascripters who use TextMate etc will maintain the bad lists for us...

Original issue reported on code.google.com by sdeasey on 1 Apr 2008 at 4:11

find a way to support JSON

The main problem is that JSON content is invalid JavaScript syntax - you
can't have an object-literal as a left-hand side expression.  Need to add
an option and some support to the parser.

Original issue reported on code.google.com by [email protected] on 19 Apr 2008 at 9:32

Default font locking is color-theme unfriendly

What steps will reproduce the problem?
1. Install color theme
2. Eval (color-theme-charcoal-black)
3. Load a file in js2-mode

What is the expected output? What do you see instead?
See attached for a comparison with javascript-mode (proper coloring is seen
on the left side). Note that nxml-mode seems to pick up the color-theme
colors properly without being in the font-lock-mode camp.

What version of the product are you using? On what operating system?
js2-20080330.el
GNU Emacs 22.1.90.1 (i386-mingw-nt6.0.6001) of 2008-02-05 on NOTEBOOK

Please provide any additional information below.
This mode looks awesome, can't wait to explore it further.

Original issue reported on code.google.com by [email protected] on 31 Mar 2008 at 5:51

Attachments:

valid unicode code points not recognized

What steps will reproduce the problem?
1. make new buffer
2. write "var v = ["%5D%", "\u005d", "\x5d\u35b2", "5B"];" js string in buffer
3.

What is the expected output? What do you see instead?
Expected, all literals will be highlighted, and js code on next lines also
will be highlighted. js2-mode highlights only 2 first string literals and
does not highlights 2 last, and next js code.

What version of the product are you using? On what operating system?
GNU Emacs 22.0.98.1 (i386-mingw-nt5.1.2600) of 2007-04-17 on
LENNART-69DE564 (patched) on windows xp

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 1:08

function c-setup-paragraph-variables is not known

What steps will reproduce the problem?
1. during byte-compile-file, warning occurs:
js2.el:9691:1:Warning: the function `c-setup-paragraph-variables' is not
known to be defined.

2. Open .js file

3. Missing function from #1 causes error:
File mode specification error: (void-function c-setup-paragraph-variables)

What version of the product are you using? On what operating system?
GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE




Original issue reported on code.google.com by [email protected] on 1 Apr 2008 at 2:18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.