From 7f5c120dab7ccb8f25deaae84dcd9be36e0d6503 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Sun, 11 Nov 2012 20:51:24 +0000 Subject: [PATCH] Make ruby-compilation-extract-output-matches public for use in rinari and elsewhere --- util/ruby-compilation.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/ruby-compilation.el b/util/ruby-compilation.el index fb7ea90..9eb789b 100644 --- a/util/ruby-compilation.el +++ b/util/ruby-compilation.el @@ -204,12 +204,12 @@ buffer." ;;; Special handling for rake and capistrano -(defun ruby-compilation--extract-matches (command pattern) +(defun ruby-compilation-extract-output-matches (command pattern) "Run COMMAND, and return all the matching strings for PATTERN." (delq nil (mapcar #'(lambda(line) (when (string-match pattern line) (match-string 1 line))) - (split-string (shell-command-to-string command) "[\n]")))) + (split-string (shell-command-to-string command) "[\n]")))) (defun ruby-compilation--format-env-vars (pairs) "Convert PAIRS of (name . value) into a list of name=value strings." @@ -219,7 +219,7 @@ buffer." (defun pcmpl-rake-tasks () "Return a list of all the rake tasks defined in the current projects." - (ruby-compilation--extract-matches "rake -T" "rake \\([^ ]+\\)")) + (ruby-compilation-extract-output-matches "rake -T" "rake \\([^ ]+\\)")) ;;;###autoload (defun pcomplete/rake () @@ -248,7 +248,7 @@ optional list of (name . value) pairs which will be passed to rake." (defun pcmpl-cap-tasks () "Return a list of all the cap tasks defined in the current project." - (ruby-compilation--extract-matches "cap -T" "cap \\([^ ]+\\)")) + (ruby-compilation-extract-output-matches "cap -T" "cap \\([^ ]+\\)")) ;;;###autoload (defun pcomplete/cap ()