Skip to content

Commit

Permalink
roll back to stable version of auto-complete. HEAD is waaay too buggy.
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Apr 15, 2012
1 parent c1dbc6c commit 135cfae
Show file tree
Hide file tree
Showing 28 changed files with 1,491 additions and 8,912 deletions.
File renamed without changes.
File renamed without changes.
15 changes: 6 additions & 9 deletions lib/auto-complete/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION=`perl -ne 'print $$1 if /;; Version: (.*)/' auto-complete.el`
PACKAGE=auto-complete-${VERSION}

byte-compile:
emacs -Q -L . -batch -f batch-byte-compile auto-complete.el auto-complete-config.el
emacs -Q -L . -batch -f batch-byte-compile *.el

install:
emacs -Q -L . -batch -l etc/install ${DIR}
Expand All @@ -11,17 +11,14 @@ clean:
rm -f *.elc
rm -f doc/*.html
rm -rf ${PACKAGE}
rm -f ${PACKAGE}.zip ${PACKAGE}.tar ${PACKAGE}.tar.bz2
rm -f ${PACKAGE}.zip ${PACKAGE}.tar.bz2

package: clean
mkdir ${PACKAGE}
cp -r *.el Makefile *.md COPYING.* doc dict ${PACKAGE}
cp -r *.el Makefile README.txt TODO.txt COPYING.*.txt doc etc dict ${PACKAGE}

package.tar: package
tar cf ${PACKAGE}.tar ${PACKAGE}
tar.bz2: package
tar cjf ${PACKAGE}.tar.bz2 ${PACKAGE}

package.tar.bz2: tar
bzip2 ${PACKAGE}.tar

package.zip: package
zip: package
zip -r ${PACKAGE}.zip ${PACKAGE}
File renamed without changes.
1 change: 0 additions & 1 deletion lib/auto-complete/TODO.md → lib/auto-complete/TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
- kanji henkan support
- create menu if needed
- quick help positioning on tabs (bug)
- skip short completion
58 changes: 22 additions & 36 deletions lib/auto-complete/auto-complete-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
;; Keywords: convenience
;; Version: 1.4
;; Version: 1.3.1

;; 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
Expand Down Expand Up @@ -90,7 +90,7 @@

(defun ac-gtags-candidate ()
(ignore-errors
(split-string (shell-command-to-string (format "global -ciq %s" ac-prefix)) "\n")))
(split-string (shell-command-to-string (format "global -ci %s" ac-prefix)) "\n")))

(ac-define-source gtags
'((candidates . ac-gtags-candidate)
Expand Down Expand Up @@ -368,45 +368,30 @@
"Current editing property.")

(defun ac-css-prefix ()
(when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:[^;]*\\=" nil t))
(when (save-excursion (re-search-backward "\\_<\\(.+?\\)\\_>\\s *:.*\\=" nil t))
(setq ac-css-property (match-string 1))
(or (ac-prefix-symbol) (point))))

(defun ac-css-property-candidates ()
(let ((list (assoc-default ac-css-property ac-css-property-alist)))
(if list
(loop with seen
with value
while (setq value (pop list))
if (symbolp value)
do (unless (memq value seen)
(push value seen)
(setq list
(append list
(or (assoc-default value ac-css-value-classes)
(assoc-default (symbol-name value) ac-css-property-alist)))))
else collect value)
ac-css-pseudo-classes)))

(ac-define-source css-property
(or (loop with list = (assoc-default ac-css-property ac-css-property-alist)
with seen = nil
with value
while (setq value (pop list))
if (symbolp value)
do (unless (memq value seen)
(push value seen)
(setq list
(append list
(or (assoc-default value ac-css-value-classes)
(assoc-default (symbol-name value) ac-css-property-alist)))))
else collect value)
ac-css-pseudo-classes))

(defvar ac-source-css-property
'((candidates . ac-css-property-candidates)
(prefix . ac-css-prefix)
(requires . 0)))

;; slime
(ac-define-source slime
'((depends slime)
(candidates . (car (slime-simple-completions ac-prefix)))
(symbol . "s")
(cache)))

;; ghc-mod
(ac-define-source ghc-mod
'((depends ghc)
(candidates . (ghc-select-completion-symbol))
(symbol . "s")
(cache)))



;;;; Not maintained sources
Expand Down Expand Up @@ -470,16 +455,17 @@
;;;; Default settings

(defun ac-common-setup ()
;(add-to-list 'ac-sources 'ac-source-filename)
)
(add-to-list 'ac-sources 'ac-source-filename))

(defun ac-emacs-lisp-mode-setup ()
(setq ac-sources (append '(ac-source-features ac-source-functions ac-source-yasnippet ac-source-variables ac-source-symbols) ac-sources)))

(defun ac-cc-mode-setup ()
(setq ac-sources (append '(ac-source-yasnippet ac-source-gtags) ac-sources)))

(defun ac-ruby-mode-setup ())
(defun ac-ruby-mode-setup ()
(make-local-variable 'ac-ignores)
(add-to-list 'ac-ignores "end"))

(defun ac-css-mode-setup ()
(setq ac-sources (append '(ac-source-css-property) ac-sources)))
Expand Down
4 changes: 0 additions & 4 deletions lib/auto-complete/auto-complete-pkg.el

This file was deleted.

Loading

0 comments on commit 135cfae

Please sign in to comment.