Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (50 sloc) 2.23 KB
;;; starter-kit-js.el --- Saner defaults and goodies for Javascript
;; Copyright (c) 2008-2010 Phil Hagelberg and contributors
;; Author: Phil Hagelberg <>
;; URL:
;; Version: 2.0
;; Keywords: convenience
;; Package-Requires: ((starter-kit "2.0.1"))
;; This file is not part of GNU Emacs.
;;; Commentary:
;; "Emacs outshines all other editing software in approximately the
;; same way that the noonday sun does the stars. It is not just bigger
;; and brighter; it simply makes everything else vanish."
;; -Neal Stephenson, "In the Beginning was the Command Line"
;; This file contains tweaks specific to Javascript.
;; This file is in need of a maintainer.
;;; License:
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 3
;; of the License, or (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(add-to-list 'auto-mode-alist '("\\.json$" . js-mode))
(eval-after-load 'js
'(progn (define-key js-mode-map "{" 'paredit-open-curly)
(define-key js-mode-map "}" 'paredit-close-curly-and-newline)
(add-hook 'js-mode-hook 'esk-paredit-nonlisp)
(setq js-indent-level 2)
;; fixes problem with pretty function font-lock
(define-key js-mode-map (kbd ",") 'self-insert-command)
'js-mode `(("\\(function *\\)("
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "\u0192")
(provide 'starter-kit-js)
;;; starter-kit-js.el ends here
Jump to Line
Something went wrong with that request. Please try again.