Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e2242b463a
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 36 lines (30 sloc) 1.548 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
;;; icicles-rcodetools.el -- accurate completion with icicles

;;; Copyright (c) 2006-2007 rubikitch <rubikitch@ruby-lang.org>
;;;
;;; Use and distribution subject to the terms of the Ruby license.

(require 'icicles)
(require 'rcodetools)

(setq rct-complete-symbol-function 'rct-complete-symbol--icicles)
(icicle-define-command rct-complete-symbol--icicles
                         "Perform ruby method and class completion on the text around point with icicles.
C-M-RET shows RI documentation on each candidate.
See also `rct-interactive'."

                       (lambda (result)
                         (save-excursion
                           (search-backward pattern)
                           (setq beg (point)))
                         (delete-region beg end)
                         (insert result)) ;/function
                       "rct-complete: " ;prompt
                       rct-method-completion-table
                       nil nil pattern nil nil nil
                       ((end (point)) beg
                        (icicle-list-join-string "\t")
                        (icicle-list-use-nth-parts '(1))
                        (icicle-point-position-in-candidate 'input-end)
                        pattern klass alist
                        (icicle-candidate-help-fn
                         (lambda (result)
                           (ri (cdr (assoc result alist)))))) ;bindings
                       (rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))

(provide 'icicles-rcodetools)
Something went wrong with that request. Please try again.