Skip to content

Commit

Permalink
Support built-in javascript-mode
Browse files Browse the repository at this point in the history
 - using defadvice instead of hook
  • Loading branch information
magnars committed Aug 17, 2012
1 parent 21aa8f1 commit d157d7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions expand-region.el
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@
(eval-after-load "ruby-mode" '(require 'ruby-mode-expansions))
(eval-after-load "org" '(require 'org-mode-expansions))

(defadvice javascript-mode (after enable-expand-region activate)
(require 'js-mode-expansions)
(er/add-js-mode-expansions))

;; unfortunately html-mode inherits from text-mode
;; and text-mode-expansions don't work well in html-mode
;; so if you want text-mode-expansions, add this to your
Expand Down

0 comments on commit d157d7f

Please sign in to comment.