diff --git a/elpa-to-submit/pcmpl-rake.el b/elpa-to-submit/pcmpl-rake.el deleted file mode 100644 index bf073f2dd5..0000000000 --- a/elpa-to-submit/pcmpl-rake.el +++ /dev/null @@ -1,58 +0,0 @@ -;;; pcmpl-rake.el --- functions for completing Rake tasks - -;; Copyright (C) 2007 Phil Hagelberg - -;; Author: Phil Hagelberg -;; URL: http://www.emacswiki.org/cgi-bin/wiki/PcompleteRake -;; Version: 0.1 -;; Created: 2007-12-02 -;; Keywords: shell completion rake -;; EmacsWiki: PcompleteRake - -;; This file is NOT part of GNU Emacs. - -;; Last-Updated: Sun Dec 02 15:58:06 2007 PST -;; By: Phil Hagelberg -;; Update #: 1 - -;;; 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, 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 -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; 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. - -;;; Commentary: - -;; Provides pcompletion for the `rake' command, which is basically -;; `make' implemented in Ruby. - -;;; Code: - -(require 'pcomplete) - -;;;###autoload -(defun pcomplete/rake () - "Completion rules for the `ssh' command." - (pcomplete-here (pcmpl-rake-tasks))) - -(defun pcmpl-rake-tasks () - "Return a list of all the rake tasks defined in the current -projects. I know this is a hack to put all the logic in the -exec-to-string command, but it works and seems fast" - (delq nil (mapcar '(lambda(line) - (if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line))) - (split-string (shell-command-to-string "rake -T") "[\n]")))) - -(provide 'pcmpl-rake) -;;; pcmpl-rake.el ends here \ No newline at end of file diff --git a/elpa-to-submit/ruby-compilation.el b/elpa-to-submit/ruby-compilation.el index b9705a7bb5..ca4a0f9f18 100644 --- a/elpa-to-submit/ruby-compilation.el +++ b/elpa-to-submit/ruby-compilation.el @@ -49,9 +49,7 @@ ;;; Code: (require 'ansi-color) -(require 'pcmpl-rake) (require 'compile) -(require 'inf-ruby) (require 'which-func) (defvar ruby-compilation-error-regexp @@ -78,11 +76,12 @@ (ruby-args-to-list (expand-file-name cmd))))) (pop-to-buffer (ruby-compilation-do name cmdlist)))) +;;;###autoload (defun ruby-compilation-rake (&optional edit task) "Run a rake process dumping output to a ruby compilation buffer." (interactive "P") (let* ((task (or task (if (stringp edit) edit) - (completing-read "Rake: " (pcmpl-rake-tasks)))) + (completing-read "Rake: " (ruby-compilation-rake-tasks)))) (rake-args (if (and edit (not (stringp edit))) (read-from-minibuffer "Edit Rake Command: " (concat task " ")) task))) @@ -90,11 +89,13 @@ "rake" (cons "rake" (ruby-args-to-list rake-args)))))) +;;;###autoload (defun ruby-compilation-this-buffer () "Run the current buffer through Ruby compilation." (interactive) (ruby-compilation-run (buffer-file-name))) +;;;###autoload (defun ruby-compilation-this-test () "Run the test at point through Ruby compilation." (interactive) @@ -197,6 +198,19 @@ compilation buffer." (dolist (executable (list "jruby" "rbx" "ruby1.9" "ruby1.8" "ruby")) (add-to-list 'safe-local-variable-values (cons 'ruby-compilation-executable executable))) - + +(defun ruby-compilation-rake-tasks () + "Return a list of all the rake tasks defined in the current +projects. I know this is a hack to put all the logic in the +exec-to-string command, but it works and seems fast" + (delq nil (mapcar '(lambda(line) + (if (string-match "rake \\([^ ]+\\)" line) (match-string 1 line))) + (split-string (shell-command-to-string "rake -T") "[\n]")))) + +;;;###autoload +(defun pcomplete/rake () + "Completion rules for the `ssh' command." + (pcomplete-here (pcmpl-rake-tasks))) + (provide 'ruby-compilation) ;;; ruby-compilation.el ends here \ No newline at end of file diff --git a/starter-kit-misc.el b/starter-kit-misc.el index a7a4948d73..95ee000cd9 100644 --- a/starter-kit-misc.el +++ b/starter-kit-misc.el @@ -14,7 +14,6 @@ inhibit-startup-message t transient-mark-mode t color-theme-is-global t - imenu-auto-rescan t delete-by-moving-to-trash t shift-select-mode nil truncate-partial-width-windows nil @@ -62,6 +61,7 @@ (set-default 'indent-tabs-mode nil) (set-default 'indicate-empty-lines t) +(set-default 'imenu-auto-rescan t) (defalias 'yes-or-no-p 'y-or-n-p) (random t) ;; Seed the random-number generator diff --git a/starter-kit-ruby.el b/starter-kit-ruby.el index 9cfbbd2a30..478ca7ea3e 100644 --- a/starter-kit-ruby.el +++ b/starter-kit-ruby.el @@ -4,8 +4,8 @@ (eval-after-load 'ruby-mode '(progn - (require 'inf-ruby) (require 'ruby-compilation) + (add-hook 'ruby-mode-hook 'inf-ruby-keys) (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent) (define-key ruby-mode-map (kbd "C-c l") "lambda")))