Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'refs/remotes/auto-complete/master'

Conflicts:
	auto-complete.el
	doc/manual.txt
  • Loading branch information...
commit 1320beddf503b8b7d212d9a6536452a71d349b86 2 parents c320e1c + 03ac748
@purcell authored
View
39 auto-complete-config.el
@@ -21,7 +21,7 @@
;;; Commentary:
-;;
+;;
;;; Code:
@@ -141,21 +141,26 @@
(defun ac-yasnippet-candidates ()
(with-no-warnings
- (if (fboundp 'yas/get-snippet-tables)
- ;; >0.6.0
- (apply 'append (mapcar 'ac-yasnippet-candidate-1
- (condition-case nil
- (yas/get-snippet-tables major-mode)
- (wrong-number-of-arguments
- (yas/get-snippet-tables)))))
- (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))))))
+ (cond (;; 0.8 onwards
+ (fboundp 'yas-active-keys)
+ (all-completions ac-prefix (yas-active-keys)))
+ (;; >0.6.0
+ (fboundp 'yas/get-snippet-tables)
+ (apply 'append (mapcar 'ac-yasnippet-candidate-1
+ (condition-case nil
+ (yas/get-snippet-tables major-mode)
+ (wrong-number-of-arguments
+ (yas/get-snippet-tables)))))
+ )
+ (t
+ (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)
@@ -191,7 +196,7 @@
(require 'semantic/ia nil t)))
(candidates . (ac-semantic-candidates ac-prefix))
(document . ac-semantic-doc)
- (prefix . c-dot-ref)
+ (prefix . cc-member)
(requires . 0)
(symbol . "m")))
View
57 auto-complete.el
@@ -221,7 +221,12 @@
(defcustom ac-trigger-commands-on-completing
'(delete-backward-char
backward-delete-char
- backward-delete-char-untabify)
+ backward-delete-char-untabify
+ ;; autopair
+ autopair-backspace
+ ;; paredit
+ paredit-backward-delete
+ paredit-backward-delete-word)
"Trigger commands that specify whether `auto-complete' should continue or not."
:type '(repeat symbol)
:group 'auto-complete)
@@ -230,7 +235,8 @@
"Non-nil means `auto-complete' will start by typing this key.
If you specify this TAB, for example, `auto-complete' will start by typing TAB,
and if there is no completions, an original command will be fallbacked."
- :type 'string
+ :type '(choice (const :tag "None" nil)
+ (string :tag "Key"))
:group 'auto-complete
:set (lambda (symbol value)
(set-default symbol value)
@@ -283,6 +289,11 @@ a prefix doen't contain any upper case letters."
:type 'boolean
:group 'auto-complete)
+(defcustom ac-disable-inline nil
+ "Non-nil disable inline completion visibility"
+ :type 'boolean
+ :group 'auto-complete)
+
(defface ac-completion-face
'((t (:foreground "darkgray" :underline t)))
"Face for inline completion"
@@ -400,7 +411,6 @@ If there is no common part, this will be nil.")
(define-key map "\r" 'ac-complete)
(define-key map [return] 'ac-complete)
(define-key map (kbd "M-TAB") 'auto-complete)
- (define-key map "\C-s" 'ac-isearch)
(define-key map "\M-n" 'ac-next)
(define-key map "\M-p" 'ac-previous)
@@ -435,6 +445,7 @@ If there is no common part, this will be nil.")
(set-keymap-parent map ac-completing-map)
(define-key map "\C-n" 'ac-next)
(define-key map "\C-p" 'ac-previous)
+ (define-key map "\C-s" 'ac-isearch)
(define-key map [mouse-1] 'ac-mouse-1)
(define-key map [down-mouse-1] 'ac-ignore)
(define-key map [mouse-4] 'ac-mouse-4)
@@ -455,7 +466,8 @@ If there is no common part, this will be nil.")
(file . ac-prefix-file)
(valid-file . ac-prefix-valid-file)
(c-dot . ac-prefix-c-dot)
- (c-dot-ref . ac-prefix-c-dot-ref))
+ (c-dot-ref . ac-prefix-c-dot-ref)
+ (cc-member . ac-prefix-cc-member))
"Prefix definitions for common use.")
(defvar ac-end-definitions
@@ -662,6 +674,16 @@ If there is no common part, this will be nil.")
(if ac-use-dictionary-as-stop-words
(member word (ac-buffer-dictionary)))))
+(defun ac-prefix-default ()
+ "Same as `ac-prefix-symbol' but ignore a number prefix."
+ (let ((start (ac-prefix-symbol)))
+ (when start
+ (loop with end = (point)
+ for pos from start below end
+ for c = (char-after pos)
+ if (not (and (<= ?0 c) (<= c ?9)))
+ return start))))
+
(defun ac-prefix-symbol ()
"Start position of symbol at point."
(require 'thingatpt)
@@ -704,6 +726,11 @@ If there is no common part, this will be nil.")
(if (re-search-backward "\\(?:\\.\\|->\\)\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t)
(match-beginning 1)))
+(defun ac-prefix-cc-member ()
+ "C-like languages member(.)(->)(::) prefix."
+ (when (re-search-backward "\\(?:\\.\\|->\\|::\\)\\(\\(?:[a-zA-Z0-9][_a-zA-Z0-9]*\\)?\\)\\=" nil t)
+ (match-beginning 1)))
+
(defun ac-define-prefix (name prefix)
"Define new prefix definition.
You can use it in source definition like (prefix . `NAME')."
@@ -794,7 +821,7 @@ You can use it in source definition like (end . `NAME')."
:symbol t
:scroll-bar t
:margin-left 1
- :keymap ac-menu-map ; for mouse bindings
+ :keymap ac-menu-map
)))
(defun ac-menu-delete ()
@@ -1078,7 +1105,8 @@ You can use it in source definition like (end . `NAME')."
(ac-activate-completing-map))
(setq ac-completing nil)
(ac-deactivate-completing-map))
- (ac-inline-update)
+ (unless ac-disable-inline
+ (ac-inline-update))
(popup-set-list ac-menu ac-candidates)
(if (and (not ac-fuzzy-enable)
(<= (length ac-candidates) 1))
@@ -1289,7 +1317,7 @@ that have been made before in this function."
(and menu
(popup-child-point menu parent-offset))
(point))
- nil 0
+ nil 300
popup-tip-max-width
nil nil
(and (not around) 0))
@@ -1340,7 +1368,7 @@ that have been made before in this function."
(point (marker-position (car ac-last-completion))))
(when (stringp doc)
(if (ac-quick-help-use-pos-tip-p)
- (with-no-warnings (pos-tip-show doc nil point nil 0))
+ (with-no-warnings (pos-tip-show doc nil point nil 300))
(popup-tip doc
:point point
:around t
@@ -1612,10 +1640,16 @@ that have been made before in this function."
(string-match "self-insert-command" (symbol-name command))
(string-match "electric" (symbol-name command)))))
+(defun ac-fallback-key-sequence ()
+ (setq unread-command-events
+ (append (this-single-command-raw-keys)
+ unread-command-events))
+ (read-key-sequence-vector ""))
+
(defun ac-fallback-command (&optional except-command)
(let* ((auto-complete-mode nil)
- (keys (this-command-keys-vector))
- (command (if keys (key-binding keys))))
+ (keys (ac-fallback-key-sequence))
+ (command (and keys (key-binding keys))))
(when (and (commandp command)
(not (eq command except-command)))
(setq this-command command)
@@ -1652,7 +1686,8 @@ that have been made before in this function."
(not isearch-mode))
(setq ac-last-point (point))
(ac-start :requires (unless ac-completing ac-auto-start))
- (ac-inline-update))
+ (unless ac-disable-inline
+ (ac-inline-update)))
(error (ac-error var))))
(defun ac-setup ()
View
679 dict/haskell-mode
@@ -0,0 +1,679 @@
+Arrows
+BangPatterns
+Bool
+Bounded
+CPP
+Char
+Complex
+ConstrainedClassMethods
+Control.Applicative
+Control.Arrow
+Control.Category
+Control.Concurrent
+Control.Concurrent.MVar
+Control.Concurrent.QSem
+Control.Concurrent.QSemN
+Control.Concurrent.STM
+Control.Concurrent.STM.TArray
+Control.Concurrent.STM.TChan
+Control.Concurrent.STM.TMVar
+Control.Concurrent.STM.TVar
+Control.Concurrent.SampleVar
+Control.Exception
+Control.Exception.Base
+Control.Monad
+Control.Monad.Cont
+Control.Monad.Cont.Class
+Control.Monad.Error
+Control.Monad.Error.Class
+Control.Monad.Fix
+Control.Monad.Identity
+Control.Monad.Instances
+Control.Monad.List
+Control.Monad.RWS
+Control.Monad.RWS.Class
+Control.Monad.RWS.Lazy
+Control.Monad.RWS.Strict
+Control.Monad.Reader
+Control.Monad.Reader.Class
+Control.Monad.ST
+Control.Monad.ST.Lazy
+Control.Monad.ST.Strict
+Control.Monad.STM
+Control.Monad.State
+Control.Monad.State.Class
+Control.Monad.State.Lazy
+Control.Monad.State.Strict
+Control.Monad.Trans
+Control.Monad.Writer
+Control.Monad.Writer.Class
+Control.Monad.Writer.Lazy
+Control.Monad.Writer.Strict
+Control.OldException
+Control.Parallel
+Control.Parallel.Strategies
+DEPRECATED
+Data.Array
+Data.Array.Diff
+Data.Array.IArray
+Data.Array.IO
+Data.Array.IO.Internals
+Data.Array.MArray
+Data.Array.Paralell
+Data.Array.Paralell.Arr
+Data.Array.Paralell.Base
+Data.Array.Paralell.Int
+Data.Array.Paralell.Lifted
+Data.Array.Paralell.PArray
+Data.Array.Paralell.Prelude
+Data.Array.Paralell.Prelude.Double
+Data.Array.Paralell.Stream
+Data.Array.Paralell.Unlifted
+Data.Array.Paralell.Unlifted.Distributed
+Data.Array.Paralell.Unlifted.Paralell
+Data.Array.Paralell.Unlifted.Sqeuential
+Data.Array.Paralell.Word8
+Data.Array.ST
+Data.Array.Storable
+Data.Array.Unboxed
+Data.Bits
+Data.Bool
+Data.ByteString
+Data.ByteString.Char8
+Data.ByteString.Fusion
+Data.ByteString.Internal
+Data.ByteString.Lazy
+Data.ByteString.Lazy.Char8
+Data.ByteString.Lazy.Fusion
+Data.ByteString.Lazy.Internal
+Data.ByteString.Unsafe
+Data.Char
+Data.Complex
+Data.Data
+Data.Dynamic
+Data.Either
+Data.Eq
+Data.Fixed
+Data.Foldable
+Data.Function
+Data.Generics
+Data.Generics.Aliases
+Data.Generics.Basics
+Data.Generics.Instances
+Data.Generics.Schemes
+Data.Generics.Text
+Data.Generics.Twins
+Data.Graph
+Data.HashTable
+Data.IORef
+Data.Int
+Data.IntMap
+Data.IntSet
+Data.Ix
+Data.List
+Data.Map
+Data.Maybe
+Data.Monoid
+Data.Ord
+Data.Ratio
+Data.STRef
+Data.STRef.Lazy
+Data.STRef.Strict
+Data.Sequence
+Data.Set
+Data.String
+Data.Time
+Data.Time.Calendar
+Data.Time.Calendar.Easter
+Data.Time.Calendar.Julian
+Data.Time.Calendar.MonthDay
+Data.Time.Calendar.OrdinalDate
+Data.Time.Calendar.WeekDate
+Data.Time.Clock
+Data.Time.Clock.POSIX
+Data.Time.Clock.TAI
+Data.Time.Format
+Data.Time.LocalTime
+Data.Traversable
+Data.Tree
+Data.Tuple
+Data.Typeable
+Data.Unique
+Data.Version
+Data.Word
+Debug.Trace
+DeriveDataTypeable
+DisambiguateRecordFields
+Distribution.Compat.ReadP
+Distribution.Compiler
+Distribution.InstalledPackageInfo
+Distribution.License
+Distribution.Make
+Distribution.ModuleName
+Distribution.Package
+Distribution.PackageDescription
+Distribution.PackageDescription.Check
+Distribution.PackageDescription.Configuration
+Distribution.PackageDescription.Parse
+Distribution.ParseUtils
+Distribution.ReadE
+Distribution.Simple
+Distribution.Simple.Build
+Distribution.Simple.Build.Macros
+Distribution.Simple.Build.PathsModule
+Distribution.Simple.BuildPaths
+Distribution.Simple.Command
+Distribution.Simple.Compiler
+Distribution.Simple.Configure
+Distribution.Simple.GHC
+Distribution.Simple.Haddock
+Distribution.Simple.Hugs
+Distribution.Simple.Install
+Distribution.Simple.InstallDirs
+Distribution.Simple.JHC
+Distribution.Simple.LocalBuildInfo
+Distribution.Simple.NHC
+Distribution.Simple.PackageIndex
+Distribution.Simple.PreProcess
+Distribution.Simple.PreProcess.Unlit
+Distribution.Simple.Program
+Distribution.Simple.Register
+Distribution.Simple.Setup
+Distribution.Simple.SrcDist
+Distribution.Simple.UserHooks
+Distribution.Simple.Utils
+Distribution.System
+Distribution.Text
+Distribution.Verbosity
+Distribution.Version
+Double
+EQ
+Either
+EmptyDataDecls
+Enum
+Eq
+ExistentialQuantification
+ExtendedDefaultRules
+False
+FilePath
+FlexibleContexts
+FlexibleInstances
+Float
+Floating
+Foreign
+Foreign.C
+Foreign.C.Error
+Foreign.C.String
+Foreign.C.Types
+Foreign.Concurrent
+Foreign.ForeignPtr
+Foreign.Marshal
+Foreign.Marshal.Alloc
+Foreign.Marshal.Array
+Foreign.Marshal.Error
+Foreign.Marshal.Pool
+Foreign.Marshal.Utils
+Foreign.Ptr
+Foreign.StablePtr
+Foreign.Storable
+ForeignFunctionInterface
+Fractional
+FunctionnalDependencies
+Functor
+GADTs
+GHC.Arr
+GHC.Bool
+GHC.Conc
+GHC.ConsoleHandler
+GHC.Desugar
+GHC.Environment
+GHC.Err
+GHC.Exts
+GHC.Generics
+GHC.Handle
+GHC.Ordering
+GHC.PArr
+GHC.Prim
+GHC.PrimopWrappers
+GHC.Tuple
+GHC.Types
+GHC.Unicode
+GHC.Unit
+GT
+GeneralizedNewtypeDeriving
+Generics
+INCLUDE
+INLINE
+IO
+IOError
+IOException
+ImplicitParams
+ImplicitPrelude
+ImpredicativeTypes
+IncoherentInstances
+Int
+Integer
+Integral
+Just
+KindSignatures
+LANGUAGE
+LINE
+LT
+Language.Haskell.Extension
+Language.Haskell.Lexer
+Language.Haskell.ParseMonad
+Language.Haskell.ParseUtils
+Language.Haskell.Parser
+Language.Haskell.Pretty
+Language.Haskell.Syntax
+Language.Haskell.TH
+Language.Haskell.TH.Lib
+Language.Haskell.TH.Ppr
+Language.Haskell.TH.PprLib
+Language.Haskell.TH.Quote
+Language.Haskell.TH.Syntax
+Left
+LiberalTypeSynonyms
+MagicHash
+Maybe
+Monad
+MonoPatBinds
+MonomorphismRestriction
+MultiParamTypeClasses
+NOINLINE
+NamedFieldPuns
+Network
+Network.BSD
+Network.Socket
+Network.URI
+NewQualifiedOperators
+NoArrows
+NoBangPatterns
+NoCPP
+NoConstrainedClassMethods
+NoDeriveDataTypeable
+NoDisambiguateRecordFields
+NoEmptyDataDecls
+NoExistentialQuantification
+NoExtendedDefaultRules
+NoFlexibleContexts
+NoFlexibleInstances
+NoForeignFunctionInterface
+NoFunctionnalDependencies
+NoGADTs
+NoGeneralizedNewtypeDeriving
+NoGenerics
+NoImplicitParams
+NoImplicitPrelude
+NoImpredicativeTypes
+NoIncoherentInstances
+NoKindSignatures
+NoLiberalTypeSynonyms
+NoMagicHash
+NoMonoPatBinds
+NoMonomorphismRestriction
+NoMultiParamTypeClasses
+NoNamedFieldPuns
+NoNewQualifiedOperators
+NoOverlappingInstances
+NoOverloadedStrings
+NoPArr
+NoPackageImports
+NoParallelListComp
+NoPatternGuards
+NoPolymorphicComponents
+NoQuasiQuotes
+NoRank2Types
+NoRankNTypes
+NoRecordWildCards
+NoRecursiveDo
+NoRelaxedPolyRec
+NoScopedTypeVariables
+NoStandaloneDeriving
+NoTemplateHaskell
+NoTransformListComp
+NoTypeFamilies
+NoTypeOperators
+NoTypeSynonymInstances
+NoUnboxedTuples
+NoUndecidableInstances
+NoUnicodeSyntax
+NoUnliftedFFITypes
+NoViewPatterns
+Nothing
+Num
+Numeric
+OPTIONS_GHC
+Ord
+Ordering
+OverlappingInstances
+OverloadedStrings
+PArr
+PackageImports
+ParallelListComp
+PatternGuards
+PolymorphicComponents
+Prelude
+QuasiQuotes
+RULES
+Rank2Types
+RankNTypes
+Ratio
+Read
+ReadS
+Real
+RealFloat
+RealFrac
+RecordWildCards
+RecursiveDo
+RelaxedPolyRec
+Right
+SOURCE
+SPECIALIZE
+ScopedTypeVariables
+ShowS
+StandaloneDeriving
+String
+System.CPUTime
+System.Cmd
+System.Console.Editline
+System.Console.GetOpt
+System.Console.Readline
+System.Directory
+System.Environment
+System.Exit
+System.FilePath
+System.FilePath.Posix
+System.FilePath.Windows
+System.IO
+System.IO.Error
+System.IO.Unsafe
+System.Info
+System.Locale
+System.Mem
+System.Mem.StableName
+System.Mem.Weak
+System.Posix
+System.Posix.Directory
+System.Posix.DynamicLinker
+System.Posix.DynamicLinker.Module
+System.Posix.DynamicLinker.Prim
+System.Posix.Env
+System.Posix.Error
+System.Posix.Files
+System.Posix.IO
+System.Posix.Process
+System.Posix.Process.Internals
+System.Posix.Resource
+System.Posix.Semaphore
+System.Posix.SharedMem
+System.Posix.Signals
+System.Posix.Signals.Exts
+System.Posix.Temp
+System.Posix.Terminal
+System.Posix.Time
+System.Posix.Types
+System.Posix.Unistd
+System.Posix.User
+System.Process
+System.Random
+System.Time
+System.Timeout
+TemplateHaskell
+Test.HUnit
+Test.HUnit.Base
+Test.HUnit.Lang
+Test.HUnit.Terminal
+Test.HUnit.Text
+Test.QuickCheck
+Test.QuickCheck.Batch
+Test.QuickCheck.Poly
+Test.QuickCheck.Utils
+Text.Html
+Text.Html.BlockTable
+Text.ParserCombinators.Parsec
+Text.ParserCombinators.Parsec.Char
+Text.ParserCombinators.Parsec.Combinator
+Text.ParserCombinators.Parsec.Error
+Text.ParserCombinators.Parsec.Expr
+Text.ParserCombinators.Parsec.Language
+Text.ParserCombinators.Parsec.Perm
+Text.ParserCombinators.Parsec.Pos
+Text.ParserCombinators.Parsec.Prim
+Text.ParserCombinators.Parsec.Token
+Text.ParserCombinators.ReadP
+Text.ParserCombinators.ReadPrec
+Text.PrettyPrint
+Text.PrettyPrint.HughesPJ
+Text.Printf
+Text.Read
+Text.Read.Lex
+Text.Regex.Base
+Text.Regex.Base.Context
+Text.Regex.Base.Impl
+Text.Regex.Base.RegexLike
+Text.Regex.Posix
+Text.Regex.Posix.ByteString
+Text.Regex.Posix.String
+Text.Regex.Posix.Wrap
+Text.Show
+Text.Show.Functions
+Text.XHtml
+Text.XHtml.Debug
+Text.XHtml.Frameset
+Text.XHtml.Strict
+Text.XHtml.Table
+Text.XHtml.Transitional
+Trace.Hpc.Mix
+Trace.Hpc.Reflect
+Trace.Hpc.Tix
+Trace.Hpc.Util
+TransformListComp
+True
+TypeFamilies
+TypeOperators
+TypeSynonymInstances
+UNPACK
+UnboxedTuples
+UndecidableInstances
+UnicodeSyntax
+UnliftedFFITypes
+Unsafe.Coerce
+ViewPatterns
+WARNING
+abs
+acos
+acosh
+all
+and
+any
+appendFile
+as
+asTypeOf
+asin
+asinh
+atan
+atan2
+atanh
+break
+case
+catch
+ceiling
+class
+compare
+concat
+concatMap
+const
+cos
+cosh
+curry
+cycle
+data
+decodeFloat
+default
+deriving
+div
+divMod
+do
+drop
+dropWhile
+either
+elem
+else
+encodeFloat
+enumFrom
+enumFromThen
+enumFromThenTo
+enumFromTo
+error
+exp
+exponent
+fail
+filter
+flip
+floatDigits
+floatRadix
+floatRange
+floor
+fmap
+fold
+fold1
+foldr
+foldr1
+fromEnum
+fromInteger
+fromIntegral
+fromRational
+fst
+gcd
+getChar
+getContents
+getLine
+head
+hiding
+id
+if
+import
+in
+infix
+infixl
+infixr
+init
+instance
+intract
+ioError
+isDenormalized
+isIEEE
+isInfinite
+isNan
+isNegativeZero
+iterate
+last
+lcm
+length
+let
+lex
+lines
+log
+logBase
+lookup
+map
+mapM
+mapM_
+max
+maxBound
+maximum
+maybe
+min
+minBound
+minimum
+mod
+module
+negate
+newtype
+not
+notElem
+null
+odd
+of
+or
+otherwise
+pi
+pred
+print
+product
+properFraction
+putChar
+putStr
+putStrLn
+qualified
+quot
+quotRem
+read
+readFile
+readIO
+readList
+readLn
+readParen
+reads
+readsPrec
+realtoFrac
+recip
+rem
+repeat
+replicate
+return
+reverse
+round
+scaleFloat
+scanl
+scanl1
+scanr
+scanr1
+seq
+sequence
+sequence_
+show
+showChar
+showList
+showParen
+showString
+shows
+showsPrec
+significand
+signum
+sin
+sinh
+snd
+span
+splitAt
+sqrt
+subtract
+succ
+sum
+tail
+take
+takeWhile
+tan
+tanh
+then
+toEnum
+toInteger
+toRational
+truncate
+type
+uncurry
+undefined
+unlines
+until
+unwords
+unzip
+unzip3
+userError
+where
+words
+writeFile
+zip
+zip3
+zipWith
+zipWith3
View
3  dict/java-mode
@@ -48,3 +48,6 @@ try
void
volatile
while
+@Override
+@Deprecated
+@SuppressWarnings
View
58 doc/manual.txt
@@ -18,13 +18,13 @@ Auto Complete Mode User Manual
Introduction
------------
-Auto Complete Mode (aka `auto-complete.el`, `auto-complete-mode`) is an extension that automates and advances the completion-system of [GNU Emacs][]. This is superior to the old system:
+Auto Complete Mode (aka `auto-complete.el`, `auto-complete-mode`) is an extension that automates and advances the completion-system of [GNU Emacs][]. It is superior to the old system. Features include:
* Visual interface
-* Reduce overhead of completion by using statistic method
+* Reduce overhead of completion by using a statistical method
* Extensibility
-This user manual covers from how to install and how to use to how to extend. Please contact me if you have any questions.
+This user manual covers from how to install and use to how to extend. Please contact me if you have any questions.
Auto Complete Mode is licensed under the terms of [GPLv3][]. And this document is licensed under the term of [GFDL][].
@@ -46,7 +46,7 @@ Installation
It is easy to install by using an installation script called `etc/install.el` that is located in the package directory.
-Type `M-x load-file RET` in the running Emacs or newly launched Emacs. Note that if you want to upgrade `auto-complete-mode`, you have to install in **a newly launched Emacs with `-q` option**. Then input a file name to load which is a path string with adding `/etc/install.el` to the package directory. For example, if the package directory is `~/tmp/auto-complete-1.2`, the file name will be `~/tmp/auto-complete-1.2/etc/install.el`.
+Type `M-x load-file RET` in a running or newly-launched Emacs. Note that if you want to upgrade `auto-complete-mode`, you have to install in **a newly launched Emacs with the `-q` option**. Then input a file name to load which is a path string with adding `/etc/install.el` to the package directory. For example, if the package directory is `~/tmp/auto-complete-1.2`, the file name will be `~/tmp/auto-complete-1.2/etc/install.el`.
Then input a directory where Auto Complete will be installed. You need to add a directory to `load-path` later if `load-path` doesn't include the directory. The directory is to be `~/.emacs.d` by default.
@@ -85,11 +85,11 @@ Then copy all `.el` files and `.elc` files to a directory which is added to `loa
$ cp *.el *.elc ~/.emacs.d
-And then install dictionary files. They are optional to run Auto Complete Mode, but you should install if you don't have any reason. Dictionary files are located in called `dict` directory, it is needed that they are installed to a directory which is `auto-complete.el` has been installed. If you installed `auto-complete.el` to a directory called `~/.emacs.d`, you also have to install dictionary files to `~/.emacs.d`. Please be careful not to overwrite existed files. It may be rare case, but the installation script above avoids overwrite by renaming `dict` directory to `ac-dict` directory.
+And then install dictionary files. They are optional to run Auto Complete Mode, but you should install if you don't have any reason. Dictionary files are located in called `dict` directory, it is needed that they are installed to a directory which is `auto-complete.el` has been installed. If you installed `auto-complete.el` to a directory called `~/.emacs.d`, you also have to install dictionary files to `~/.emacs.d`. Please be careful not to overwrite existed files. It may be a rare case, but the installation script above avoids overwrite by renaming `dict` directory to `ac-dict` directory.
$ cp -r dict ~/.emacs.d
-Finally add the following code to `.emacs`.
+Finally add the following code to `.emacs`:
(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(require 'auto-complete-config)
@@ -101,7 +101,7 @@ If you haven't added the directory to `load-path`, you need to add the following
### Check ###
-Type some characters in \*scratch\* buffer in a restarted Emacs or newly launched Emacs. Installation has been successful if you see a completion menu. If you have error or no completion is started, it is failure maybe. Please contact me in such case with confirmation following:
+Type some characters in \*scratch\* buffer in a restarted or newly-launched Emacs. Installation has been successful if you see a completion menu. If you have an error or no completion is started, it could be a failure. Please contact me in such case with confirmation following:
* Using correct `load-path`?
@@ -118,11 +118,11 @@ Type some characters in \*scratch\* buffer in a restarted Emacs or newly launche
Basic Usage
-----------
-First, in a meaning, `auto-complete-mode` has no "usage". Because `auto-complete-mode` is designed to fade into Emacs editing system. Users will be received a highly-developed completion-system automatically without any difficulty. Ultimately, a goal of `auto-complete-mode` is to provide a system that does what users want without any command, but it is impossible to accomplish 100% accuracy actually. So there is "usage" to cover that points.
+First, in a meaning, `auto-complete-mode` has no "usage". Because `auto-complete-mode` is designed to fade into the Emacs editing system. Users will receive a highly-developed completion system automatically without any difficulty. Ultimately, a goal of `auto-complete-mode` is to provide a system that does what users want without any command, but it is impossible to accomplish 100% accuracy actually. So there is "usage" to cover those points.
### Input Characters ###
-Inputting characters is basic. Any completion will never be shown without any character. So when completion will be started, in other others, what character causes completion to be started? It is good question but it is difficult to answer here. In simple words, completion will be started when just character is inserted. See [`ac-trigger-commands`](#) for more details.
+Inputting characters is basic. Completions will never be shown without any character. So when completion will be started, what character causes completion to be started? It is a good question but it is difficult to answer here. In simple words, completion will be started when a character is inserted. See [`ac-trigger-commands`](#) for more details.
![Inputting Characters](ac.png)
@@ -132,17 +132,17 @@ After completion is started, completion by TAB will be enabled temporarily. Comp
* Case that only one candidate remains
- If only on candidate remains, the candidate will be used to complete.
+ If only one candidate remains, the candidate will be used to complete.
-* Case that there is common part among candidates
+* Case that there is a common part among candidates
- For example, if all candidates start with "set", it means they have common part "set". So TAB completes "set" at first.
+ For example, if all candidates start with "set", it means they have a common part "set". So TAB completes "set" at first.
* Otherwise
Otherwise, select candidates in cycle by typing TAB.
-It may be different a little according to settings, but basically completion by TAB works as we wrote above. A reason why TAB has several meanings is that we want users to do anything with TAB.
+It may be a little different according to settings, but basically completion by TAB works as we wrote above. A reason why TAB has several meanings is that we want users to do anything with TAB.
### Completion by RET ###
@@ -155,17 +155,17 @@ It is necessary to type TAB a few times for completion by TAB. Completion by RET
### Candidate Selection ###
-Following `auto-complete-mode` philosophy, it is not recommended to select candidates. Because, it means it has been failed to guess completion, and also it requires for users to do candidate selection which is a high cost operation. We think there is so many cases that requires to do candidate selection, because completion by TAB will help candidate selection somehow and in recent version, a statistic method contributes to make a candidate suggestion more accurate. However, actually, this is such cases. So we also think it is not bad idea to remember how to select candidates.
+Following the `auto-complete-mode` philosophy, it is not recommended to manually select candidates. That means it has been failed to guess the completion, and also it requires users to do candidate selection which is a high cost operation. We think there are so many cases that requires to do candidate selection, because completion by TAB will help candidate selection somehow and in recent versions, a statistical method contributes to make a candidate suggestion more accurate. However, actually, this is such cases. So we also think it is not bad idea to remember how to select candidates.
-Selecting candidates is not a complex operation. You can select candidates forward or backward by cursor key or `M-p` and `M-n`. According to setting, a behavior of completion by TAB will be changed as a behavior of completion by RET. See [`ac-dwim`](#) for more details.
+Selecting candidates is not a complex operation. You can select candidates forward or backward by cursor key or `M-p` and `M-n`. According to settings, a behavior of completion by TAB will be changed as a behavior of completion by RET. See [`ac-dwim`](#) for more details.
-There is other ways to select candidates. `M-1` to select candidate 1, `M-2` to select candidate 2, and so on.
+There are other ways to select candidates. `M-1` to select candidate 1, `M-2` to select candidate 2, and so on.
### Help ###
-`auto-complete-mode` has two type of help functionalities called *Quick Help* and *Buffer Help*. They are different in a point of displaying. Quick help will appear at the side of completion menu, so you can easily see that, but there is a problem if there is no space to displaying the help. Quick help will be shown automatically. To use quick help, you need to set [`ac-use-quick-help`](#) to `t`. Delay time show quick help is given by [`ac-quick-help-delay`](#).
+`auto-complete-mode` has two types of help functionalities called *Quick Help* and *Buffer Help*. They are different in a point of displaying. Quick help will appear at the side of completion menu, so you can easily see that, but there is a problem if there is no space to display the help. Quick help will be shown automatically. To use quick help, you need to set [`ac-use-quick-help`](#) to `t`. Delay time to show quick help is given by [`ac-quick-help-delay`](#).
-On other side, buffer help will not be shown without any instructions from users. Buffer help literally display a help in a buffer of other window. It costs much to see than quick help, but it has more readability. To show buffer help, press `C-?` or `f1`. By pressing `C-M-v` or `C-M-S-v` after showing buffer help, you can scroll forward or backward for help buffer. Other commands will be fallbacked and buffer help will be closed.
+On the other side, buffer help will not be shown without any instructions from users. Buffer help literally displays help in a buffer in another window. It costs more to see than quick help, but it has more readability. To show buffer help, press `C-?` or `f1`. By pressing `C-M-v` or `C-M-S-v` after showing buffer help, you can scroll forward or backward through the help buffer. Other commands will be fallbacked and buffer help will be closed.
### Summary ###
@@ -179,16 +179,14 @@ Completion will be started by inserting characters. After completion is started,
| up, M-p | ac-previous | Select previous candidate |
| C-?, f1 | ac-help | Show buffer help |
-When a candidate is selected, the target string under the point is replaced with the candidate.
-
-To stop completion, use `C-g` simply.
+To stop completion, simply use `C-g`.
Advanced Usage
--------------
### `auto-complete` command ###
-Basically there is assumption that `auto-complete-mode` will be started automatically, but there is also exception. For example, that is a case that an user wants to complete without inserting any character or a case not to start `auto-complete-mode` automatically by settings. A command called `auto-complete` is useful in such cases, which is used with key binding in general. The following code changes a default completion command to more advanced feature that `auto-complete-mode` provides.
+Basically there is an assumption that `auto-complete-mode` will be started automatically, but there is also exception. For example, that is a case that an user wants to complete without inserting any character or a case not to start `auto-complete-mode` automatically by settings. A command called `auto-complete` is useful in such cases, which is used with key binding in general. The following code changes a default completion command to more advanced feature that `auto-complete-mode` provides.
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
@@ -208,13 +206,13 @@ So, as of `auto-complete` command, it is a little different from an original aut
### Completion by Fuzzy Matching ###
-In a case that there is no candidates by `auto-complete` command or a case that `ac-fuzzy-complete` command is executed, `auto-complete-mode` attempts to complete with fuzzy matching instead of usual exact matching. Parameters of fuzzy matching has already been optimized for use, so users don't need to change them. However if you want to know the internals, see `fuzzy.el`. Using completion by fuzzy matching, typo will be fixed as a series of completion. For instance, input "messaeg" in a buffer, and then do `M-x auto-complete` or `M-x ac-fuzzy-complete`. The cursor color will be changed to red if completion has been successful, and then you can continue to complete with regarding of "messaeg" as "message". It is not bad idea to bind `auto-complete` command to some key in a meaning of handling such cases.
+In a case that there are no candidates by `auto-complete` command or the case where `ac-fuzzy-complete` command is executed, `auto-complete-mode` attempts to complete with fuzzy matching instead of the usual exact matching. Parameters of fuzzy matching have already been optimized for use, so users don't need to change them. However if you want to know the internals, see `fuzzy.el`. Using completion by fuzzy matching, typos will be fixed as a series of completion. For instance, input "messaeg" in a buffer, and then do `M-x auto-complete` or `M-x ac-fuzzy-complete`. The cursor color will be changed to red if completion has been successful, and then you can continue to complete, regarding "messaeg" as "message". It is not a bad idea to bind `auto-complete` command to some key to handle such cases.
![Fuzzy matching](ac-fuzzy.png)
### Filtering Completion Candidates ###
-You can start filtering by `C-s`. The cursor color will be changed to blue. Then input characters to filter. It is possible to do completion by TAB or select candidates, which changes the cursor color to original so that telling filtering completion candidates has done. The filtering string will be restored when `C-s` again. To delete the filter string, press `DEL` or `C-h`. Other general operations is not allowed there.
+You can start filtering by `C-s`. The cursor color will change to blue. Then input characters to filter. It is possible to do completion by TAB or select candidates, which changes the cursor color to original so that telling filtering completion candidates has done. The filtering string will be restored when `C-s` again. To delete the filter string, press `DEL` or `C-h`. Other general operations is not allowed there.
![Filtering](ac-isearch.png)
@@ -277,15 +275,15 @@ As same as user defined dictionary, after editing and adding dictionary, you sho
Source
------
-*Source* is a concept that insures a extensibility of `auto-complete-mode`. Simply saying, source is a description about:
+*Source* is a concept that ensures the extensibility of `auto-complete-mode`. Simply saying, source is a description of:
* How to generate completion candidates
* How to complete
* How to show
-Anybody who know about Emacs Lisp a little can define a source easily. See [extend](#Extend) for how to define a source. Here we can explain how to use builtin sources.
+Anybody who knows a little Emacs Lisp can define a source easily. See [extend](#Extend) for how to define a source. Here we will explain how to use built-in sources.
-Usually a name of source starts with `ac-source-`. So you can list up sources with `apropos` (`M-x apropos RET ^ac-source-`). You may see `ac-source-filename` and `ac-source-dictionary` which are entities of sources.
+Usually a source name starts with `ac-source-`. So you can list sources with `apropos` (`M-x apropos RET ^ac-source-`). You may see `ac-source-filename` and `ac-source-dictionary` which are entities of sources.
### Using Source ###
@@ -304,7 +302,7 @@ If you wrote `(ac-config-default)` in your `.emacs`, it is rare to change a sour
As you see, `ac-sources` in \*scratch\* buffer has six sources. We explain each source for detail, you can guess meanings of sources. It is worth to remember that `ac-sources` is a buffer local variable, which means each `ac-sources` for buffers will be different.
-Here is an example. Think you are at \*scratch\* buffer. As we said, this buffer has many sources. Some people think it is too many. So try to change `ac-sources` to reduce functionalities. It is easy to change. Just evaluate the following code in \*scratch\* buffer or with `M-:`:
+Here is an example. Imagine you are at the \*scratch\* buffer. As we said, this buffer has many sources. Some people think there are too many. So try to change `ac-sources` to reduce functionality. It is easy to change. Just evaluate the following code in the \*scratch\* buffer or with `M-:`:
(setq ac-sources '(ac-source-symbols ac-source-words-in-same-mode-buffers))
@@ -315,7 +313,7 @@ This example changes `ac-source` setting and enable only symbol completion and w
(add-hook 'emacs-lisp-mode-hook 'my-ac-emacs-lisp-mode)
-If a code `(ac-config-default)` is written in `.emacs`, the code above may not be worked correctly. It is because of `(ac-config-default)` will overwrite the setting. In such case, you can redefine a function which is used in `(ac-config-default)`. The function name is `ac-emacs-lisp-mode-setup` in `emacs-lisp-mode`. See `auto-complete-config.el` for more details.
+If the code `(ac-config-default)` is written in `.emacs`, the code above may not work correctly. This is because `(ac-config-default)` will overwrite the setting. In such case, you can redefine a function which is used in `(ac-config-default)`. The function name is `ac-emacs-lisp-mode-setup` in `emacs-lisp-mode`. See `auto-complete-config.el` for more details.
(defun ac-emacs-lisp-mode-setup ()
(setq ac-sources '(ac-source-symbols ac-source-words-in-same-mode-buffers)))
@@ -329,7 +327,7 @@ By the way, how can we change a setting for all buffers? We use `setq-default` t
(setq-default ac-sources '(ac-source-words-in-all-buffer))
-There is other ways to do that. `(ac-config-default)` changes the default value of `ac-sources` by registering a hook for `auto-complete-mode`. The registered function is `ac-common-setup` that adds `ac-source-filename` to the first of `ac-sources` by default. So all `auto-complete-mode` enabled buffer will have `ac-source-filename` at the first of `ac-sources`. A reason why adding to the first is relating to [omni completion](#Omni_Completion). Anyway you don't care about it here. So if you want to change `ac-sources` of all buffer, you can redefine `ac-common-setup` function to do that.
+There are other ways to do that. `(ac-config-default)` changes the default value of `ac-sources` by registering a hook for `auto-complete-mode`. The registered function is `ac-common-setup` that adds `ac-source-filename` to the first of `ac-sources` by default. So all `auto-complete-mode` enabled buffer will have `ac-source-filename` at the first of `ac-sources`. A reason why adding to the first is relating to [omni completion](#Omni_Completion). Anyway you don't care about it here. So if you want to change `ac-sources` of all buffer, you can redefine `ac-common-setup` function to do that.
;; Add ac-source-dictionary to ac-sources of all buffer
(defun ac-common-setup ()
Please sign in to comment.
Something went wrong with that request. Please try again.