branch: scratch/expand-region
commit 95a773bd8f557cbd43d3b2dab2fa4417ec5927ab
Author: akater <nuclearsp...@gmail.com>
Commit: Magnar Sveen <magn...@gmail.com>

    Cleaner build
---
 ruby-mode-expansions.el    | 24 ++++++++++++------------
 the-org-mode-expansions.el |  1 +
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/ruby-mode-expansions.el b/ruby-mode-expansions.el
index 27260eea13..32067bad46 100644
--- a/ruby-mode-expansions.el
+++ b/ruby-mode-expansions.el
@@ -83,18 +83,18 @@ This moves point to the next line to include the end of the 
block"
                    (ruby-beginning-of-block)
                    ;; "Block beginning" is often not at indentation in Emacs 
24.
                    (< (er/point-at-indentation) orig-point))
-      (loop do
-            (ruby-beginning-of-block)
-            (setq progress-beg (point))
-            (when (= (point) (point-min))
-              (return))
-            (ruby-end-of-block)
-            (setq progress-end (if (looking-at-p er/ruby-block-end-re)
-                                   (point-at-bol 0)
-                                 (point-at-bol 1)))
-            (goto-char progress-beg)
-            (when (> progress-end orig-point)
-              (return))))))
+      (cl-loop
+       (ruby-beginning-of-block)
+       (setq progress-beg (point))
+       (when (= (point) (point-min))
+         (cl-return))
+       (ruby-end-of-block)
+       (setq progress-end (if (looking-at-p er/ruby-block-end-re)
+                              (point-at-bol 0)
+                            (point-at-bol 1)))
+       (goto-char progress-beg)
+       (when (> progress-end orig-point)
+         (cl-return))))))
 
 ;;; This command isn't used here explicitly, but it's symmetrical with
 ;;; `er/ruby-backward-up', and nifty for interactive use.
diff --git a/the-org-mode-expansions.el b/the-org-mode-expansions.el
index 35237a2a29..571bc3d9c7 100644
--- a/the-org-mode-expansions.el
+++ b/the-org-mode-expansions.el
@@ -33,6 +33,7 @@
 
 (require 'expand-region-core)
 (require 'org-macs)
+(require 'org-element)
 
 (declare-function org-up-element "org")
 (declare-function org-mark-subtree "org")

Reply via email to