Browse files

Loosen dependency between core and mode expansions.

Extract the functionality of expand-region.el into
expand-region-core.el. The expansions depend upon that,
and expand-region.el pulls it all together.

While the dependency feature-wise is not circular
(all the mode-specific expansions depend on the core,
and not the other way around), expand-region.el should
not load all of its expansions, making it impossible
to cherry-pick what you want.

Ref issue #24
  • Loading branch information...
1 parent b047a1c commit 1be3769823d87f3da1921ff6e7b00be0a055d8ba @magnars committed Feb 27, 2012
@@ -84,7 +84,7 @@ great if you opened a pull-request. The repo is at:
-Changes to the `er/expand-region` functions itself must be accompanied by feature tests.
+Changes to `expand-region-core` itself must be accompanied by feature tests.
They are written in [Ecukes](, a Cucumber for Emacs.
To fetch the test dependencies:
@@ -32,6 +32,8 @@
;;; Code:
+(require 'expand-region-core)
(defun er/mark-clj-word ()
"Mark the entire word around or in front of point, including dashes."
@@ -28,6 +28,8 @@
;;; Code:
+(require 'expand-region-core)
(defun er/mark-css-declaration ()
"Marks one CSS declaration, eg. font-weight: bold;"
@@ -31,6 +31,8 @@
;;; Code:
+(require 'expand-region-core)
(defun er/add-erlang-mode-expansions ()
"Adds Erlang-specific expansions for buffers in erlang-mode"
(set (make-local-variable 'er/try-expand-list) (append
Oops, something went wrong. Retry.

0 comments on commit 1be3769

Please sign in to comment.