I am editing a dead simple JSON file:

   "foo": "bar"

Here's what I see:

enter image description here

Doing a C-h m I see the following minor modes running alongside JSON mode:

Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption                    
Column-Number File-Name-Shadow Font-Lock Global-Font-Lock                                 
Global-Hl-Line Global-Linum Js2 Line-Number Linum Mouse-Wheel Openwith                    
Tool-Bar Tooltip Transient-Mark  

The following problem is reported when the cursor is on : character:

missing ; before statement

The entire "bar" string value is also highlight red. Is the problem related to js-lint running alongside JSON?

  • Sure looks like a bug. Consider reporting it to the maintainer of the JSON support library you are using (which you don't mention, although we can see js-lint in the mode line). Did you try adding a SPC char before the : (shouldn't be needed, obviously - just a thought). – Drew Oct 12 '15 at 16:43
  • @Drew SPC makes no difference. This is embarrassing but I don't know what js-lint means. Looking at my .emacs it appears I am using json-mode: github.com/joshwnj/json-mode/blob/master/json-mode.el. How can I get more information about the major mode employed (like C-h m does for the minor modes)? – Marcus Junius Brutus Oct 12 '15 at 19:50
  • 1
    C-h m tells you about both major and minor modes. C-h f json-mode tells you about it also, and provides a link to the file that defines it. In that file it is likely that you will find contact info for the maintainer. But you already have that from the GitHub page for the library. Contact Josh Johnston with a recipe to reproduce the bug. – Drew Oct 13 '15 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.