Add emacs directory
git-svn-id: http://photonzero.com/dotfiles/trunk@54 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
parent
e50f8f4bc8
commit
5b6729933d
100 changed files with 37586 additions and 0 deletions
24
.emacs.d/auto-complete/Makefile
Normal file
24
.emacs.d/auto-complete/Makefile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
VERSION=`perl -ne 'print $$1 if /;; Version: (.*)/' auto-complete.el`
|
||||
PACKAGE=auto-complete-${VERSION}
|
||||
|
||||
byte-compile:
|
||||
emacs -Q -L . -batch -f batch-byte-compile *.el
|
||||
|
||||
install:
|
||||
emacs -Q -L . -batch -l etc/install ${DIR}
|
||||
|
||||
clean:
|
||||
rm -f *.elc
|
||||
rm -f doc/*.html
|
||||
rm -rf ${PACKAGE}
|
||||
rm -f ${PACKAGE}.zip ${PACKAGE}.tar.bz2
|
||||
|
||||
package: clean
|
||||
mkdir ${PACKAGE}
|
||||
cp -r *.el Makefile README.txt TODO.txt doc etc dict ${PACKAGE}
|
||||
|
||||
tar.bz2: package
|
||||
tar cjf ${PACKAGE}.tar.bz2 ${PACKAGE}
|
||||
|
||||
zip: package
|
||||
zip -r ${PACKAGE}.zip ${PACKAGE}
|
||||
13
.emacs.d/auto-complete/README.txt
Normal file
13
.emacs.d/auto-complete/README.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
* http://cx4a.org/software/auto-complete/
|
||||
* doc/index.txt
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Auto Complete Mode is distributed under the term of GPLv3. And its documentations under doc directory is distributed under the term of GFDL.
|
||||
10
.emacs.d/auto-complete/TODO.txt
Normal file
10
.emacs.d/auto-complete/TODO.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
- etags, ctags
|
||||
- emacswiki
|
||||
- test facility
|
||||
- support composed chars
|
||||
- minibuffer completion
|
||||
- performance issue (cache issue)
|
||||
- asynchronous processing
|
||||
- kanji henkan support
|
||||
- create menu if needed
|
||||
- quick help positioning on tabs (bug)
|
||||
480
.emacs.d/auto-complete/auto-complete-config.el
Normal file
480
.emacs.d/auto-complete/auto-complete-config.el
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
;;; auto-complete-config.el --- auto-complete additional configuations
|
||||
|
||||
;; Copyright (C) 2009, 2010 Tomohiro Matsuyama
|
||||
|
||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||
;; Keywords: convenience
|
||||
;; Version: 1.3
|
||||
|
||||
;; 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 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
|
||||
(require 'auto-complete)
|
||||
|
||||
|
||||
|
||||
;;;; Additional sources
|
||||
|
||||
;; imenu
|
||||
|
||||
(defvar ac-imenu-index nil)
|
||||
|
||||
(ac-clear-variable-every-10-minutes 'ac-imenu-index)
|
||||
|
||||
(defun ac-imenu-candidates ()
|
||||
(loop with i = 0
|
||||
with stack = (progn
|
||||
(unless (local-variable-p 'ac-imenu-index)
|
||||
(make-local-variable 'ac-imenu-index))
|
||||
(or ac-imenu-index
|
||||
(setq ac-imenu-index
|
||||
(ignore-errors
|
||||
(with-no-warnings
|
||||
(imenu--make-index-alist))))))
|
||||
with result
|
||||
while (and stack (or (not (integerp ac-limit))
|
||||
(< i ac-limit)))
|
||||
for node = (pop stack)
|
||||
if (consp node)
|
||||
do
|
||||
(let ((car (car node))
|
||||
(cdr (cdr node)))
|
||||
(if (consp cdr)
|
||||
(mapc (lambda (child)
|
||||
(push child stack))
|
||||
cdr)
|
||||
(when (and (stringp car)
|
||||
(string-match (concat "^" (regexp-quote ac-prefix)) car))
|
||||
;; Remove extra characters
|
||||
(if (string-match "^.*\\(()\\|=\\|<>\\)$" car)
|
||||
(setq car (substring car 0 (match-beginning 1))))
|
||||
(push car result)
|
||||
(incf i))))
|
||||
finally return (nreverse result)))
|
||||
|
||||
(ac-define-source imenu
|
||||
'((depends imenu)
|
||||
(candidates . ac-imenu-candidates)
|
||||
(symbol . "s")))
|
||||
|
||||
;; gtags
|
||||
|
||||
(defface ac-gtags-candidate-face
|
||||
'((t (:background "lightgray" :foreground "navy")))
|
||||
"Face for gtags candidate"
|
||||
:group 'auto-complete)
|
||||
|
||||
(defface ac-gtags-selection-face
|
||||
'((t (:background "navy" :foreground "white")))
|
||||
"Face for the gtags selected candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defun ac-gtags-candidate ()
|
||||
(ignore-errors
|
||||
(split-string (shell-command-to-string (format "global -ci %s" ac-prefix)) "\n")))
|
||||
|
||||
(ac-define-source gtags
|
||||
'((candidates . ac-gtags-candidate)
|
||||
(candidate-face . ac-gtags-candidate-face)
|
||||
(selection-face . ac-gtags-selection-face)
|
||||
(requires . 3)
|
||||
(symbol . "s")))
|
||||
|
||||
;; yasnippet
|
||||
|
||||
(defface ac-yasnippet-candidate-face
|
||||
'((t (:background "sandybrown" :foreground "black")))
|
||||
"Face for yasnippet candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defface ac-yasnippet-selection-face
|
||||
'((t (:background "coral3" :foreground "white")))
|
||||
"Face for the yasnippet selected candidate."
|
||||
:group 'auto-complete)
|
||||
|
||||
(defun ac-yasnippet-table-hash (table)
|
||||
(cond
|
||||
((fboundp 'yas/snippet-table-hash)
|
||||
(yas/snippet-table-hash table))
|
||||
((fboundp 'yas/table-hash)
|
||||
(yas/table-hash table))))
|
||||
|
||||
(defun ac-yasnippet-table-parent (table)
|
||||
(cond
|
||||
((fboundp 'yas/snippet-table-parent)
|
||||
(yas/snippet-table-parent table))
|
||||
((fboundp 'yas/table-parent)
|
||||
(yas/table-parent table))))
|
||||
|
||||
(defun ac-yasnippet-candidate-1 (table)
|
||||
(with-no-warnings
|
||||
(let ((hashtab (ac-yasnippet-table-hash table))
|
||||
(parent (ac-yasnippet-table-parent table))
|
||||
candidates)
|
||||
(maphash (lambda (key value)
|
||||
(push key candidates))
|
||||
hashtab)
|
||||
(setq candidates (all-completions ac-prefix (nreverse candidates)))
|
||||
(if parent
|
||||
(setq candidates
|
||||
(append candidates (ac-yasnippet-candidate-1 parent))))
|
||||
candidates)))
|
||||
|
||||
(defun ac-yasnippet-candidates ()
|
||||
(with-no-warnings
|
||||
(if (fboundp 'yas/get-snippet-tables)
|
||||
;; >0.6.0
|
||||
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode)))
|
||||
(let ((table
|
||||
(if (fboundp 'yas/snippet-table)
|
||||
;; <0.6.0
|
||||
(yas/snippet-table major-mode)
|
||||
;; 0.6.0
|
||||
(yas/current-snippet-table))))
|
||||
(if table
|
||||
(ac-yasnippet-candidate-1 table))))))
|
||||
|
||||
(ac-define-source yasnippet
|
||||
'((depends yasnippet)
|
||||
(candidates . ac-yasnippet-candidates)
|
||||
(action . yas/expand)
|
||||
(candidate-face . ac-yasnippet-candidate-face)
|
||||
(selection-face . ac-yasnippet-selection-face)
|
||||
(symbol . "a")))
|
||||
|
||||
;; semantic
|
||||
|
||||
(defun ac-semantic-candidates (prefix)
|
||||
(with-no-warnings
|
||||
(delete "" ; semantic sometimes returns an empty string
|
||||
(mapcar 'semantic-tag-name
|
||||
(ignore-errors
|
||||
(or (semantic-analyze-possible-completions
|
||||
(semantic-analyze-current-context))
|
||||
(senator-find-tag-for-completion prefix)))))))
|
||||
|
||||
(ac-define-source semantic
|
||||
'((available . (or (require 'semantic-ia nil t)
|
||||
(require 'semantic/ia nil t)))
|
||||
(candidates . (ac-semantic-candidates ac-prefix))
|
||||
(prefix . c-dot-ref)
|
||||
(requires . 0)
|
||||
(symbol . "m")))
|
||||
|
||||
(ac-define-source semantic-raw
|
||||
'((available . (or (require 'semantic-ia nil t)
|
||||
(require 'semantic/ia nil t)))
|
||||
(candidates . (ac-semantic-candidates ac-prefix))
|
||||
(symbol . "s")))
|
||||
|
||||
;; eclim
|
||||
|
||||
(defun ac-eclim-candidates ()
|
||||
(with-no-warnings
|
||||
(loop for c in (eclim/java-complete)
|
||||
collect (nth 1 c))))
|
||||
|
||||
(ac-define-source eclim
|
||||
'((candidates . ac-eclim-candidates)
|
||||
(prefix . c-dot)
|
||||
(requires . 0)
|
||||
(symbol . "f")))
|
||||
|
||||
;; css
|
||||
|
||||
;; Copied from company-css.el
|
||||
(defconst ac-css-property-alist
|
||||
;; see http://www.w3.org/TR/CSS21/propidx.html
|
||||
'(("azimuth" angle "left-side" "far-left" "left" "center-left" "center"
|
||||
"center-right" "right" "far-right" "right-side" "behind" "leftwards"
|
||||
"rightwards")
|
||||
("background" background-color background-image background-repeat
|
||||
background-attachment background-position)
|
||||
("background-attachment" "scroll" "fixed")
|
||||
("background-color" color "transparent")
|
||||
("background-image" uri "none")
|
||||
("background-position" percentage length "left" "center" "right" percentage
|
||||
length "top" "center" "bottom" "left" "center" "right" "top" "center"
|
||||
"bottom")
|
||||
("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat")
|
||||
("border" border-width border-style border-color)
|
||||
("border-bottom" border)
|
||||
("border-bottom-color" border-color)
|
||||
("border-bottom-style" border-style)
|
||||
("border-bottom-width" border-width)
|
||||
("border-collapse" "collapse" "separate")
|
||||
("border-color" color "transparent")
|
||||
("border-left" border)
|
||||
("border-left-color" border-color)
|
||||
("border-left-style" border-style)
|
||||
("border-left-width" border-width)
|
||||
("border-right" border)
|
||||
("border-right-color" border-color)
|
||||
("border-right-style" border-style)
|
||||
("border-right-width" border-width)
|
||||
("border-spacing" length length)
|
||||
("border-style" border-style)
|
||||
("border-top" border)
|
||||
("border-top-color" border-color)
|
||||
("border-top-style" border-style)
|
||||
("border-top-width" border-width)
|
||||
("border-width" border-width)
|
||||
("bottom" length percentage "auto")
|
||||
("caption-side" "top" "bottom")
|
||||
("clear" "none" "left" "right" "both")
|
||||
("clip" shape "auto")
|
||||
("color" color)
|
||||
("content" "normal" "none" string uri counter "attr()" "open-quote"
|
||||
"close-quote" "no-open-quote" "no-close-quote")
|
||||
("counter-increment" identifier integer "none")
|
||||
("counter-reset" identifier integer "none")
|
||||
("cue" cue-before cue-after)
|
||||
("cue-after" uri "none")
|
||||
("cue-before" uri "none")
|
||||
("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize"
|
||||
"ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize"
|
||||
"w-resize" "text" "wait" "help" "progress")
|
||||
("direction" "ltr" "rtl")
|
||||
("display" "inline" "block" "list-item" "run-in" "inline-block" "table"
|
||||
"inline-table" "table-row-group" "table-header-group" "table-footer-group"
|
||||
"table-row" "table-column-group" "table-column" "table-cell"
|
||||
"table-caption" "none")
|
||||
("elevation" angle "below" "level" "above" "higher" "lower")
|
||||
("empty-cells" "show" "hide")
|
||||
("float" "left" "right" "none")
|
||||
("font" font-style font-variant font-weight font-size "/" line-height
|
||||
font-family "caption" "icon" "menu" "message-box" "small-caption"
|
||||
"status-bar")
|
||||
("font-family" family-name generic-family)
|
||||
("font-size" absolute-size relative-size length percentage)
|
||||
("font-style" "normal" "italic" "oblique")
|
||||
("font-variant" "normal" "small-caps")
|
||||
("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400"
|
||||
"500" "600" "700" "800" "900")
|
||||
("height" length percentage "auto")
|
||||
("left" length percentage "auto")
|
||||
("letter-spacing" "normal" length)
|
||||
("line-height" "normal" number length percentage)
|
||||
("list-style" list-style-type list-style-position list-style-image)
|
||||
("list-style-image" uri "none")
|
||||
("list-style-position" "inside" "outside")
|
||||
("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero"
|
||||
"lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin"
|
||||
"armenian" "georgian" "lower-alpha" "upper-alpha" "none")
|
||||
("margin" margin-width)
|
||||
("margin-bottom" margin-width)
|
||||
("margin-left" margin-width)
|
||||
("margin-right" margin-width)
|
||||
("margin-top" margin-width)
|
||||
("max-height" length percentage "none")
|
||||
("max-width" length percentage "none")
|
||||
("min-height" length percentage)
|
||||
("min-width" length percentage)
|
||||
("orphans" integer)
|
||||
("outline" outline-color outline-style outline-width)
|
||||
("outline-color" color "invert")
|
||||
("outline-style" border-style)
|
||||
("outline-width" border-width)
|
||||
("overflow" "visible" "hidden" "scroll" "auto")
|
||||
("padding" padding-width)
|
||||
("padding-bottom" padding-width)
|
||||
("padding-left" padding-width)
|
||||
("padding-right" padding-width)
|
||||
("padding-top" padding-width)
|
||||
("page-break-after" "auto" "always" "avoid" "left" "right")
|
||||
("page-break-before" "auto" "always" "avoid" "left" "right")
|
||||
("page-break-inside" "avoid" "auto")
|
||||
("pause" time percentage)
|
||||
("pause-after" time percentage)
|
||||
("pause-before" time percentage)
|
||||
("pitch" frequency "x-low" "low" "medium" "high" "x-high")
|
||||
("pitch-range" number)
|
||||
("play-during" uri "mix" "repeat" "auto" "none")
|
||||
("position" "static" "relative" "absolute" "fixed")
|
||||
("quotes" string string "none")
|
||||
("richness" number)
|
||||
("right" length percentage "auto")
|
||||
("speak" "normal" "none" "spell-out")
|
||||
("speak-header" "once" "always")
|
||||
("speak-numeral" "digits" "continuous")
|
||||
("speak-punctuation" "code" "none")
|
||||
("speech-rate" number "x-slow" "slow" "medium" "fast" "x-fast" "faster"
|
||||
"slower")
|
||||
("stress" number)
|
||||
("table-layout" "auto" "fixed")
|
||||
("text-align" "left" "right" "center" "justify")
|
||||
("text-decoration" "none" "underline" "overline" "line-through" "blink")
|
||||
("text-indent" length percentage)
|
||||
("text-transform" "capitalize" "uppercase" "lowercase" "none")
|
||||
("top" length percentage "auto")
|
||||
("unicode-bidi" "normal" "embed" "bidi-override")
|
||||
("vertical-align" "baseline" "sub" "super" "top" "text-top" "middle"
|
||||
"bottom" "text-bottom" percentage length)
|
||||
("visibility" "visible" "hidden" "collapse")
|
||||
("voice-family" specific-voice generic-voice "*" specific-voice
|
||||
generic-voice)
|
||||
("volume" number percentage "silent" "x-soft" "soft" "medium" "loud"
|
||||
"x-loud")
|
||||
("white-space" "normal" "pre" "nowrap" "pre-wrap" "pre-line")
|
||||
("widows" integer)
|
||||
("width" length percentage "auto")
|
||||
("word-spacing" "normal" length)
|
||||
("z-index" "auto" integer))
|
||||
"A list of CSS properties and their possible values.")
|
||||
|
||||
(defconst ac-css-value-classes
|
||||
'((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large"
|
||||
"xx-large")
|
||||
(border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove"
|
||||
"ridge" "inset" "outset")
|
||||
(color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy"
|
||||
"olive" "orange" "purple" "red" "silver" "teal" "white" "yellow"
|
||||
"rgb")
|
||||
(counter "counter")
|
||||
(family-name "Courier" "Helvetica" "Times")
|
||||
(generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace")
|
||||
(generic-voice "male" "female" "child")
|
||||
(margin-width "auto") ;; length percentage
|
||||
(relative-size "larger" "smaller")
|
||||
(shape "rect")
|
||||
(uri "url"))
|
||||
"A list of CSS property value classes and their contents.")
|
||||
|
||||
(defconst ac-css-pseudo-classes
|
||||
'("active" "after" "before" "first" "first-child" "first-letter" "first-line"
|
||||
"focus" "hover" "lang" "left" "link" "right" "visited")
|
||||
"Identifiers for CSS pseudo-elements and pseudo-classes.")
|
||||
|
||||
(defvar ac-css-property nil
|
||||
"Current editing property.")
|
||||
|
||||
(defun ac-css-prefix ()
|
||||
(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 ()
|
||||
(or (loop with list = (assoc-default ac-css-property ac-css-property-alist)
|
||||
with value
|
||||
while (setq value (pop list))
|
||||
if (symbolp value)
|
||||
do (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)))
|
||||
|
||||
|
||||
|
||||
;;;; Not maintained sources
|
||||
|
||||
;; ropemacs
|
||||
|
||||
(defvar ac-ropemacs-loaded nil)
|
||||
(defun ac-ropemacs-require ()
|
||||
(with-no-warnings
|
||||
(unless ac-ropemacs-loaded
|
||||
(pymacs-load "ropemacs" "rope-")
|
||||
(if (boundp 'ropemacs-enable-autoimport)
|
||||
(setq ropemacs-enable-autoimport t))
|
||||
(setq ac-ropemacs-loaded t))))
|
||||
|
||||
(defun ac-ropemacs-setup ()
|
||||
(ac-ropemacs-require)
|
||||
;(setq ac-sources (append (list 'ac-source-ropemacs) ac-sources))
|
||||
(setq ac-omni-completion-sources '(("\\." ac-source-ropemacs))))
|
||||
|
||||
(defun ac-ropemacs-initialize ()
|
||||
(autoload 'pymacs-apply "pymacs")
|
||||
(autoload 'pymacs-call "pymacs")
|
||||
(autoload 'pymacs-eval "pymacs" nil t)
|
||||
(autoload 'pymacs-exec "pymacs" nil t)
|
||||
(autoload 'pymacs-load "pymacs" nil t)
|
||||
(add-hook 'python-mode-hook 'ac-ropemacs-setup)
|
||||
t)
|
||||
|
||||
(defvar ac-ropemacs-completions-cache nil)
|
||||
(defvar ac-source-ropemacs
|
||||
'((init
|
||||
. (lambda ()
|
||||
(setq ac-ropemacs-completions-cache
|
||||
(mapcar
|
||||
(lambda (completion)
|
||||
(concat ac-prefix completion))
|
||||
(ignore-errors
|
||||
(rope-completions))))))
|
||||
(candidates . ac-ropemacs-completions-cache)))
|
||||
|
||||
;; rcodetools
|
||||
|
||||
(defvar ac-source-rcodetools
|
||||
'((init . (lambda ()
|
||||
(require 'rcodetools)
|
||||
(condition-case x
|
||||
(save-excursion
|
||||
(rct-exec-and-eval rct-complete-command-name "--completion-emacs-icicles"))
|
||||
(error) (setq rct-method-completion-table nil))))
|
||||
(candidates . (lambda ()
|
||||
(all-completions
|
||||
ac-prefix
|
||||
(mapcar
|
||||
(lambda (completion)
|
||||
(replace-regexp-in-string "\t.*$" "" (car completion)))
|
||||
rct-method-completion-table))))))
|
||||
|
||||
|
||||
|
||||
;;;; Default settings
|
||||
|
||||
(defun ac-common-setup ()
|
||||
(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 ()
|
||||
(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)))
|
||||
|
||||
(defun ac-config-default ()
|
||||
(setq-default ac-sources '(ac-source-abbrev ac-source-dictionary ac-source-words-in-same-mode-buffers))
|
||||
(add-hook 'emacs-lisp-mode-hook 'ac-emacs-lisp-mode-setup)
|
||||
(add-hook 'c-mode-common-hook 'ac-cc-mode-setup)
|
||||
(add-hook 'ruby-mode-hook 'ac-ruby-mode-setup)
|
||||
(add-hook 'css-mode-hook 'ac-css-mode-setup)
|
||||
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
|
||||
(global-auto-complete-mode t))
|
||||
|
||||
(provide 'auto-complete-config)
|
||||
;;; auto-complete-config.el ends here
|
||||
BIN
.emacs.d/auto-complete/auto-complete-config.elc
Normal file
BIN
.emacs.d/auto-complete/auto-complete-config.elc
Normal file
Binary file not shown.
1897
.emacs.d/auto-complete/auto-complete.el
Normal file
1897
.emacs.d/auto-complete/auto-complete.el
Normal file
File diff suppressed because it is too large
Load diff
BIN
.emacs.d/auto-complete/auto-complete.elc
Normal file
BIN
.emacs.d/auto-complete/auto-complete.elc
Normal file
Binary file not shown.
74
.emacs.d/auto-complete/dict/c++-mode
Normal file
74
.emacs.d/auto-complete/dict/c++-mode
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
and
|
||||
and_eq
|
||||
asm
|
||||
auto
|
||||
bitand
|
||||
bitor
|
||||
bool
|
||||
break
|
||||
case
|
||||
catch
|
||||
char
|
||||
class
|
||||
compl
|
||||
const
|
||||
const_cast
|
||||
continue
|
||||
default
|
||||
delete
|
||||
do
|
||||
double
|
||||
dynamic_cast
|
||||
else
|
||||
enum
|
||||
explicit
|
||||
export
|
||||
extern
|
||||
false
|
||||
float
|
||||
for
|
||||
friend
|
||||
goto
|
||||
if
|
||||
inline
|
||||
int
|
||||
long
|
||||
mutable
|
||||
namespace
|
||||
new
|
||||
not
|
||||
not_eq
|
||||
operator
|
||||
or
|
||||
or_eq
|
||||
private
|
||||
protected
|
||||
public
|
||||
register
|
||||
reinterpret_cast
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
static_cast
|
||||
struct
|
||||
switch
|
||||
template
|
||||
this
|
||||
throw
|
||||
true
|
||||
try
|
||||
typedef
|
||||
typeid
|
||||
typename
|
||||
union
|
||||
unsigned
|
||||
using
|
||||
virtual
|
||||
void
|
||||
volatile
|
||||
wchar_t
|
||||
while
|
||||
xor
|
||||
xor_eq
|
||||
37
.emacs.d/auto-complete/dict/c-mode
Normal file
37
.emacs.d/auto-complete/dict/c-mode
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
auto
|
||||
_Bool
|
||||
break
|
||||
case
|
||||
char
|
||||
_Complex
|
||||
const
|
||||
continue
|
||||
default
|
||||
do
|
||||
double
|
||||
else
|
||||
enum
|
||||
extern
|
||||
float
|
||||
for
|
||||
goto
|
||||
if
|
||||
_Imaginary
|
||||
inline
|
||||
int
|
||||
long
|
||||
register
|
||||
restrict
|
||||
return
|
||||
short
|
||||
signed
|
||||
sizeof
|
||||
static
|
||||
struct
|
||||
switch
|
||||
typedef
|
||||
union
|
||||
unsigned
|
||||
void
|
||||
volatile
|
||||
while
|
||||
475
.emacs.d/auto-complete/dict/clojure-mode
Normal file
475
.emacs.d/auto-complete/dict/clojure-mode
Normal file
|
|
@ -0,0 +1,475 @@
|
|||
*agent*
|
||||
*clojure-version*
|
||||
*command-line-args*
|
||||
*compile-files*
|
||||
*compile-path*
|
||||
*err*
|
||||
*file*
|
||||
*flush-on-newline*
|
||||
*in*
|
||||
*ns*
|
||||
*out*
|
||||
*print-dup*
|
||||
*print-length*
|
||||
*print-level*
|
||||
*print-meta*
|
||||
*print-readably*
|
||||
*read-eval*
|
||||
*warn-on-reflection*
|
||||
accessor
|
||||
aclone
|
||||
add-classpath
|
||||
add-watch
|
||||
agent
|
||||
agent-error
|
||||
agent-errors
|
||||
aget
|
||||
alength
|
||||
alias
|
||||
all-ns
|
||||
alter
|
||||
alter-meta!
|
||||
alter-var-root
|
||||
amap
|
||||
ancestors
|
||||
and
|
||||
apply
|
||||
areduce
|
||||
array-map
|
||||
aset
|
||||
aset-boolean
|
||||
aset-byte
|
||||
aset-char
|
||||
aset-double
|
||||
aset-float
|
||||
aset-int
|
||||
aset-long
|
||||
aset-short
|
||||
assert
|
||||
assoc
|
||||
assoc!
|
||||
assoc-in
|
||||
associative?
|
||||
atom
|
||||
await
|
||||
await-for
|
||||
bases
|
||||
bean
|
||||
bigdec
|
||||
bigint
|
||||
binding
|
||||
bit-and
|
||||
bit-and-not
|
||||
bit-clear
|
||||
bit-flip
|
||||
bit-not
|
||||
bit-or
|
||||
bit-set
|
||||
bit-shift-left
|
||||
bit-shift-right
|
||||
bit-test
|
||||
bit-xor
|
||||
boolean
|
||||
boolean-array
|
||||
booleans
|
||||
bound-fn
|
||||
bound-fn*
|
||||
butlast
|
||||
byte
|
||||
byte-array
|
||||
bytes
|
||||
case
|
||||
cast
|
||||
char
|
||||
char-array
|
||||
char-escape-string
|
||||
char-name-string
|
||||
char?
|
||||
chars
|
||||
class
|
||||
class?
|
||||
clear-agent-errors
|
||||
clojure-version
|
||||
coll?
|
||||
comment
|
||||
commute
|
||||
comp
|
||||
comparator
|
||||
compare
|
||||
compare-and-set!
|
||||
compile
|
||||
complement
|
||||
concat
|
||||
cond
|
||||
condp
|
||||
conj
|
||||
conj!
|
||||
cons
|
||||
constantly
|
||||
construct-proxy
|
||||
contains?
|
||||
count
|
||||
counted?
|
||||
create-ns
|
||||
create-struct
|
||||
cycle
|
||||
dec
|
||||
decimal?
|
||||
declare
|
||||
definline
|
||||
defmacro
|
||||
defmethod
|
||||
defmulti
|
||||
defn
|
||||
defn-
|
||||
defonce
|
||||
defprotocol
|
||||
defstruct
|
||||
deftype
|
||||
delay
|
||||
delay?
|
||||
deliver
|
||||
deref
|
||||
derive
|
||||
descendants
|
||||
disj
|
||||
disj!
|
||||
dissoc
|
||||
dissoc!
|
||||
distinct
|
||||
distinct?
|
||||
doall
|
||||
doc
|
||||
dorun
|
||||
doseq
|
||||
dosync
|
||||
dotimes
|
||||
doto
|
||||
double
|
||||
double-array
|
||||
doubles
|
||||
drop
|
||||
drop-last
|
||||
drop-while
|
||||
dtype
|
||||
empty
|
||||
empty?
|
||||
ensure
|
||||
enumeration-seq
|
||||
error-handler
|
||||
error-mode
|
||||
eval
|
||||
even?
|
||||
every?
|
||||
extend
|
||||
extend-class
|
||||
extend-protocol
|
||||
extend-type
|
||||
extenders
|
||||
extends?
|
||||
false?
|
||||
ffirst
|
||||
file-seq
|
||||
filter
|
||||
find
|
||||
find-doc
|
||||
find-ns
|
||||
find-var
|
||||
first
|
||||
float
|
||||
float-array
|
||||
float?
|
||||
floats
|
||||
flush
|
||||
fn
|
||||
fn?
|
||||
fnext
|
||||
for
|
||||
force
|
||||
format
|
||||
future
|
||||
future-call
|
||||
future-cancel
|
||||
future-cancelled?
|
||||
future-done?
|
||||
future?
|
||||
gen-class
|
||||
gen-interface
|
||||
gensym
|
||||
get
|
||||
get-in
|
||||
get-method
|
||||
get-proxy-class
|
||||
get-thread-bindings
|
||||
get-validator
|
||||
hash
|
||||
hash-map
|
||||
hash-set
|
||||
identical?
|
||||
identity
|
||||
if-let
|
||||
if-not
|
||||
ifn?
|
||||
import
|
||||
in-ns
|
||||
inc
|
||||
init-proxy
|
||||
instance?
|
||||
int
|
||||
int-array
|
||||
integer?
|
||||
interleave
|
||||
intern
|
||||
interpose
|
||||
into
|
||||
into-array
|
||||
ints
|
||||
io!
|
||||
isa?
|
||||
iterate
|
||||
iterator-seq
|
||||
juxt
|
||||
key
|
||||
keys
|
||||
keyword
|
||||
keyword?
|
||||
last
|
||||
lazy-cat
|
||||
lazy-seq
|
||||
let
|
||||
letfn
|
||||
line-seq
|
||||
list
|
||||
list*
|
||||
list?
|
||||
load
|
||||
load-file
|
||||
load-reader
|
||||
load-string
|
||||
loaded-libs
|
||||
locking
|
||||
long
|
||||
long-array
|
||||
longs
|
||||
loop
|
||||
macroexpand
|
||||
macroexpand-1
|
||||
make-array
|
||||
make-hierarchy
|
||||
map
|
||||
map?
|
||||
mapcat
|
||||
max
|
||||
max-key
|
||||
memfn
|
||||
memoize
|
||||
merge
|
||||
merge-with
|
||||
meta
|
||||
methods
|
||||
min
|
||||
min-key
|
||||
mod
|
||||
name
|
||||
namespace
|
||||
neg?
|
||||
newline
|
||||
next
|
||||
nfirst
|
||||
nil?
|
||||
nnext
|
||||
not
|
||||
not-any?
|
||||
not-empty
|
||||
not-every?
|
||||
not=
|
||||
ns
|
||||
ns-aliases
|
||||
ns-imports
|
||||
ns-interns
|
||||
ns-map
|
||||
ns-name
|
||||
ns-publics
|
||||
ns-refers
|
||||
ns-resolve
|
||||
ns-unalias
|
||||
ns-unmap
|
||||
nth
|
||||
nthnext
|
||||
num
|
||||
number?
|
||||
object-array
|
||||
odd?
|
||||
or
|
||||
parents
|
||||
partial
|
||||
partition
|
||||
pcalls
|
||||
peek
|
||||
persistent!
|
||||
pmap
|
||||
pop
|
||||
pop!
|
||||
pop-thread-bindings
|
||||
pos?
|
||||
pr
|
||||
pr-str
|
||||
prefer-method
|
||||
prefers
|
||||
print
|
||||
print-namespace-doc
|
||||
print-str
|
||||
printf
|
||||
println
|
||||
println-str
|
||||
prn
|
||||
prn-str
|
||||
promise
|
||||
proxy
|
||||
proxy-mappings
|
||||
proxy-super
|
||||
push-thread-bindings
|
||||
pvalues
|
||||
quot
|
||||
rand
|
||||
rand-int
|
||||
range
|
||||
ratio?
|
||||
rationalize
|
||||
re-find
|
||||
re-groups
|
||||
re-matcher
|
||||
re-matches
|
||||
re-pattern
|
||||
re-seq
|
||||
read
|
||||
read-line
|
||||
read-string
|
||||
reduce
|
||||
ref
|
||||
ref-history-count
|
||||
ref-max-history
|
||||
ref-min-history
|
||||
ref-set
|
||||
refer
|
||||
refer-clojure
|
||||
reify
|
||||
release-pending-sends
|
||||
rem
|
||||
remove
|
||||
remove-method
|
||||
remove-ns
|
||||
remove-watch
|
||||
repeat
|
||||
repeatedly
|
||||
replace
|
||||
replicate
|
||||
require
|
||||
reset!
|
||||
reset-meta!
|
||||
resolve
|
||||
rest
|
||||
restart-agent
|
||||
resultset-seq
|
||||
reverse
|
||||
reversible?
|
||||
rseq
|
||||
rsubseq
|
||||
satisfies?
|
||||
second
|
||||
select-keys
|
||||
send
|
||||
send-off
|
||||
seq
|
||||
seq?
|
||||
seque
|
||||
sequence
|
||||
sequential?
|
||||
set
|
||||
set-error-handler!
|
||||
set-error-mode!
|
||||
set-validator!
|
||||
set?
|
||||
short
|
||||
short-array
|
||||
shorts
|
||||
shutdown-agents
|
||||
slurp
|
||||
some
|
||||
sort
|
||||
sort-by
|
||||
sorted-map
|
||||
sorted-map-by
|
||||
sorted-set
|
||||
sorted-set-by
|
||||
sorted?
|
||||
special-form-anchor
|
||||
special-symbol?
|
||||
split-at
|
||||
split-with
|
||||
str
|
||||
stream?
|
||||
string?
|
||||
struct
|
||||
struct-map
|
||||
subs
|
||||
subseq
|
||||
subvec
|
||||
supers
|
||||
swap!
|
||||
symbol
|
||||
symbol?
|
||||
sync
|
||||
syntax-symbol-anchor
|
||||
take
|
||||
take-last
|
||||
take-nth
|
||||
take-while
|
||||
test
|
||||
the-ns
|
||||
time
|
||||
to-array
|
||||
to-array-2d
|
||||
trampoline
|
||||
transient
|
||||
tree-seq
|
||||
true?
|
||||
type
|
||||
unchecked-add
|
||||
unchecked-dec
|
||||
unchecked-divide
|
||||
unchecked-inc
|
||||
unchecked-multiply
|
||||
unchecked-negate
|
||||
unchecked-remainder
|
||||
unchecked-subtract
|
||||
underive
|
||||
update-in
|
||||
update-proxy
|
||||
use
|
||||
val
|
||||
vals
|
||||
var-get
|
||||
var-set
|
||||
var?
|
||||
vary-meta
|
||||
vec
|
||||
vector
|
||||
vector-of
|
||||
vector?
|
||||
when
|
||||
when-first
|
||||
when-let
|
||||
when-not
|
||||
while
|
||||
with-bindings
|
||||
with-bindings*
|
||||
with-in-str
|
||||
with-local-vars
|
||||
with-meta
|
||||
with-open
|
||||
with-out-str
|
||||
with-precision
|
||||
xml-seq
|
||||
zero?
|
||||
zipmap
|
||||
747
.emacs.d/auto-complete/dict/css-mode
Normal file
747
.emacs.d/auto-complete/dict/css-mode
Normal file
File diff suppressed because it is too large
Load diff
50
.emacs.d/auto-complete/dict/java-mode
Normal file
50
.emacs.d/auto-complete/dict/java-mode
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
abstract
|
||||
assert
|
||||
boolean
|
||||
break
|
||||
byte
|
||||
case
|
||||
catch
|
||||
char
|
||||
class
|
||||
const
|
||||
continue
|
||||
default
|
||||
do
|
||||
double
|
||||
else
|
||||
enum
|
||||
extends
|
||||
final
|
||||
finally
|
||||
float
|
||||
for
|
||||
goto
|
||||
if
|
||||
implements
|
||||
import
|
||||
instanceof
|
||||
int
|
||||
interface
|
||||
long
|
||||
native
|
||||
new
|
||||
package
|
||||
private
|
||||
protected
|
||||
public
|
||||
return
|
||||
short
|
||||
static
|
||||
strictfp
|
||||
super
|
||||
switch
|
||||
synchronized
|
||||
this
|
||||
throw
|
||||
throws
|
||||
transient
|
||||
try
|
||||
void
|
||||
volatile
|
||||
while
|
||||
148
.emacs.d/auto-complete/dict/javascript-mode
Normal file
148
.emacs.d/auto-complete/dict/javascript-mode
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
Anchor
|
||||
Area
|
||||
Array
|
||||
Boolean
|
||||
Button
|
||||
Checkbox
|
||||
Date
|
||||
Document
|
||||
Element
|
||||
FileUpload
|
||||
Form
|
||||
Frame
|
||||
Function
|
||||
Hidden
|
||||
History
|
||||
Image
|
||||
Infinity
|
||||
JavaArray
|
||||
JavaClass
|
||||
JavaObject
|
||||
JavaPackage
|
||||
Link
|
||||
Location
|
||||
Math
|
||||
MimeType
|
||||
NaN
|
||||
Navigator
|
||||
Number
|
||||
Object
|
||||
Option
|
||||
Packages
|
||||
Password
|
||||
Plugin
|
||||
Radio
|
||||
RegExp
|
||||
Reset
|
||||
Select
|
||||
String
|
||||
Submit
|
||||
Text
|
||||
Textarea
|
||||
Window
|
||||
alert
|
||||
arguments
|
||||
assign
|
||||
blur
|
||||
break
|
||||
callee
|
||||
caller
|
||||
captureEvents
|
||||
case
|
||||
clearInterval
|
||||
clearTimeout
|
||||
close
|
||||
closed
|
||||
comment
|
||||
confirm
|
||||
constructor
|
||||
continue
|
||||
default
|
||||
defaultStatus
|
||||
delete
|
||||
do
|
||||
document
|
||||
else
|
||||
escape
|
||||
eval
|
||||
export
|
||||
find
|
||||
focus
|
||||
for
|
||||
frames
|
||||
function
|
||||
getClass
|
||||
history
|
||||
home
|
||||
if
|
||||
import
|
||||
in
|
||||
innerHeight
|
||||
innerWidth
|
||||
isFinite
|
||||
isNan
|
||||
java
|
||||
label
|
||||
length
|
||||
location
|
||||
locationbar
|
||||
menubar
|
||||
moveBy
|
||||
moveTo
|
||||
name
|
||||
navigate
|
||||
navigator
|
||||
netscape
|
||||
new
|
||||
onBlur
|
||||
onError
|
||||
onFocus
|
||||
onLoad
|
||||
onUnload
|
||||
open
|
||||
opener
|
||||
outerHeight
|
||||
outerWidth
|
||||
pageXoffset
|
||||
pageYoffset
|
||||
parent
|
||||
parseFloat
|
||||
parseInt
|
||||
personalbar
|
||||
print
|
||||
prompt
|
||||
prototype
|
||||
ref
|
||||
releaseEvents
|
||||
resizeBy
|
||||
resizeTo
|
||||
return
|
||||
routeEvent
|
||||
scroll
|
||||
scrollBy
|
||||
scrollTo
|
||||
scrollbars
|
||||
self
|
||||
setInterval
|
||||
setTimeout
|
||||
status
|
||||
statusbar
|
||||
stop
|
||||
sun
|
||||
switch
|
||||
taint
|
||||
this
|
||||
toString
|
||||
toolbar
|
||||
top
|
||||
typeof
|
||||
unescape
|
||||
untaint
|
||||
unwatch
|
||||
valueOf
|
||||
var
|
||||
void
|
||||
watch
|
||||
while
|
||||
window
|
||||
with
|
||||
62
.emacs.d/auto-complete/dict/php-mode
Normal file
62
.emacs.d/auto-complete/dict/php-mode
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
and
|
||||
array
|
||||
as
|
||||
break
|
||||
case
|
||||
catch
|
||||
cfunction
|
||||
class
|
||||
clone
|
||||
const
|
||||
continue
|
||||
declare
|
||||
default
|
||||
die
|
||||
do
|
||||
echo
|
||||
else
|
||||
elseif
|
||||
empty
|
||||
enddeclare
|
||||
endfor
|
||||
endforeach
|
||||
endif
|
||||
endswitch
|
||||
endwhile
|
||||
eval
|
||||
exit
|
||||
extends
|
||||
final
|
||||
for
|
||||
foreach
|
||||
function
|
||||
global
|
||||
goto
|
||||
if
|
||||
implements
|
||||
include
|
||||
include_once
|
||||
instanceof
|
||||
interface
|
||||
isset
|
||||
list
|
||||
namespace
|
||||
new
|
||||
old_function
|
||||
or
|
||||
print
|
||||
private
|
||||
protected
|
||||
public
|
||||
require
|
||||
require_once
|
||||
return
|
||||
static
|
||||
switch
|
||||
throw
|
||||
try
|
||||
unset
|
||||
use
|
||||
var
|
||||
while
|
||||
xor
|
||||
104
.emacs.d/auto-complete/dict/python-mode
Normal file
104
.emacs.d/auto-complete/dict/python-mode
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
__import__
|
||||
abs
|
||||
and
|
||||
any
|
||||
apply
|
||||
as
|
||||
assert
|
||||
basestring
|
||||
bin
|
||||
bool
|
||||
break
|
||||
buffer
|
||||
class
|
||||
cmp
|
||||
coerce
|
||||
complex
|
||||
continue
|
||||
def
|
||||
del
|
||||
delattr
|
||||
dict
|
||||
dir
|
||||
divmod
|
||||
elif
|
||||
else
|
||||
enumerate
|
||||
eval
|
||||
except
|
||||
exec
|
||||
execfile
|
||||
file
|
||||
filter
|
||||
finally
|
||||
float
|
||||
for
|
||||
format
|
||||
from
|
||||
frozenset
|
||||
getattr
|
||||
global
|
||||
globals
|
||||
hasattr
|
||||
hash
|
||||
help
|
||||
hex
|
||||
id
|
||||
if
|
||||
import
|
||||
in
|
||||
input
|
||||
int
|
||||
intern
|
||||
is
|
||||
isinstance
|
||||
issubclass
|
||||
iter
|
||||
lambda
|
||||
len
|
||||
list
|
||||
locals
|
||||
long
|
||||
map
|
||||
max
|
||||
min
|
||||
next
|
||||
not
|
||||
object
|
||||
oct
|
||||
open
|
||||
or
|
||||
ord
|
||||
pass
|
||||
pow
|
||||
print
|
||||
print
|
||||
property
|
||||
raise
|
||||
range
|
||||
raw_input
|
||||
reduce
|
||||
reload
|
||||
repr
|
||||
return
|
||||
reversed
|
||||
round
|
||||
set
|
||||
setattr
|
||||
slice
|
||||
sorted
|
||||
staticmethod
|
||||
str
|
||||
sum
|
||||
super
|
||||
try
|
||||
tuple
|
||||
type
|
||||
unichr
|
||||
unicode
|
||||
vars
|
||||
while
|
||||
with
|
||||
xrange
|
||||
yield
|
||||
zip
|
||||
181
.emacs.d/auto-complete/dict/ruby-mode
Normal file
181
.emacs.d/auto-complete/dict/ruby-mode
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
$!
|
||||
$"
|
||||
$$
|
||||
$&
|
||||
$'
|
||||
$*
|
||||
$+
|
||||
$,
|
||||
$-0
|
||||
$-F
|
||||
$-I
|
||||
$-K
|
||||
$-a
|
||||
$-d
|
||||
$-i
|
||||
$-l
|
||||
$-p
|
||||
$-v
|
||||
$-w
|
||||
$.
|
||||
$/
|
||||
$0
|
||||
$1
|
||||
$10
|
||||
$11
|
||||
$2
|
||||
$3
|
||||
$4
|
||||
$5
|
||||
$6
|
||||
$7
|
||||
$8
|
||||
$9
|
||||
$:
|
||||
$;
|
||||
$<
|
||||
$=
|
||||
$>
|
||||
$?
|
||||
$@
|
||||
$DEBUG
|
||||
$FILENAME
|
||||
$KCODE
|
||||
$LOADED_FEATURES
|
||||
$LOAD_PATH
|
||||
$PROGRAM_NAME
|
||||
$SAFE
|
||||
$VERBOSE
|
||||
$\
|
||||
$_
|
||||
$`
|
||||
$deferr
|
||||
$defout
|
||||
$stderr
|
||||
$stdin
|
||||
$stdout
|
||||
$~
|
||||
ARGF
|
||||
ARGV
|
||||
Array
|
||||
BEGIN
|
||||
DATA
|
||||
END
|
||||
ENV
|
||||
FALSE
|
||||
Float
|
||||
Integer
|
||||
NIL
|
||||
PLATFORM
|
||||
RELEASE_DATE
|
||||
RUBY_COPYRIGHT
|
||||
RUBY_DESCRIPTION
|
||||
RUBY_PATCHLEVEL
|
||||
RUBY_PLATFORM
|
||||
RUBY_RELEASE_DATE
|
||||
RUBY_VERSION
|
||||
SCRIPT_LINES__
|
||||
STDERR
|
||||
STDIN
|
||||
STDOUT
|
||||
String
|
||||
TOPLEVEL_BINDING
|
||||
TRUE
|
||||
VERSION
|
||||
__method__
|
||||
`
|
||||
abort
|
||||
alias
|
||||
and
|
||||
at_exit
|
||||
autoload
|
||||
autoload?
|
||||
begin
|
||||
binding
|
||||
block_given
|
||||
break
|
||||
callcc
|
||||
caller
|
||||
case
|
||||
catch
|
||||
chomp
|
||||
chomp!
|
||||
chop
|
||||
chop
|
||||
class
|
||||
def
|
||||
defined?
|
||||
do
|
||||
else
|
||||
elsif
|
||||
end
|
||||
ensure
|
||||
eval
|
||||
exec
|
||||
exit
|
||||
exit!
|
||||
fail
|
||||
false
|
||||
for
|
||||
fork
|
||||
format
|
||||
getc
|
||||
gets
|
||||
global_variables
|
||||
gsub
|
||||
gsub!
|
||||
if
|
||||
in
|
||||
iterator?
|
||||
lambda
|
||||
load
|
||||
local_varaibles
|
||||
loop
|
||||
module
|
||||
next
|
||||
nil
|
||||
not
|
||||
open
|
||||
or
|
||||
p
|
||||
printf
|
||||
proc
|
||||
putc
|
||||
puts
|
||||
raise
|
||||
rand
|
||||
readline
|
||||
readlines
|
||||
redo
|
||||
require
|
||||
require_relative
|
||||
rescue
|
||||
retry
|
||||
return
|
||||
scan
|
||||
select
|
||||
self
|
||||
set_trace_func
|
||||
sleep
|
||||
split
|
||||
sprintf
|
||||
srand
|
||||
sub
|
||||
sub!
|
||||
super
|
||||
syscall
|
||||
system
|
||||
test
|
||||
then
|
||||
throw
|
||||
trace_var
|
||||
trap
|
||||
true
|
||||
undef
|
||||
unless
|
||||
until
|
||||
untrace_var
|
||||
warn
|
||||
when
|
||||
while
|
||||
yield
|
||||
216
.emacs.d/auto-complete/dict/scheme-mode
Normal file
216
.emacs.d/auto-complete/dict/scheme-mode
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
case-lambda
|
||||
call/cc
|
||||
class
|
||||
define-class
|
||||
exit-handler
|
||||
field
|
||||
import
|
||||
inherit
|
||||
init-field
|
||||
interface
|
||||
let*-values
|
||||
let-values
|
||||
let/ec
|
||||
mixin
|
||||
opt-lambda
|
||||
override
|
||||
protect
|
||||
provide
|
||||
public
|
||||
rename
|
||||
require
|
||||
require-for-syntax
|
||||
syntax
|
||||
syntax-case
|
||||
syntax-error
|
||||
unit/sig
|
||||
unless
|
||||
when
|
||||
with-syntax
|
||||
and
|
||||
begin
|
||||
call-with-current-continuation
|
||||
call-with-input-file
|
||||
call-with-output-file
|
||||
case
|
||||
cond
|
||||
define
|
||||
define-syntax
|
||||
delay
|
||||
do
|
||||
dynamic-wind
|
||||
else
|
||||
for-each
|
||||
if
|
||||
lambda
|
||||
let
|
||||
let*
|
||||
let-syntax
|
||||
letrec
|
||||
letrec-syntax
|
||||
map
|
||||
or
|
||||
syntax-rules
|
||||
abs
|
||||
acos
|
||||
angle
|
||||
append
|
||||
apply
|
||||
asin
|
||||
assoc
|
||||
assq
|
||||
assv
|
||||
atan
|
||||
boolean?
|
||||
caar
|
||||
cadr
|
||||
call-with-input-file
|
||||
call-with-output-file
|
||||
call-with-values
|
||||
car
|
||||
cdddar
|
||||
cddddr
|
||||
cdr
|
||||
ceiling
|
||||
char->integer
|
||||
char-alphabetic?
|
||||
char-ci<=?
|
||||
char-ci<?
|
||||
char-ci=?
|
||||
char-ci>=?
|
||||
char-ci>?
|
||||
char-downcase
|
||||
char-lower-case?
|
||||
char-numeric?
|
||||
char-ready?
|
||||
char-upcase
|
||||
char-upper-case?
|
||||
char-whitespace?
|
||||
char<=?
|
||||
char<?
|
||||
char=?
|
||||
char>=?
|
||||
char>?
|
||||
char?
|
||||
close-input-port
|
||||
close-output-port
|
||||
complex?
|
||||
cons
|
||||
cos
|
||||
current-input-port
|
||||
current-output-port
|
||||
denominator
|
||||
display
|
||||
eof-object?
|
||||
eq?
|
||||
equal?
|
||||
eqv?
|
||||
eval
|
||||
even?
|
||||
exact->inexact
|
||||
exact?
|
||||
exp
|
||||
expt
|
||||
#f
|
||||
floor
|
||||
force
|
||||
gcd
|
||||
imag-part
|
||||
inexact->exact
|
||||
inexact?
|
||||
input-port?
|
||||
integer->char
|
||||
integer?
|
||||
interaction-environment
|
||||
lcm
|
||||
length
|
||||
list
|
||||
list->string
|
||||
list->vector
|
||||
list-ref
|
||||
list-tail
|
||||
list?
|
||||
load
|
||||
log
|
||||
magnitude
|
||||
make-polar
|
||||
make-rectangular
|
||||
make-string
|
||||
make-vector
|
||||
max
|
||||
member
|
||||
memq
|
||||
memv
|
||||
min
|
||||
modulo
|
||||
negative?
|
||||
newline
|
||||
not
|
||||
null-environment
|
||||
null?
|
||||
number->string
|
||||
number?
|
||||
numerator
|
||||
odd?
|
||||
open-input-file
|
||||
open-output-file
|
||||
output-port?
|
||||
pair?
|
||||
peek-char
|
||||
port?
|
||||
positive?
|
||||
procedure?
|
||||
quasiquote
|
||||
quote
|
||||
quotient
|
||||
rational?
|
||||
rationalize
|
||||
read
|
||||
read-char
|
||||
real-part
|
||||
real?
|
||||
remainder
|
||||
reverse
|
||||
round
|
||||
scheme-report-environment
|
||||
set!
|
||||
set-car!
|
||||
set-cdr!
|
||||
sin
|
||||
sqrt
|
||||
string
|
||||
string->list
|
||||
string->number
|
||||
string->symbol
|
||||
string-append
|
||||
string-ci<=?
|
||||
string-ci<?
|
||||
string-ci=?
|
||||
string-ci>=?
|
||||
string-ci>?
|
||||
string-copy
|
||||
string-fill!
|
||||
string-length
|
||||
string-ref
|
||||
string-set!
|
||||
string<=?
|
||||
string<?
|
||||
string=?
|
||||
string>=?
|
||||
string>?
|
||||
string?
|
||||
substring
|
||||
symbol->string
|
||||
symbol?
|
||||
#t
|
||||
tan
|
||||
transcript-off
|
||||
transcript-on
|
||||
truncate
|
||||
values
|
||||
vector
|
||||
vector->list
|
||||
vector-fill!
|
||||
vector-length
|
||||
vector-ref
|
||||
vector-set!
|
||||
172
.emacs.d/auto-complete/dict/tcl-mode
Normal file
172
.emacs.d/auto-complete/dict/tcl-mode
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
after
|
||||
append
|
||||
apply
|
||||
array
|
||||
auto_execok
|
||||
auto_import
|
||||
auto_load
|
||||
auto_load_index
|
||||
auto_mkindex
|
||||
auto_mkindex_old
|
||||
auto_qualify
|
||||
auto_reset
|
||||
bell
|
||||
binary
|
||||
bind
|
||||
bindtags
|
||||
break
|
||||
button
|
||||
canvas
|
||||
case
|
||||
catch
|
||||
cd
|
||||
chan
|
||||
checkbutton
|
||||
clipboard
|
||||
clock
|
||||
close
|
||||
concat
|
||||
continue
|
||||
destroy
|
||||
dict
|
||||
encoding
|
||||
entry
|
||||
eof
|
||||
error
|
||||
eval
|
||||
event
|
||||
exec
|
||||
exit
|
||||
expr
|
||||
fblocked
|
||||
fconfigure
|
||||
fcopy
|
||||
file
|
||||
fileevent
|
||||
flush
|
||||
focus
|
||||
font
|
||||
for
|
||||
foreach
|
||||
format
|
||||
frame
|
||||
gets
|
||||
glob
|
||||
global
|
||||
grab
|
||||
grid
|
||||
if
|
||||
image
|
||||
incr
|
||||
info
|
||||
interp
|
||||
join
|
||||
label
|
||||
labelframe
|
||||
lappend
|
||||
lassign
|
||||
lindex
|
||||
linsert
|
||||
list
|
||||
listbox
|
||||
llength
|
||||
load
|
||||
lower
|
||||
lrange
|
||||
lrepeat
|
||||
lreplace
|
||||
lreverse
|
||||
lsearch
|
||||
lset
|
||||
lsort
|
||||
menu
|
||||
menubutton
|
||||
message
|
||||
namespace
|
||||
open
|
||||
option
|
||||
pack
|
||||
package
|
||||
panedwindow
|
||||
pid
|
||||
pkg_mkIndex
|
||||
place
|
||||
proc
|
||||
puts
|
||||
pwd
|
||||
radiobutton
|
||||
raise
|
||||
read
|
||||
regexp
|
||||
registry
|
||||
regsub
|
||||
rename
|
||||
return
|
||||
scale
|
||||
scan
|
||||
scrollbar
|
||||
seek
|
||||
selection
|
||||
set
|
||||
socket
|
||||
source
|
||||
spinbox
|
||||
split
|
||||
string
|
||||
subst
|
||||
switch
|
||||
tclLog
|
||||
tclPkgSetup
|
||||
tclPkgUnknown
|
||||
tcl_findLibrary
|
||||
tell
|
||||
text
|
||||
time
|
||||
tk
|
||||
tk_chooseColor
|
||||
tk_chooseDirectory
|
||||
tk_getOpenFile
|
||||
tk_getSaveFile
|
||||
tk_menuSetFocus
|
||||
tk_messageBox
|
||||
tk_popup
|
||||
tk_textCopy
|
||||
tk_textCut
|
||||
tk_textPaste
|
||||
tkwait
|
||||
toplevel
|
||||
ttk::button
|
||||
ttk::checkbutton
|
||||
ttk::combobox
|
||||
ttk::entry
|
||||
ttk::focusFirst
|
||||
ttk::frame
|
||||
ttk::label
|
||||
ttk::labelframe
|
||||
ttk::menubutton
|
||||
ttk::notebook
|
||||
ttk::paned
|
||||
ttk::panedwindow
|
||||
ttk::progressbar
|
||||
ttk::radiobutton
|
||||
ttk::scale
|
||||
ttk::scrollbar
|
||||
ttk::separator
|
||||
ttk::setTheme
|
||||
ttk::sizegrip
|
||||
ttk::style
|
||||
ttk::takefocus
|
||||
ttk::themes
|
||||
ttk::treeview
|
||||
trace
|
||||
unknown
|
||||
unload
|
||||
unset
|
||||
update
|
||||
uplevel
|
||||
upvar
|
||||
variable
|
||||
vwait
|
||||
while
|
||||
winfo
|
||||
wm
|
||||
BIN
.emacs.d/auto-complete/doc/ac-fuzzy.png
Normal file
BIN
.emacs.d/auto-complete/doc/ac-fuzzy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
.emacs.d/auto-complete/doc/ac-isearch.png
Normal file
BIN
.emacs.d/auto-complete/doc/ac-isearch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
.emacs.d/auto-complete/doc/ac.png
Normal file
BIN
.emacs.d/auto-complete/doc/ac.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
96
.emacs.d/auto-complete/doc/changes.ja.txt
Normal file
96
.emacs.d/auto-complete/doc/changes.ja.txt
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
Title: Auto Complete Mode - 変更点
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode 変更点
|
||||
=========================
|
||||
|
||||
[Index](index.ja.txt)
|
||||
|
||||
\[[English](changes.txt)]
|
||||
|
||||
[ユーザーマニュアル](manual.ja.txt)も参照してください。
|
||||
|
||||
v1.3の変更点 {#Changes_v1.3}
|
||||
------------
|
||||
|
||||
v1.3の主な変更点は次のようになります。
|
||||
|
||||
### 新しいオプション ### {#New_Options_v1.3}
|
||||
|
||||
* [`ac-disable-faces`](manual.ja.txt#ac-disable-faces)
|
||||
* [`ac-show-menu-immediately-on-auto-complete`](manual.ja.txt#ac-show-menu-immediately-on-auto-complete)
|
||||
* [`ac-expand-on-auto-complete`](manual.ja.txt#ac-expand-on-auto-complete)
|
||||
* [`ac-use-menu-map`](manual.ja.txt#ac-use-menu-map)
|
||||
|
||||
### 新しい情報源 ### {#New_Sources_v1.3}
|
||||
|
||||
* [`ac-source-semantic-raw`](manual.ja.txt#ac-source-semantic-raw)
|
||||
* [`ac-source-css-property`](manual.ja.txt#ac-source-css-property)
|
||||
|
||||
### 新しい情報源のプロパティ ### {#New_Source_Properties_v1.3}
|
||||
|
||||
* [`summary`](manual.ja.txt#summary)
|
||||
* [`available`](manual.ja.txt#available)
|
||||
|
||||
### 新しい辞書 ### {#New_Dictionaries_v1.3}
|
||||
|
||||
* tcl-mode
|
||||
* scheme-mode
|
||||
|
||||
### 変更された挙動 ### {#Changed_Behaviors_v1.3}
|
||||
|
||||
* 補完候補の長さを考慮したスコアリング(文字列長でソート)
|
||||
|
||||
### 修正されたバグ ### {#Fixed_Bugs_v1.3}
|
||||
|
||||
* Emacs 22.1でのエラー
|
||||
* `flyspell-mode`との衝突(`M-x flyspell-workaround`で解決)
|
||||
|
||||
### その他 ### {#Others_v1.3}
|
||||
|
||||
* 単語収集の速度を改善 (#18)
|
||||
* [pos-tip.el](manual.ja.txt#.E3.83.98.E3.83.AB.E3.83.97.E3.82.92.E7.B6.BA.E9.BA.97.E3.81.AB.E8.A1.A8.E7.A4.BA.E3.81.99.E3.82.8B)との協調
|
||||
* Yasnippet 0.61のサポート
|
||||
* 多くのバグ修正
|
||||
|
||||
v1.2の変更点 {#Changes_v1.2}
|
||||
------------
|
||||
|
||||
v1.0からv1.2の主な変更点は次のようになります。
|
||||
|
||||
### 新機能 ### {#New_Features_v1.2}
|
||||
|
||||
* [曖昧マッチによる補完](manual.ja.txt#.E6.9B.96.E6.98.A7.E3.83.9E.E3.83.83.E3.83.81.E3.81.AB.E3.82.88.E3.82.8B.E8.A3.9C.E5.AE.8C)
|
||||
* [辞書による補完](manual.ja.txt#.E8.BE.9E.E6.9B.B8.E3.81.AB.E3.82.88.E3.82.8B.E8.A3.9C.E5.AE.8C)
|
||||
* [補完候補の絞り込み](manual.ja.txt#.E8.A3.9C.E5.AE.8C.E5.80.99.E8.A3.9C.E3.81.AE.E7.B5.9E.E3.82.8A.E8.BE.BC.E3.81.BF)
|
||||
* [補完推測機能](manual.ja.txt#.E8.A3.9C.E5.AE.8C.E6.8E.A8.E6.B8.AC.E6.A9.9F.E8.83.BD)
|
||||
* [トリガーキー](manual.ja.txt#.E3.83.88.E3.83.AA.E3.82.AC.E3.83.BC.E3.82.AD.E3.83.BC)
|
||||
* [ヘルプ](manual.ja.txt#.E3.83.98.E3.83.AB.E3.83.97)
|
||||
|
||||
### 新しいコマンド ### {#New_Commands_v1.2}
|
||||
|
||||
* [`auto-complete`](manual.ja.txt#auto-complete.E3.82.B3.E3.83.9E.E3.83.B3.E3.83.89)
|
||||
|
||||
### 新しいオプション ### {#New_Options_v1.2}
|
||||
|
||||
* [`ac-delay`](manual.ja.txt#ac-delay)
|
||||
* [`ac-auto-show-menu`](manual.ja.txt#ac-auto-show-menu)
|
||||
* [`ac-use-fuzzy`](manual.ja.txt#ac-use-fuzzy)
|
||||
* [`ac-use-comphist`](manual.ja.txt#ac-use-comphist)
|
||||
* [`ac-ignores`](manual.ja.txt#ac-ignores)
|
||||
* [`ac-ignore-case`](manual.ja.txt#ac-ignore-case)
|
||||
* [`ac-mode-map`](manual.ja.txt#ac-mode-map)
|
||||
|
||||
### 新しい情報源 ### {#New_Sources_v1.2}
|
||||
|
||||
* [`ac-source-dictionary`](manual.ja.txt#ac-source-dictionary)
|
||||
|
||||
### 変更された挙動 ### {#Changed_Behaviors_v1.2}
|
||||
|
||||
* 補完の開始が遅延されるようになりました ([`ac-delay`](manual.ja.txt#ac-delay))
|
||||
* 補完メニューの表示が遅延されるようになりました ([`ac-auto-show-menu`](manual.ja.txt#ac-auto-show-menu))
|
||||
|
||||
### その他 ### {#Others_v1.2}
|
||||
|
||||
* 多くのバグ修正
|
||||
* パフォーマンスの改善
|
||||
96
.emacs.d/auto-complete/doc/changes.txt
Normal file
96
.emacs.d/auto-complete/doc/changes.txt
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
Title: Auto Complete Mode - Changes
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode Changes
|
||||
==========================
|
||||
|
||||
[Index](index.txt)
|
||||
|
||||
\[[Japanese](changes.ja.txt)]
|
||||
|
||||
See also [documentation](manual.txt).
|
||||
|
||||
v1.3 Changes {#Changes_v1.3}
|
||||
------------
|
||||
|
||||
Major changes in v1.3.
|
||||
|
||||
### New Options ### {#New_Options_v1.3}
|
||||
|
||||
* [`ac-disable-faces`](manual.txt#ac-disable-faces)
|
||||
* [`ac-show-menu-immediately-on-auto-complete`](manual.txt#ac-show-menu-immediately-on-auto-complete)
|
||||
* [`ac-expand-on-auto-complete`](manual.txt#ac-expand-on-auto-complete)
|
||||
* [`ac-use-menu-map`](manual.txt#ac-use-menu-map)
|
||||
|
||||
### New Sources ### {#New_Sources_v1.3}
|
||||
|
||||
* [`ac-source-semantic-raw`](manual.txt#ac-source-semantic-raw)
|
||||
* [`ac-source-css-property`](manual.txt#ac-source-css-property)
|
||||
|
||||
### New Source Properties ### {#New_Source_Properties_v1.3}
|
||||
|
||||
* [`summary`](manual.txt#summary)
|
||||
* [`available`](manual.txt#available)
|
||||
|
||||
### New Dictionaries ### {#New_Dictionaries_v1.3}
|
||||
|
||||
* tcl-mode
|
||||
* scheme-mode
|
||||
|
||||
### Changed Behaviors ### {#Changed_Behaviors_v1.3}
|
||||
|
||||
* Scoring regarding to candidate length (sort by length)
|
||||
|
||||
### Fixed Bugs ### {#Fixed_Bugs_v1.3}
|
||||
|
||||
* Error on Emacs 22.1
|
||||
* `flyspell-mode` confliction (`M-x flyspell-workaround`)
|
||||
|
||||
### Others ### {#Others_v1.3}
|
||||
|
||||
* Improved word completion performance (#18)
|
||||
* Cooperate with [pos-tip.el](manual.txt#Show_help_beautifully)
|
||||
* Yasnippet 0.61 support
|
||||
* Fix many bugs
|
||||
|
||||
v1.2 Changes {#Changes_v1.2}
|
||||
------------
|
||||
|
||||
Major changes in v1.2 since v1.0.
|
||||
|
||||
### New Features ### {#New_Features_v1.2}
|
||||
|
||||
* [Completion by Fuzzy Matching](manual.txt#Completion_by_Fuzzy_Matching)
|
||||
* [Completion by Dictionary](manual.txt#Completion_by_Dictionary)
|
||||
* [Incremental Filtering](manual.txt#Filtering_Completion_Candidates)
|
||||
* [Intelligent Candidate Suggestion](manual.txt#Candidate_Suggestion)
|
||||
* [Trigger Key](manual.txt#Trigger_Key)
|
||||
* [Help](manual.txt#Help)
|
||||
|
||||
### New Commands ### {#New_Commands_v1.2}
|
||||
|
||||
* [`auto-complete`](manual.txt#auto-complete_command)
|
||||
|
||||
### New Options ### {#New_Options_v1.2}
|
||||
|
||||
* [`ac-delay`](manual.txt#ac-delay)
|
||||
* [`ac-auto-show-menu`](manual.txt#ac-auto-show-menu)
|
||||
* [`ac-use-fuzzy`](manual.txt#ac-use-fuzzy)
|
||||
* [`ac-use-comphist`](manual.txt#ac-use-comphist)
|
||||
* [`ac-ignores`](manual.txt#ac-ignores)
|
||||
* [`ac-ignore-case`](manual.txt#ac-ignore-case)
|
||||
* [`ac-mode-map`](manual.txt#ac-mode-map)
|
||||
|
||||
### New Sources ### {#New_Sources_v1.2}
|
||||
|
||||
* [`ac-source-dictionary`](manual.txt#ac-source-dictionary)
|
||||
|
||||
### Changed Behaviors ### {#Changed_Behaviors_v1.2}
|
||||
|
||||
* Completion is now delayed to start ([`ac-delay`](manual.txt#ac-delay))
|
||||
* Completion menu is now delayed to show ([`ac-auto-show-menu`](manual.txt#ac-auto-show-menu))
|
||||
|
||||
### Others ### {#Others_v1.2}
|
||||
|
||||
* Fix many bugs
|
||||
* Improve performance
|
||||
11
.emacs.d/auto-complete/doc/demo.txt
Normal file
11
.emacs.d/auto-complete/doc/demo.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Title: Auto Complete Mode - Demo
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode Demo
|
||||
=======================
|
||||
|
||||
[Index](index.txt)
|
||||
|
||||
[YouTube mirror](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
|
||||
<video src="ac-demo.ogv" controls="true" width="720" height="672" />
|
||||
86
.emacs.d/auto-complete/doc/index.ja.txt
Normal file
86
.emacs.d/auto-complete/doc/index.ja.txt
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
Title: Auto Complete Mode - GNU Emacsのための最も賢い自動補完機能
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
*[GNU Emacs][]のための最も賢い自動補完機能*
|
||||
|
||||
\[[English](index.txt)]
|
||||
|
||||
* * * *
|
||||
|
||||
{toc}
|
||||
|
||||
* * * *
|
||||
|
||||
Auto Complete Modeとは
|
||||
----------------------
|
||||
|
||||
Auto Complete Modeは[GNU Emacs][]のための最も賢い自動補完機能です。従来の使いづらい補完インターフェースを一新し、ユーザーがより本質的な作業に集中できる環境を提供します。
|
||||
|
||||
特徴
|
||||
----
|
||||
|
||||
* 視覚的な操作感
|
||||
* 統計的手法による補完オーバーヘッドの削減
|
||||
* 拡張性
|
||||
|
||||
スクリーンショット
|
||||
------------------
|
||||
|
||||
  
|
||||
|
||||
デモ
|
||||
----
|
||||
|
||||
* [YouTube](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
* [Ogg Theora with video tag](demo.txt)
|
||||
|
||||
ダウンロード
|
||||
------------
|
||||
|
||||
### 最新安定板 (v1.3) ### {#Latest_Stable}
|
||||
|
||||
[v1.3の変更点](changes.ja.txt#Changes_v1.3)
|
||||
|
||||
* [auto-complete-1.3.tar.bz2](http://cx4a.org/pub/auto-complete/auto-complete-1.3.tar.bz2)
|
||||
* [auto-complete-1.3.tar.zip](http://cx4a.org/pub/auto-complete/auto-complete-1.3.zip)
|
||||
|
||||
### v1.2 ###
|
||||
|
||||
[v1.2の変更点](changes.ja.txt#Changes_v1.2)
|
||||
|
||||
* [auto-complete-1.2.tar.bz2](http://cx4a.org/pub/auto-complete/auto-complete-1.2.tar.bz2)
|
||||
* [auto-complete-1.2.tar.zip](http://cx4a.org/pub/auto-complete/auto-complete-1.2.zip)
|
||||
|
||||
ユーザーマニュアル
|
||||
------------------
|
||||
|
||||
[Auto Complete Modeユーザーマニュアル](manual.ja.txt)
|
||||
|
||||
利用者の声
|
||||
----------
|
||||
|
||||
利用者の声をぜひお聞かせください。あなたの名前(匿名希望可)とコメントをそえて[tomo@cx4a.org](mailto: tomo@cx4a.org)までメールでお願いします。どんなコメントでも歓迎です。
|
||||
|
||||
ソースコード
|
||||
------------
|
||||
|
||||
ソースコードは以下のGitリポジトリから取得できます。
|
||||
|
||||
* <http://cx4a.org/repo/auto-complete.git>
|
||||
* <http://github.com/m2ym/auto-complete> (GitHubミラー)
|
||||
|
||||
バグレポート
|
||||
------------
|
||||
|
||||
[Auto Complete Modeのバグトラッキングシステム](http://cx4a.org/redmine/projects/auto-complete-mode)に新しいチケットを登録してください。
|
||||
|
||||
ライセンス
|
||||
----------
|
||||
|
||||
このソフトウェアは[GPLv3][]のもとで配布されます。
|
||||
|
||||
[GNU Emacs]: http://www.gnu.org/software/emacs/
|
||||
[GPLv3]: http://gplv3.fsf.org/
|
||||
86
.emacs.d/auto-complete/doc/index.txt
Normal file
86
.emacs.d/auto-complete/doc/index.txt
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
Title: Auto Complete Mode - The most intelligent auto-completion extension for GNU Emacs
|
||||
CSS: style.css
|
||||
|
||||
Auto Complete Mode
|
||||
==================
|
||||
|
||||
*The most intelligent auto-completion extension for [GNU Emacs][]*
|
||||
|
||||
\[[Japanese](index.ja.txt)]
|
||||
|
||||
* * * *
|
||||
|
||||
{toc}
|
||||
|
||||
* * * *
|
||||
|
||||
What is Auto Complete Mode?
|
||||
---------------------------
|
||||
|
||||
Auto Complete Mode is the most intelligent auto-completion extension for [GNU Emacs][]. Auto Complete Mode renews an old completion interface and provides an environment that makes users could be more concentrate on their own works.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Visual interface
|
||||
* Reduce overhead of completion by using statistic method
|
||||
* Extensibility
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
  
|
||||
|
||||
Demo
|
||||
----
|
||||
|
||||
* [YouTube](http://www.youtube.com/watch?v=rGVVnDxwJYE)
|
||||
* [Ogg Theora with video tag](demo.txt)
|
||||
|
||||
Downloads
|
||||
---------
|
||||
|
||||
### Latest Stable (v1.3) ### {#Latest_Stable}
|
||||
|
||||
[Changes v1.3](changes.txt#Changes_v1.3)
|
||||
|
||||
* [auto-complete-1.3.tar.bz2](/pub/auto-complete/auto-complete-1.3.tar.bz2)
|
||||
* [auto-complete-1.3.zip](/pub/auto-complete/auto-complete-1.3.zip)
|
||||
|
||||
### v1.2 ###
|
||||
|
||||
[Changes v1.2](changes.txt#Changes_v1.2)
|
||||
|
||||
* [auto-complete-1.2.tar.bz2](/pub/auto-complete/auto-complete-1.2.tar.bz2)
|
||||
* [auto-complete-1.2.zip](/pub/auto-complete/auto-complete-1.2.zip)
|
||||
|
||||
User Manual
|
||||
-----------
|
||||
|
||||
[Auto Complete Mode User Manual](manual.txt)
|
||||
|
||||
User's Voice
|
||||
------------
|
||||
|
||||
Please send me a comment with your name (or anonymous) to [tomo@cx4a.org](mailto: tomo@cx4a.org) if you like it. Any comments are welcome.
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
Git repositories are available:
|
||||
|
||||
* <http://cx4a.org/repo/auto-complete.git>
|
||||
* <http://github.com/m2ym/auto-complete> (GitHub mirror)
|
||||
|
||||
Reporting Bugs
|
||||
--------------
|
||||
|
||||
Visit [Auto Complete Mode Bug Tracking System](http://cx4a.org/redmine/projects/auto-complete-mode) and create a new ticket.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This software is distributed under the term of [GPLv3][]+.
|
||||
|
||||
[GNU Emacs]: http://www.gnu.org/software/emacs/
|
||||
[GPLv3]: http://gplv3.fsf.org/
|
||||
1067
.emacs.d/auto-complete/doc/manual.ja.txt
Normal file
1067
.emacs.d/auto-complete/doc/manual.ja.txt
Normal file
File diff suppressed because it is too large
Load diff
1062
.emacs.d/auto-complete/doc/manual.txt
Normal file
1062
.emacs.d/auto-complete/doc/manual.txt
Normal file
File diff suppressed because it is too large
Load diff
27
.emacs.d/auto-complete/doc/style.css
Normal file
27
.emacs.d/auto-complete/doc/style.css
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
body {
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0.5em 2em;
|
||||
padding: 0.5em;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-left: 1em;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: white;
|
||||
}
|
||||
45
.emacs.d/auto-complete/etc/install.el
Normal file
45
.emacs.d/auto-complete/etc/install.el
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
(require 'cl)
|
||||
|
||||
(when (or (not (featurep 'auto-complete))
|
||||
(yes-or-no-p "You are trying to upgrade auto-complete within an existed Emacs which has loaded its older version.
|
||||
It causes sometimes errors or installation fault. Are you sure? "))
|
||||
(let* ((basedir (file-name-directory (directory-file-name (file-name-directory load-file-name))))
|
||||
(default-dir "~/.emacs.d/")
|
||||
(todir (or (car command-line-args-left)
|
||||
(read-file-name "Install to: " default-dir default-dir)))
|
||||
(basedictdir (concat basedir "/dict"))
|
||||
(todictdir (concat todir "/ac-dict")))
|
||||
(cond
|
||||
((not (file-directory-p basedir))
|
||||
(error "Base directory is not found"))
|
||||
((or (eq (length todir) 0)
|
||||
(not (file-directory-p todir)))
|
||||
(error "To directory is empty or not found"))
|
||||
(t
|
||||
(message "Installing to %s from %s" todir basedir)
|
||||
(add-to-list 'load-path basedir)
|
||||
(make-directory todictdir t)
|
||||
(loop for file in (directory-files basedir t "^.*\\.el$")
|
||||
do (byte-compile-file file))
|
||||
(loop for file in (directory-files basedir t "^.*\\.elc?$")
|
||||
do (copy-file file todir t))
|
||||
(loop for file in (directory-files basedictdir t "^[^\\.]")
|
||||
do (copy-file file todictdir t))
|
||||
|
||||
(let ((msg (concat "Successfully installed!
|
||||
|
||||
Add the following code to your .emacs:
|
||||
|
||||
"
|
||||
(if (and (not (member (expand-file-name todir) load-path))
|
||||
(not (member (concat (expand-file-name todir) "/") load-path)))
|
||||
(format "(add-to-list 'load-path \"%s\")\n" todir)
|
||||
"")
|
||||
"(require 'auto-complete-config)\n"
|
||||
(format "(add-to-list 'ac-dictionary-directories \"%s\")\n" todictdir)
|
||||
"(ac-config-default)\n")))
|
||||
(if noninteractive
|
||||
(princ-list msg)
|
||||
(switch-to-buffer "*Installation Result*")
|
||||
(erase-buffer)
|
||||
(insert msg)))))))
|
||||
202
.emacs.d/auto-complete/etc/test.txt
Normal file
202
.emacs.d/auto-complete/etc/test.txt
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
-*- org -*-
|
||||
|
||||
* How to test
|
||||
You can read this testcase document by following some rules.
|
||||
|
||||
- (Code) is a code you should evaluate for testing the fixture.
|
||||
- (Expect) is a expected result of your test.
|
||||
If no (Expect) is given, it means Emacs doesn't display any errors.
|
||||
- (Assume) is a code you should evaluate before test.
|
||||
|
||||
If no sources you should use are not given in each fixture, we assumes that
|
||||
you use following sources.
|
||||
|
||||
Code:
|
||||
(defvar ac-source-test
|
||||
'((candidates list "Foo" "FooBar" "Bar" "Baz" "LongLongLine")))
|
||||
(defvar ac-source-action-test
|
||||
'((candidates list "Action1" "Action2")
|
||||
(action . (lambda () (message "Done!")))))
|
||||
(setq ac-sources '(ac-source-test ac-source-action-test))
|
||||
|
||||
* Setup
|
||||
|
||||
** Load auto-complete
|
||||
Code:
|
||||
(require 'auto-complete)
|
||||
(require 'auto-complete-config)
|
||||
|
||||
** Enable/disable auto-complete by M-x auto-complete-mode
|
||||
|
||||
** Use global-auto-complete-mode
|
||||
Code:
|
||||
(global-auto-complete-mode t)
|
||||
|
||||
Expect:
|
||||
No errors. auto-complete-mode will be enabled automatically.
|
||||
|
||||
* Auto-completion
|
||||
|
||||
** Type some string at *scratch* buffer
|
||||
Expect:
|
||||
Menu contains words in the current buffer.
|
||||
|
||||
** Type some string at right of the window
|
||||
Expect:
|
||||
Menu will be shown in right-to-left direction without any window scrolling.
|
||||
|
||||
** Continue to type some string above case
|
||||
Expect:
|
||||
Menu will never be disrupted.
|
||||
|
||||
** Type some string at the right of window with truncate-lines enabled
|
||||
Assume:
|
||||
(setq truncate-lines t)
|
||||
|
||||
** Type some string at the bottom of window
|
||||
Expect:
|
||||
Menu will be shown in bottom-to-top direction without any window scrolling.
|
||||
|
||||
** Delete a character at the word
|
||||
Expect:
|
||||
Completion will be started.
|
||||
|
||||
** Type some string so that a menu overlaps the end of buffer that doesn't have newline at the end
|
||||
Expect:
|
||||
Menu will be shown correctly.
|
||||
Newline at the end is not seen.
|
||||
|
||||
** Type some string with ac-auto-start nil
|
||||
Assume:
|
||||
(setq ac-auto-start nil)
|
||||
|
||||
Expect:
|
||||
Completion will never be started automatically.
|
||||
|
||||
** Type some string with ac-auto-start t
|
||||
Assume:
|
||||
(setq ac-auto-start t)
|
||||
|
||||
Expect:
|
||||
Completion will be started automatically if possible.
|
||||
|
||||
** Type 1 character with ac-auto-start 2
|
||||
Assume:
|
||||
(setq ac-auto-start 2)
|
||||
|
||||
Expect:
|
||||
Completion will never be started automatically.
|
||||
|
||||
** Type 2 characters with ac-auto-start 2
|
||||
Assume:
|
||||
(setq ac-auto-start 2)
|
||||
|
||||
Expect:
|
||||
Completion will be started automatically if possible.
|
||||
|
||||
** Type F
|
||||
Expect:
|
||||
Menu contains "Foo" and "FooBar" as candidates.
|
||||
Inline completion appears and it contains "oo" as common-part.
|
||||
|
||||
** Type TAB while completion with ac-dwim disabled
|
||||
Assume:
|
||||
(setq ac-dwim nil)
|
||||
|
||||
Expect:
|
||||
(a) If there is common-part of candidates, auto-complete expands it.
|
||||
(b) If the prefix equals to the first of candidates, auto-complete selects next candidate.
|
||||
(c) Othewise, auto-complete expands selected candidate.
|
||||
|
||||
** Type TAB while completion with ac-dwim enabled
|
||||
Assume:
|
||||
(setq ac-dwim t)
|
||||
|
||||
Expect:
|
||||
(a) If there is common-part of candidates, auto-complete expands it.
|
||||
(b) If only one candidate remains, or if it is done after selecting be ac-previous/ac-next,
|
||||
auto-complete simulates ac-complete.
|
||||
- If its candidate has an action, the action will be invoked. ("Action1" and "Action2" have an action)
|
||||
- Expand its candidate.
|
||||
(c) If the prefix equals to the first of candidates, auto-complete selects next candidate.
|
||||
(d) Othewise, auto-complete expands selected candidate.
|
||||
|
||||
** Type RET while completion
|
||||
Expect:
|
||||
Completion will be done for selected candidate.
|
||||
If its candidate has an action, the action will be invoked.
|
||||
Use "Action" for the prefix for test.
|
||||
|
||||
* Configuration
|
||||
|
||||
** Change menu height
|
||||
Code:
|
||||
(setq ac-menu-height 20)
|
||||
|
||||
Expect:
|
||||
Up to 20 candidates will be shown in a menu.
|
||||
|
||||
** Use trigger key facility
|
||||
Code:
|
||||
(ac-set-trigger-key "TAB")
|
||||
|
||||
Expect:
|
||||
Now you can use TAB for auto-completion.
|
||||
It is enabled only when
|
||||
(a) After insertion/deletion command
|
||||
(b) With prefix (C-u TAB)
|
||||
Otherwise, it behaves as default.
|
||||
Generally, it is used with ac-auto-start disabled.
|
||||
|
||||
** Use ac-mode-map
|
||||
Code:
|
||||
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
|
||||
|
||||
Expect:
|
||||
Now you can start auto-complete with typing M-TAB anywhere.
|
||||
|
||||
** Change default ac-sources
|
||||
Code:
|
||||
(setq-default ac-sources '(ac-source-words-in-all-buffer))
|
||||
|
||||
Expect:
|
||||
Now default ac-sources has been changed for newly opened buffers.
|
||||
|
||||
* Builtin sources
|
||||
|
||||
** ac-source-words-in-buffer
|
||||
Expect:
|
||||
Candidates will be words in the current buffer.
|
||||
|
||||
** ac-source-words-in-all-buffer
|
||||
Expect:
|
||||
Candidates will be words in all buffer.
|
||||
|
||||
** ac-source-words-in-same-mode-buffers
|
||||
Expect:
|
||||
Candidates will be words for buffers which major-mode same to
|
||||
the current buffer's one.
|
||||
|
||||
** ac-source-symbols
|
||||
Expect:
|
||||
Candidates will be all Emacs Lisp symbols.
|
||||
|
||||
** ac-source-abbrev
|
||||
Expect:
|
||||
Candidates will be abbreviations of local-abbrev-table and global-abbrev-table.
|
||||
|
||||
** ac-source-files-in-current-dir
|
||||
Expect:
|
||||
Candidates will be files contained by the current directory (default-directory).
|
||||
|
||||
** ac-source-filename
|
||||
Expect:
|
||||
Candidates will be absolute/relative file name.
|
||||
This source will be executed when the prefix seems to be file name.
|
||||
That is, the prefix contains slash (/) and a string between first to
|
||||
last flash is a valid directory.
|
||||
When ac-complete, this continues to complete if the prefix is a valid directory.
|
||||
|
||||
** ac-source-imenu
|
||||
Expect:
|
||||
Candidates will be a node of imenu tree.
|
||||
255
.emacs.d/auto-complete/fuzzy.el
Normal file
255
.emacs.d/auto-complete/fuzzy.el
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
;;; fuzzy.el --- Fuzzy matching utilities
|
||||
|
||||
;; Copyright (C) 2010 Tomohiro Matsuyama
|
||||
|
||||
;; Author: Tomohiro Matsuyama <m2ym.pub@gmail.com>
|
||||
;; Keywords: convenience
|
||||
|
||||
;; 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 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
(require 'regexp-opt)
|
||||
|
||||
(defgroup fuzzy nil
|
||||
"Fuzzy matching utilities."
|
||||
:group 'convenience
|
||||
:prefix "fuzzy-")
|
||||
|
||||
(defcustom fuzzy-accept-error-rate 0.10
|
||||
"Error threshold."
|
||||
:group 'fuzzy)
|
||||
|
||||
(defvar fuzzy-accept-length-difference 2)
|
||||
|
||||
(defvar fuzzy-regexp-some-char (format "\\w\\{0,%s\\}" fuzzy-accept-length-difference))
|
||||
|
||||
|
||||
|
||||
;;; Functions
|
||||
|
||||
(defun fuzzy-reverse-string (string)
|
||||
(apply 'string (nreverse (append string nil))))
|
||||
|
||||
(defun fuzzy-regexp-compile (string)
|
||||
(labels ((oddp (n) (eq (logand n 1) 1))
|
||||
(evenp (n) (eq (logand n 1) 0))
|
||||
(opt (n) (regexp-opt-charset (append (substring string
|
||||
(max 0 (- n 1))
|
||||
(min (length string) (+ n 2))) nil))))
|
||||
(concat
|
||||
"\\("
|
||||
(loop for i below (length string)
|
||||
for c = (if (evenp i) (opt i) fuzzy-regexp-some-char)
|
||||
concat c)
|
||||
"\\|"
|
||||
(loop for i below (length string)
|
||||
for c = (if (oddp i) (opt i) fuzzy-regexp-some-char)
|
||||
concat c)
|
||||
"\\)")))
|
||||
|
||||
(defalias 'fuzzy-edit-distance 'fuzzy-jaro-winkler-distance)
|
||||
|
||||
(defun fuzzy-jaro-winkler-distance (s1 s2)
|
||||
"http://en.wikipedia.org/wiki/Jaro-Winkler_distance"
|
||||
(let* ((l1 (length s1))
|
||||
(l2 (length s2))
|
||||
(r (max 1 (1- (/ (max l1 l2) 2))))
|
||||
(m 0)
|
||||
(tr 0)
|
||||
(p 0)
|
||||
cs1 cs2)
|
||||
(loop with seen = (make-vector l2 nil)
|
||||
for i below l1
|
||||
for c1 = (aref s1 i) do
|
||||
(loop for j from (max 0 (- i r)) below (min l2 (+ i r))
|
||||
for c2 = (aref s2 j)
|
||||
if (and (char-equal c1 c2)
|
||||
(null (aref seen j))) do
|
||||
(push c1 cs1)
|
||||
(aset seen j c2)
|
||||
(incf m)
|
||||
and return nil)
|
||||
finally
|
||||
(setq cs1 (nreverse cs1)
|
||||
cs2 (loop for i below l2
|
||||
for c = (aref seen i)
|
||||
if c collect c)))
|
||||
(loop for c1 in cs1
|
||||
for c2 in cs2
|
||||
if (not (char-equal c1 c2)) do
|
||||
(incf tr))
|
||||
(loop for i below (min m 5)
|
||||
for c1 across s1
|
||||
for c2 across s2
|
||||
while (char-equal c1 c2) do
|
||||
(incf p))
|
||||
(if (eq m 0)
|
||||
0.0
|
||||
(setq m (float m))
|
||||
(let* ((dj (/ (+ (/ m l1) (/ m l2) (/ (- m (/ tr 2)) m)) 3))
|
||||
(dw (+ dj (* p 0.1 (- 1 dj)))))
|
||||
dw))))
|
||||
|
||||
;; this function should be compiled
|
||||
(byte-compile 'fuzzy-jaro-winkler-distance)
|
||||
|
||||
(defun fuzzy-match (s1 s2 &optional function)
|
||||
(or function (setq function 'fuzzy-edit-distance))
|
||||
(and (<= (abs (- (length s1) (length s2)))
|
||||
fuzzy-accept-length-difference)
|
||||
(>= (funcall function s1 s2)
|
||||
(- 1 fuzzy-accept-error-rate))))
|
||||
|
||||
(defun fuzzy-all-completions (string collection)
|
||||
"all-completions family with fuzzy matching."
|
||||
(loop with length = (length string)
|
||||
for str in collection
|
||||
for s = (substring str 0 (min (length str)
|
||||
(+ length fuzzy-accept-length-difference)))
|
||||
if (fuzzy-match string s)
|
||||
collect str))
|
||||
|
||||
|
||||
|
||||
;;; Search and Incremental Search
|
||||
|
||||
(defvar fuzzy-search-cache nil)
|
||||
(defvar fuzzy-search-cache-string nil)
|
||||
|
||||
(defun fuzzy-search-cache-activate ()
|
||||
(setq fuzzy-search-cache (make-hash-table))
|
||||
(setq fuzzy-search-cache-string nil))
|
||||
|
||||
(defun fuzzy-search-cache-deactive ()
|
||||
(setq fuzzy-search-cache nil)
|
||||
(setq fuzzy-search-cache-string nil))
|
||||
|
||||
(defun fuzzy-search-edit-distance (s1 s2)
|
||||
(or (and fuzzy-search-cache
|
||||
(cond
|
||||
((null fuzzy-search-cache-string)
|
||||
(setq fuzzy-search-cache-string s1)
|
||||
nil)
|
||||
((not (equal fuzzy-search-cache-string s1))
|
||||
(setq fuzzy-search-cache-string s1)
|
||||
(clrhash fuzzy-search-cache)
|
||||
nil)
|
||||
(t))
|
||||
(gethash s2 fuzzy-search-cache))
|
||||
(let ((d (fuzzy-edit-distance s1 s2)))
|
||||
(if fuzzy-search-cache
|
||||
(puthash s2 d fuzzy-search-cache))
|
||||
d)))
|
||||
|
||||
(defun fuzzy-search-match (s1 s2)
|
||||
(fuzzy-match s1 s2 'fuzzy-search-edit-distance))
|
||||
|
||||
(defun fuzzy-search-forward (string &optional bound noerror count)
|
||||
(let* ((regexp (fuzzy-regexp-compile string))
|
||||
match-data)
|
||||
(save-excursion
|
||||
(while (and (null match-data)
|
||||
(re-search-forward regexp bound t))
|
||||
(if (fuzzy-search-match string (match-string 1))
|
||||
(setq match-data (match-data))
|
||||
(goto-char (1+ (match-beginning 1))))))
|
||||
(when match-data
|
||||
(store-match-data match-data)
|
||||
(goto-char (match-end 1)))))
|
||||
|
||||
(defun fuzzy-search-backward (string &optional bound noerror count)
|
||||
(let* ((regexp (fuzzy-regexp-compile string))
|
||||
match-data begin end)
|
||||
(save-excursion
|
||||
(while (and (null match-data)
|
||||
(re-search-backward regexp bound t))
|
||||
(setq begin (match-beginning 1)
|
||||
end (match-end 1))
|
||||
(store-match-data nil)
|
||||
(goto-char (max (point-min) (- begin (* (length string) 2))))
|
||||
(while (re-search-forward regexp end t)
|
||||
(if (fuzzy-search-match string (match-string 1))
|
||||
(setq match-data (match-data))
|
||||
(goto-char (1+ (match-beginning 1)))))
|
||||
(unless match-data
|
||||
(goto-char begin)))
|
||||
(if match-data
|
||||
(progn
|
||||
(store-match-data match-data)
|
||||
(goto-char (match-beginning 1)))
|
||||
(store-match-data nil)))))
|
||||
|
||||
(defvar fuzzy-isearch nil)
|
||||
(defvar fuzzy-isearch-failed-count 0)
|
||||
(defvar fuzzy-isearch-enabled 'on-failed)
|
||||
(defvar fuzzy-isearch-original-search-fun nil)
|
||||
(defvar fuzzy-isearch-prefix "[FUZZY] ")
|
||||
|
||||
(defun fuzzy-isearch-activate ()
|
||||
(setq fuzzy-isearch t)
|
||||
(setq fuzzy-isearch-failed-count 0)
|
||||
(fuzzy-search-cache-activate))
|
||||
|
||||
(defun fuzzy-isearch-deactivate ()
|
||||
(setq fuzzy-isearch nil)
|
||||
(setq fuzzy-isearch-failed-count 0)
|
||||
(fuzzy-search-cache-deactive))
|
||||
|
||||
(defun fuzzy-isearch ()
|
||||
(cond (isearch-word
|
||||
(if isearch-forward 'word-search-forward 'word-search-backward))
|
||||
(isearch-regexp
|
||||
(if isearch-forward 're-search-forward 're-search-backward))
|
||||
((or fuzzy-isearch
|
||||
(eq fuzzy-isearch-enabled 'always)
|
||||
(and (eq fuzzy-isearch-enabled 'on-failed)
|
||||
(null isearch-success)
|
||||
isearch-wrapped
|
||||
(> (setq fuzzy-isearch-failed-count (1+ fuzzy-isearch-failed-count))
|
||||
1)))
|
||||
(unless fuzzy-isearch
|
||||
;(goto-char isearch-opoint)
|
||||
(fuzzy-isearch-activate))
|
||||
(if isearch-forward 'fuzzy-search-forward 'fuzzy-search-backward))
|
||||
(t
|
||||
(if isearch-forward 'search-forward 'search-backward))))
|
||||
|
||||
(defun fuzzy-isearch-end-hook ()
|
||||
(fuzzy-isearch-deactivate))
|
||||
|
||||
(defun turn-on-fuzzy-isearch ()
|
||||
(interactive)
|
||||
(setq fuzzy-isearch-original-search-fun isearch-search-fun-function)
|
||||
(setq isearch-search-fun-function 'fuzzy-isearch)
|
||||
(add-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
||||
|
||||
(defun turn-off-fuzzy-isearch ()
|
||||
(interactive)
|
||||
(setq isearch-search-fun-function fuzzy-isearch-original-search-fun)
|
||||
(remove-hook 'isearch-mode-end-hook 'fuzzy-isearch-end-hook))
|
||||
|
||||
(defadvice isearch-message-prefix (after fuzzy-isearch-message-prefix activate)
|
||||
(if fuzzy-isearch
|
||||
(setq ad-return-value (concat fuzzy-isearch-prefix ad-return-value))
|
||||
ad-return-value))
|
||||
|
||||
(provide 'fuzzy)
|
||||
;;; fuzzy.el ends here
|
||||
BIN
.emacs.d/auto-complete/fuzzy.elc
Normal file
BIN
.emacs.d/auto-complete/fuzzy.elc
Normal file
Binary file not shown.
1061
.emacs.d/auto-complete/popup.el
Normal file
1061
.emacs.d/auto-complete/popup.el
Normal file
File diff suppressed because it is too large
Load diff
BIN
.emacs.d/auto-complete/popup.elc
Normal file
BIN
.emacs.d/auto-complete/popup.elc
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue