Permalink
Browse files

Release 1.0

  • Loading branch information...
1 parent 78eec74 commit 2e2cfd20862259ae39ff0ff88fb2ee63ac1e0ffd @m2ym m2ym committed Nov 30, 2009
Showing with 92 additions and 22 deletions.
  1. +17 −0 Makefile
  2. +17 −7 README
  3. +7 −6 auto-complete-config.el
  4. +51 −9 auto-complete.el
View
17 Makefile
@@ -0,0 +1,17 @@
+VERSION=`perl -ne 'print $$1 if /;; Version: (.*)/' auto-complete.el`
+PACKAGE=auto-complete-${VERSION}
+
+clean:
+ @rm -rf ${PACKAGE}
+ @rm -f ${PACKAGE}.zip ${PACKAGE}.tar.bz2 *.elc
+
+package:
+ @rm -rf ${PACKAGE}
+ @mkdir ${PACKAGE}
+ @cp *.el Makefile README TEST TODO ${PACKAGE}
+
+tar.bz2: package
+ @tar cjf ${PACKAGE}.tar.bz2 ${PACKAGE}
+
+zip: package
+ @zip -r ${PACKAGE}.zip ${PACKAGE}
View
24 README
@@ -1,11 +1,11 @@
What is this?
=============
-Auto-Complete provides a way to complete any strings you expected by a graphical popup menu.
+Auto-Complete provides a way to complete any strings you expected by a graphical pulldown menu.
-It looks like a function that is provided in Visual Studio as IntelliSense, Eclipse as CodeAssist, etc.
+It looks like what Visual Studio provides as IntelliSense, Eclipse provides as CodeAssist.
-You may realize how cool this is by looking the following screenshot!
+You may realize how cool this is. Just try this!
Features
========
@@ -15,10 +15,20 @@ Features
* Easy to extend
* Lightweight
-TODO
-====
+Installation
+============
+
+You can install this package by following command:
+
+ $ git clone git://github.com/m2ym/auto-complete.git
+ $ cd auto-complete
+ $ git checkout v1.0 # If you want to use stable version
+ $ emacs -L . -batch -f batch-byte-compile *.el
+ $ cp *.el *.elc ~/.emacs.d/ # to load-path directory
+
+Otherwise, you can download tarball or zip archive following URL.
+
-* Support for indivisual programming languages (e.g. member completion)
Sub projects
============
@@ -27,7 +37,7 @@ rsense
------
Ruby code completion project by type-inference (CPA).
-http://code.google.com/p/rsense/
+http://github.com/m2ym/rsense
Related projects
----------------
View
13 auto-complete-config.el
@@ -41,12 +41,13 @@
'((init . (unless ac-emacs-lisp-features
(let ((suffix (concat (regexp-opt (find-library-suffixes) t) "\\'")))
(setq ac-emacs-lisp-features
- (loop for dir in load-path
- if (file-directory-p dir)
- append (loop for file in (directory-files dir)
- if (string-match suffix file)
- collect (substring file 0 (match-beginning 0))))))))
- (candidates . (append features ac-emacs-lisp-features))
+ (append (mapcar 'prin1-to-string features)
+ (loop for dir in load-path
+ if (file-directory-p dir)
+ append (loop for file in (directory-files dir)
+ if (string-match suffix file)
+ collect (substring file 0 (match-beginning 0)))))))))
+ (candidates . ac-emacs-lisp-features)
(prefix . "require +'\\(\\(?:\\sw\\|\\s_\\)*\\)")
(limit . 0)))
View
60 auto-complete.el
@@ -3,8 +3,9 @@
;; Copyright (C) 2008, 2009 Tomohiro Matsuyama
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
+;; Repository http://github.com/m2ym/auto-complete
;; Keywords: convenience
-;; Version: 1.0a
+;; Version: 1.0
;; 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
@@ -40,24 +41,43 @@
;;; Installation:
;;
-;; To use this extension, locate auto-complete.el to your load-path directory.
+;; To use this extension, compile necessary elisp files and locate them to your load-path directory.
;;
-;; $ cp auto-complete.el ~/.emacs.d/
+;; $ emacs -L . -batch -f batch-byte-compile *.el
+;; $ cp *.el *.elc ~/.emacs.d/
;;
;; And write following code into your .emacs.
;;
;; (require 'auto-complete)
+;; (require 'auto-complete-config)
;; (global-auto-complete-mode t)
+;;; Sample configuration:
+;;
+;; Here is my configuration. It is useful for many people.
+;;
+;; (setq-default ac-sources '(ac-source-words-in-same-mode-buffers))
+;; (add-hook 'emacs-lisp-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-symbols)))
+;; (add-hook 'auto-complete-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-filename)))
+;; (global-auto-complete-mode t)
+;; (set-face-background 'ac-candidate-face "lightgray")
+;; (set-face-underline 'ac-candidate-face "darkgray")
+;; (set-face-background 'ac-selection-face "steelblue")
+;; (define-key ac-completing-map "\M-n" 'ac-next)
+;; (define-key ac-completing-map "\M-p" 'ac-previous)
+;; (setq ac-auto-start 2)
+;; (setq ac-dwim t)
+;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
+
;;; Tips:
;;
;; Use C-n/C-p to select candidates
;; --------------------------------
;;
;; Add following code to your .emacs.
;;
-;; (define-key ac-complete-mode-map "\C-n" 'ac-next)
-;; (define-key ac-complete-mode-map "\C-p" 'ac-previous)
+;; (define-key ac-completing-map "\C-n" 'ac-next)
+;; (define-key ac-completing-map "\C-p" 'ac-previous)
;;
;;
;; Don't start completion automatically
@@ -66,20 +86,42 @@
;; Add following code to your .emacs.
;;
;; (setq ac-auto-start nil)
-;; (global-set-key "\M-/" 'ac-start)
+;; (global-set-key "\M-/" 'auto-complete)
;;
;; or
;;
;; ;; start completion when entered 3 characters
;; (setq ac-auto-start 3)
;;
;;
+;; Use trigger key
+;; ---------------
+;;
+;; You can use common key as auto-complete trigger.
+;; Add following code to your .emacs.
+;;
+;; (ac-set-trigger-key "TAB")
+;;
+;; Now you can use TAB as auto-complete trigger.
+;; It is enabled only when
+;; a. After insertion/deletion command
+;; b. With prefix (C-u TAB)
+;;
+;;
+;; Use M-TAB for completion
+;; ------------------------
+;;
+;; Add following code to your .emacs.
+;;
+;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
+;;
+;;
;; Stop completion
;; ---------------
;;
;; Add following code to your .emacs.
;;
-;; (define-key ac-complete-mode-map "\M-/" 'ac-stop)
+;; (define-key ac-completing-map "\M-/" 'ac-stop)
;;
;; Now you can stop completion by pressing M-/.
;;
@@ -89,8 +131,8 @@
;;
;; Add following code to your .emacs.
;;
-;; (define-key ac-complete-mode-map "\t" 'ac-complete)
-;; (define-key ac-complete-mode-map "\r" nil)
+;; (define-key ac-completing-map "\t" 'ac-complete)
+;; (define-key ac-completing-map "\r" nil)
;;
;;
;; Do What I Mean mode

0 comments on commit 2e2cfd2

Please sign in to comment.