summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2015-06-11 15:38:41 +0200
committerAlan Pearce2015-06-11 15:38:41 +0200
commit5db8dd53007f8d008c6ad1884c5349b3ad69f898 (patch)
tree85468af95ba887d3730e0134bec87fcb7ac77f42 /tag-emacs/emacs.d
parentd2b814b8465d9801ad3beac76abe377ae92ee205 (diff)
downloadnixfiles-5db8dd53007f8d008c6ad1884c5349b3ad69f898.tar.lz
nixfiles-5db8dd53007f8d008c6ad1884c5349b3ad69f898.tar.zst
nixfiles-5db8dd53007f8d008c6ad1884c5349b3ad69f898.zip
Emacs: Use js2 error movement in js2-mode
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r--tag-emacs/emacs.d/init.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index 933ac21c..3c2cb605 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -1428,6 +1428,11 @@ symbol, not word, as I need this for programming the most."
             (defun ap/javascript-setup ()
               (autopair-mode -1)
               (auto-indent-mode -1))
+            (defun ap/js2-prev-error ()
+              (interactive)
+              (js2-next-error -1))
+            (bind-key "M-g M-n" #'js2-next-error js2-mode-map)
+            (bind-key "M-g M-p" #'ap/js2-prev-error js2-mode-map)
             (add-hook 'js2-mode-hook #'ap/javascript-setup)
             (setq js2-basic-offset 4
                   js2-include-node-externs t)))