Commits

lhonda  committed f607a11

added anything-config.el

  • Participants
  • Parent commits 10f70b0

Comments (0)

Files changed (1)

File anything-config.el

+;;; anything-config.el --- Predefined configurations for `anything.el'
+
+;; Filename: anything-config.el
+
+;; Description: Predefined configurations for `anything.el'
+;; Author: Tassilo Horn <tassilo@member.fsf.org>
+;; Maintainer: Tassilo Horn <tassilo@member.fsf.org>
+;;             rubikitch    <rubikitch@ruby-lang.org>
+;;             Thierry Volpiatto <thierry.volpiatto@gmail.com>
+;; Copyright (C) 2007 ~ 2010, Tassilo Horn, all rights reserved.
+;; Copyright (C) 2009, Andy Stewart, all rights reserved.
+;; Copyright (C) 2009 ~ 2010, rubikitch, all rights reserved.
+;; Copyright (C) 2009 ~ 2010, Thierry Volpiatto, all rights reserved.
+;; Created: 2009-02-16 21:38:23
+;; Version: 0.4.1
+;; URL: http://www.emacswiki.org/emacs/download/anything-config.el
+;; Keywords: anything, anything-config
+;; Compatibility: GNU Emacs 22 ~ 23
+;;
+;; Features that might be required by this library:
+;;
+;; `anything'
+;;
+
+;;; This file is NOT part of GNU Emacs
+
+;;; License
+;;
+;; 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, 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; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+
+;;; !NOTICE!
+;;
+;; If this file does not work, upgrade anything.el!
+;; http://www.emacswiki.org/cgi-bin/wiki/download/anything.el
+
+;;; Commentary:
+;;
+;; Predefined configurations for `anything.el'
+;;
+;; For quick start, try `anything-for-files' to open files.
+;; 
+;; To configure anything you should define anything command
+;; with your favorite sources, like below:
+;;
+;; (defun my-anything ()
+;;   (interactive)
+;;   (anything-other-buffer
+;;    '(anything-c-source-buffers
+;;      anything-c-source-file-name-history
+;;      anything-c-source-info-pages
+;;      anything-c-source-info-elisp
+;;      anything-c-source-man-pages
+;;      anything-c-source-locate
+;;      anything-c-source-emacs-commands)
+;;    " *my-anything*"))
+;;
+;; Then type M-x my-anything to use sources.
+;;
+;; Defining own command is better than setup `anything-sources'
+;; directly, because you can define multiple anything commands with
+;; different sources. Each anything command should have own anything
+;; buffer, because M-x anything-resume revives anything command.
+
+;;; Autodoc documentation:
+;;  ---------------------
+
+;;  * Commands defined here are:
+;; [EVAL] (autodoc-document-lisp-buffer :type 'command :prefix "anything-" :docstring t)
+;; `anything-c-describe-anything-bindings'
+;; [OBSOLETE] Describe `anything' bindings.
+;; `anything-mini'
+;; Preconfigured `anything' lightweight version (buffer -> recentf).
+;; `anything-for-files'
+;; Preconfigured `anything' for opening files.
+;; `anything-recentf'
+;; Preconfigured `anything' for `recentf'.
+;; `anything-info-at-point'
+;; Preconfigured `anything' for searching info at point.
+;; `anything-show-kill-ring'
+;; Preconfigured `anything' for `kill-ring'. It is drop-in replacement of `yank-pop'.
+;; `anything-minibuffer-history'
+;; Preconfigured `anything' for `minibuffer-history'.
+;; `anything-gentoo'
+;; Preconfigured `anything' for gentoo linux.
+;; `anything-surfraw-only'
+;; Preconfigured `anything' for surfraw.
+;; `anything-imenu'
+;; Preconfigured `anything' for `imenu'.
+;; `anything-google-suggest'
+;; Preconfigured `anything' for google search with google suggest.
+;; `anything-yahoo-suggest'
+;; Preconfigured `anything' for Yahoo searching with Yahoo suggest.
+;; `anything-for-buffers'
+;; Preconfigured `anything' for buffer.
+;; `anything-bbdb'
+;; Preconfigured `anything' for BBDB.
+;; `anything-locate'
+;; Preconfigured `anything' for Locate.
+;; `anything-w3m-bookmarks'
+;; Preconfigured `anything' for w3m bookmark.
+;; `anything-colors'
+;; Preconfigured `anything' for color.
+;; `anything-bm-list'
+;; Preconfigured `anything' for visible bookmarks.
+;; `anything-timers'
+;; Preconfigured `anything' for timers.
+;; `anything-kill-buffers'
+;; Preconfigured `anything' to kill buffer you selected.
+;; `anything-query-replace-regexp'
+;; Preconfigured `anything' : Drop-in replacement of `query-replace-regexp' with building regexp visually.
+;; `anything-regexp'
+;; Preconfigured `anything' : It is like `re-builder'. It helps buliding regexp and replacement.
+;; `anything-insert-buffer-name'
+;; Insert buffer name.
+;; `anything-insert-symbol'
+;; Insert current symbol.
+;; `anything-insert-selection'
+;; Insert current selection.
+;; `anything-show-buffer-only'
+;; [OBSOLETE] Only show sources about buffer.
+;; `anything-show-bbdb-only'
+;; [OBSOLETE] Only show sources about BBDB.
+;; `anything-show-locate-only'
+;; [OBSOLETE] Only show sources about Locate.
+;; `anything-show-info-only'
+;; [OBSOLETE] Only show sources about Info.
+;; `anything-show-imenu-only'
+;; [OBSOLETE] Only show sources about Imenu.
+;; `anything-show-files-only'
+;; [OBSOLETE] Only show sources about File.
+;; `anything-show-w3m-bookmarks-only'
+;; [OBSOLETE] Only show source about w3m bookmark.
+;; `anything-show-colors-only'
+;; [OBSOLETE] Only show source about color.
+;; `anything-show-kill-ring-only'
+;; [OBSOLETE] Only show source about kill ring.
+;; `anything-show-this-source-only'
+;; Only show this source.
+;; `anything-test-sources'
+;; List all anything sources for test.
+;; `anything-select-source'
+;; Select source.
+;; `anything-find-files-down-one-level'
+;; Go down one level like unix command `cd ..'.
+;; `anything-find-files'
+;; Preconfigured `anything' for anything implementation of `find-file'.
+;; `anything-write-file'
+;; Preconfigured `anything' providing completion for `write-file'.
+;; `anything-insert-file'
+;; Preconfigured `anything' providing completion for `insert-file'.
+;; `anything-dired-rename-file'
+;; Preconfigured `anything' to rename files from dired.
+;; `anything-dired-copy-file'
+;; Preconfigured `anything' to copy files from dired.
+;; `anything-dired-symlink-file'
+;; Preconfigured `anything' to symlink files from dired.
+;; `anything-dired-hardlink-file'
+;; Preconfigured `anything' to hardlink files from dired.
+;; `anything-dired-bindings'
+;; Replace usual dired commands `C' and `R' by anything ones.
+;; `anything-manage-advice'
+;; Preconfigured `anything' to disable/enable function advices.
+;; `anything-bookmark-ext'
+;; Preconfigured `anything' for bookmark-extensions sources.
+;; `anything-simple-call-tree'
+;; Preconfigured `anything' for simple-call-tree. List function relationships.
+;; `anything-mark-ring'
+;; Preconfigured `anything' for `anything-c-source-mark-ring'.
+;; `anything-global-mark-ring'
+;; Preconfigured `anything' for `anything-c-source-global-mark-ring'.
+;; `anything-yaoddmuse-cache-pages'
+;; Fetch the list of files on emacswiki and create cache file.
+;; `anything-yaoddmuse-emacswiki-edit-or-view'
+;; Preconfigured `anything' to edit or view EmacsWiki page.
+;; `anything-yaoddmuse-emacswiki-post-library'
+;; Preconfigured `anything' to post library to EmacsWiki.
+;; `anything-emms-stream-edit-bookmark'
+;; Change the information of current emms-stream bookmark from anything.
+;; `anything-emms-stream-delete-bookmark'
+;; Delete an emms-stream bookmark from anything.
+;; `anything-call-source'
+;; Preconfigured `anything' to call anything source.
+;; `anything-call-source-from-anything'
+;; Call anything source within `anything' session.
+;; `anything-execute-anything-command'
+;; Preconfigured `anything' to execute preconfigured `anything'.
+;; `anything-occur'
+;; Preconfigured Anything for Occur source.
+;; `anything-create-from-anything'
+;; Run `anything-create' from `anything' as a fallback.
+;; `anything-create'
+;; Preconfigured `anything' to do many create actions from STRING.
+;; `anything-top'
+;; Preconfigured `anything' for top command.
+;; `anything-select-xfont'
+;; Preconfigured `anything' to select Xfont.
+;; `anything-apt'
+;; Preconfigured `anything' : frontend of APT package manager.
+;; `anything-c-shell-command-if-needed'
+;; Not documented.
+;; `anything-c-run-external-command'
+;; Run External PROGRAM asyncronously from Emacs.
+;; `anything-ratpoison-commands'
+;; Preconfigured `anything' to execute ratpoison commands.
+;; `anything-c-set-variable'
+;; Set value to VAR interactively.
+;; `anything-c-adaptive-save-history'
+;; Save history information to file given by `anything-c-adaptive-history-file'.
+
+;;  * User variables defined here:
+;; [EVAL] (autodoc-document-lisp-buffer :type 'user-variable :prefix "anything-" :var-value t)
+;; `anything-c-use-standard-keys'
+;; Default Value: nil
+;; `anything-c-adaptive-history-file'
+;; Default Value: "~/.emacs.d/anything-c-adaptive-history"
+;; `anything-c-adaptive-history-length'
+;; Default Value: 50
+;; `anything-c-google-suggest-url'
+;; Default Value: "http://google.com/complete/search?output=toolbar&q="
+;; `anything-c-google-suggest-search-url'
+;; Default Value: "http://www.google.com/search?ie=utf-8&oe=utf-8&q="
+;; `anything-google-suggest-use-curl-p'
+;; Default Value: nil
+;; `anything-c-yahoo-suggest-url'
+;; Default Value: "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion?appid=G [...]
+;; `anything-c-yahoo-suggest-search-url'
+;; Default Value: "http://search.yahoo.com/search?&ei=UTF-8&fr&h=c&p="
+;; `anything-c-boring-buffer-regexp'
+;; Default Value: "\\	(\\` \\)\\|\\*anything\\| \\*Echo Area\\| \\*Minibuf"
+;; `anything-c-boring-file-regexp'
+;; Default Value: "/\\	(?:\\(?:\\.\\(?:git\\|hg\\|svn\\)\\|CVS\\|_darcs\\)\\)\\(?:/\\|$\\)\\| [...]
+;; `anything-kill-ring-threshold'
+;; Default Value: 10
+;; `anything-su-or-sudo'
+;; Default Value: "su"
+;; `anything-for-files-prefered-list'
+;; Default Value:	(anything-c-source-ffap-line anything-c-source-ffap-guesser anything-c-sou [...]
+;; `anything-create--actions-private'
+;; Default Value: nil
+;; `anything-allow-skipping-current-buffer'
+;; Default Value: t
+;; `anything-c-enable-eval-defun-hack'
+;; Default Value: t
+;; `anything-tramp-verbose'
+;; Default Value: 0
+;; `anything-back-to-emacs-shell-command'
+;; Default Value: nil
+
+;;  * Anything sources defined here:
+;; [EVAL] (autodoc-document-lisp-buffer :type 'anything-source :prefix "anything-" :any-sname t)
+;; `anything-c-source-buffers'					(Buffers)
+;; `anything-c-source-buffer-not-found'				(Create buffer)
+;; `anything-c-source-buffers+'					(Buffers)
+;; `anything-c-source-file-name-history'			(File Name History)
+;; `anything-c-source-files-in-current-dir'			(Files from Current Directory)
+;; `anything-c-source-files-in-current-dir+'			(Files from Current Directory)
+;; `anything-c-source-find-files'				(Find Files (`C-.':Go to precedent level))
+;; `anything-c-source-write-file'				(Write File (`C-.':Go to precedent level))
+;; `anything-c-source-insert-file'				(Insert File (`C-.':Go to precedent level))
+;; `anything-c-source-copy-files'				(Copy Files (`C-.':Go to precedent level))
+;; `anything-c-source-symlink-files'				(Symlink Files (`C-.':Go to precedent level))
+;; `anything-c-source-hardlink-files'				(Hardlink Files (`C-.':Go to precedent level))
+;; `anything-c-source-file-cache-initialized'			()
+;; `anything-c-source-file-cache'				(File Cache)
+;; `anything-c-source-locate'					(Locate)
+;; `anything-c-source-recentf'					(Recentf)
+;; `anything-c-source-ffap-guesser'				(File at point)
+;; `anything-c-source-ffap-line'				(File/Lineno at point)
+;; `anything-c-source-files-in-all-dired'			(Files in all dired buffer.)
+;; `anything-c-source-info-pages'				(Info Pages)
+;; `anything-c-source-info-elisp'				(Info index: elisp)
+;; `anything-c-source-info-cl'					(Info index: cl)
+;; `anything-c-source-info-org'					(Info index: org)
+;; `anything-c-source-info-ratpoison'				(Info index: ratpoison)
+;; `anything-c-source-info-zsh'					(Info index: zsh)
+;; `anything-c-source-info-bash'				(Info index: bash)
+;; `anything-c-source-info-coreutils'				(Info index: coreutils)
+;; `anything-c-source-info-fileutils'				(Info index: fileutils)
+;; `anything-c-source-info-find'				(Info index: find)
+;; `anything-c-source-info-sh-utils'				(Info index: sh-utils)
+;; `anything-c-source-info-textutils'				(Info index: textutils)
+;; `anything-c-source-info-libc'				(Info index: libc)
+;; `anything-c-source-info-make'				(Info index: make)
+;; `anything-c-source-info-automake'				(Info index: automake)
+;; `anything-c-source-info-autoconf'				(Info index: autoconf)
+;; `anything-c-source-info-emacs-lisp-intro'			(Info index: emacs-lisp-intro)
+;; `anything-c-source-info-emacs'				(Info index: emacs)
+;; `anything-c-source-info-elib'				(Info index: elib)
+;; `anything-c-source-info-eieio'				(Info index: eieio)
+;; `anything-c-source-info-gauche-refe'				(Info index: gauche)
+;; `anything-c-source-info-guile'				(Info index: guile)
+;; `anything-c-source-info-guile-tut'				(Info index: guile-tut)
+;; `anything-c-source-info-goops'				(Info index: goops)
+;; `anything-c-source-info-screen'				(Info index: screen)
+;; `anything-c-source-info-latex'				(Info index: latex)
+;; `anything-c-source-info-gawk'				(Info index: gawk)
+;; `anything-c-source-info-sed'					(Info index: sed)
+;; `anything-c-source-info-m4'					(Info index: m4)
+;; `anything-c-source-info-wget'				(Info index: wget)
+;; `anything-c-source-info-binutils'				(Info index: binutils)
+;; `anything-c-source-info-as'					(Info index: as)
+;; `anything-c-source-info-bfd'					(Info index: bfd)
+;; `anything-c-source-info-gprof'				(Info index: gprof)
+;; `anything-c-source-info-ld'					(Info index: ld)
+;; `anything-c-source-info-diff'				(Info index: diff)
+;; `anything-c-source-info-flex'				(Info index: flex)
+;; `anything-c-source-info-grep'				(Info index: grep)
+;; `anything-c-source-info-gzip'				(Info index: gzip)
+;; `anything-c-source-info-libtool'				(Info index: libtool)
+;; `anything-c-source-info-texinfo'				(Info index: texinfo)
+;; `anything-c-source-info-info'				(Info index: info)
+;; `anything-c-source-info-gdb'					(Info index: gdb)
+;; `anything-c-source-info-stabs'				(Info index: stabs)
+;; `anything-c-source-info-cvsbook'				(Info index: cvsbook)
+;; `anything-c-source-info-cvs'					(Info index: cvs)
+;; `anything-c-source-info-bison'				(Info index: bison)
+;; `anything-c-source-info-id-utils'				(Info index: id-utils)
+;; `anything-c-source-info-global'				(Info index: global)
+;; `anything-c-source-man-pages'				(Manual Pages)
+;; `anything-c-source-complex-command-history'			(Complex Command History)
+;; `anything-c-source-extended-command-history'			(Emacs Commands History)
+;; `anything-c-source-emacs-commands'				(Emacs Commands)
+;; `anything-c-source-lacarte'					(Lacarte)
+;; `anything-c-source-emacs-functions'				(Emacs Functions)
+;; `anything-c-source-emacs-functions-with-abbrevs'		(Emacs Functions)
+;; `anything-c-source-advice'					(Function Advice)
+;; `anything-c-source-emacs-variables'				(Emacs Variables)
+;; `anything-c-source-bookmarks'				(Bookmarks)
+;; `anything-c-source-bookmark-set'				(Set Bookmark)
+;; `anything-c-source-bm'					(Visible Bookmarks)
+;; `anything-c-source-bookmarks-ssh'				(Bookmarks-ssh)
+;; `anything-c-source-bookmarks-su'				(Bookmarks-root)
+;; `anything-c-source-bookmarks-local'				(Bookmarks-Local)
+;; `anything-c-source-bookmark-w3m'				(Bookmark W3m)
+;; `anything-c-source-bookmark-man'				(Bookmark Woman&Man)
+;; `anything-c-source-bookmark-gnus'				(Bookmark Gnus)
+;; `anything-c-source-bookmark-info'				(Bookmark Info)
+;; `anything-c-source-bookmark-files&dirs'			(Bookmark Files&Directories)
+;; `anything-c-source-bookmark-su-files&dirs'			(Bookmark Root-Files&Directories)
+;; `anything-c-source-bookmark-ssh-files&dirs'			(Bookmark Ssh-Files&Directories)
+;; `anything-c-source-firefox-bookmarks'			(Firefox Bookmarks)
+;; `anything-c-source-w3m-bookmarks'				(W3m Bookmarks)
+;; `anything-c-source-elisp-library-scan'			(Elisp libraries (Scan))
+;; `anything-c-source-imenu'					(Imenu)
+;; `anything-c-source-ctags'					(Exuberant ctags)
+;; `anything-c-source-semantic'					(Semantic Tags)
+;; `anything-c-source-simple-call-tree-functions-callers'	(Function is called by)
+;; `anything-c-source-simple-call-tree-callers-functions'	(Function calls)
+;; `anything-c-source-commands-and-options-in-file'		(Commands/Options in file)
+;; `anything-c-source-customize-face'				(Customize Face)
+;; `anything-c-source-colors'					(Colors)
+;; `anything-c-source-tracker-search'				(Tracker Search)
+;; `anything-c-source-mac-spotlight'				(mdfind)
+;; `anything-c-source-kill-ring'				(Kill Ring)
+;; `anything-c-source-mark-ring'				(mark-ring)
+;; `anything-c-source-global-mark-ring'				(global-mark-ring)
+;; `anything-c-source-register'					(Registers)
+;; `anything-c-source-fixme'					(TODO/FIXME/DRY comments)
+;; `anything-c-source-rd-headline'				(RD HeadLine)
+;; `anything-c-source-oddmuse-headline'				(Oddmuse HeadLine)
+;; `anything-c-source-emacs-source-defun'			(Emacs Source DEFUN)
+;; `anything-c-source-emacs-lisp-expectations'			(Emacs Lisp Expectations)
+;; `anything-c-source-emacs-lisp-toplevels'			(Emacs Lisp Toplevel / Level 4 Comment / Linkd Star)
+;; `anything-c-source-org-headline'				(Org HeadLine)
+;; `anything-c-source-yaoddmuse-emacswiki-edit-or-view'		(Yaoddmuse Edit or View (EmacsWiki))
+;; `anything-c-source-yaoddmuse-emacswiki-post-library'		(Yaoddmuse Post library (EmacsWiki))
+;; `anything-c-source-eev-anchor'				(Anchors)
+;; `anything-c-source-org-keywords'				(Org Keywords)
+;; `anything-c-source-picklist'					(Picklist)
+;; `anything-c-source-bbdb'					(BBDB)
+;; `anything-c-source-evaluation-result'			(Evaluation Result)
+;; `anything-c-source-calculation-result'			(Calculation Result)
+;; `anything-c-source-google-suggest'				(Google Suggest)
+;; `anything-c-source-yahoo-suggest'				(Yahoo Suggest)
+;; `anything-c-source-surfraw'					(Surfraw)
+;; `anything-c-source-emms-streams'				(Emms Streams)
+;; `anything-c-source-emms-dired'				(Music Directory)
+;; `anything-c-source-jabber-contacts'				(Jabber Contacts)
+;; `anything-c-source-call-source'				(Call anything source)
+;; `anything-c-source-anything-commands'			(Preconfigured Anything)
+;; `anything-c-source-occur'					(Occur)
+;; `anything-c-source-create'					(Create)
+;; `anything-c-source-minibuffer-history'			(Minibuffer History)
+;; `anything-c-source-elscreen'					(Elscreen)
+;; `anything-c-source-top'					(Top (Press C-c C-u to refresh))
+;; `anything-c-source-absolute-time-timers'			(Absolute Time Timers)
+;; `anything-c-source-idle-time-timers'				(Idle Time Timers)
+;; `anything-c-source-xrandr-change-resolution'			(Change Resolution)
+;; `anything-c-source-xfonts'					(X Fonts)
+;; `anything-c-source-apt'					(APT)
+;; `anything-c-source-gentoo'					(Portage sources)
+;; `anything-c-source-use-flags'				(Use Flags)
+;; `anything-c-source-emacs-process'				(Emacs Process)
+;; `anything-c-source-ratpoison-commands'			(Ratpoison Commands)
+
+;;  *** END auto-documentation
+
+
+;;; Change log:
+;;
+;;  Change log of this file is found at
+;;  http://repo.or.cz/w/anything-config.git?a=shortlog
+
+;;; Contributors:
+;;
+;;     Tamas Patrovics
+;;     Tassilo Horn <tassilo@member.fsf.org>
+;;     Vagn Johansen <gonz808@hotmail.com>
+;;     Mathias Dahl <mathias.dahl@gmail.com>
+;;     Bill Clementson <billclem@gmail.com>
+;;     Stefan Kamphausen (see http://www.skamphausen.de for more informations)
+;;     Drew Adams <drew.adams@oracle.com>
+;;     Jason McBrayer <jmcbray@carcosa.net>
+;;     Andy Stewart <lazycat.manatee@gmail.com>
+;;     Thierry Volpiatto <thierry.volpiatto@gmail.com>
+;;     rubikitch <rubikitch@ruby-lang.org>
+;;     Scott Vokes <vokes.s@gmail.com>
+;;
+
+;;; For Maintainers:
+;;
+;; Evaluate (autodoc-update-all) before commit. This function
+;; generates anything-c-source-* / functions / options list.
+;;
+;; Install also developer-tools/autodoc.el
+;; And eval it or run interactively.
+;;
+;; [EVAL IT] (autodoc-update-all)
+;;
+;; Please write details documentation about function, then others will
+;; read code more easier.   -- Andy Stewart
+;;
+
+
+;;; TODO
+;;
+;; - Fix documentation, now many functions haven't documentations.
+;;
+
+;;; Require
+(require 'anything)
+(require 'thingatpt)
+(require 'ffap)
+(require 'cl)
+
+;;; Code:
+
+;; version check
+(let ((version "1.263"))
+  (when (and (string= "1." (substring version 0 2))
+             (string-match "1\.\\([0-9]+\\)" anything-version)
+             (< (string-to-number (match-string 1 anything-version))
+                (string-to-number (substring version 2))))
+    (error "Please update anything.el!!
+
+http://www.emacswiki.org/cgi-bin/wiki/download/anything.el
+
+or  M-x install-elisp-from-emacswiki anything.el")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Customize ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defgroup anything-config nil
+  "Predefined configurations for `anything.el'."
+  :group 'anything)
+
+(defcustom anything-c-use-standard-keys nil
+  "Whether use standard keybindings. (no effect)
+
+Key definitions in anything-config.el are removed because
+anything.el uses Emacs-standard keys by default. e.g. M-p/M-n for
+minibuffer history, C-s for isearch, etc.
+
+If you use `iswitchb' with `anything',
+evaluate (anything-iswitchb-setup) .  Then some bindings that
+conflict with `iswitchb', e.g. C-p/C-n for the minibuffer
+history, are removed from `anything-map'. "
+  :type 'boolean
+  :group 'anything-config)
+
+(defcustom anything-c-adaptive-history-file "~/.emacs.d/anything-c-adaptive-history"
+  "Path of file where history information is stored."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-c-adaptive-history-length 50
+  "Maximum number of candidates stored for a source."
+  :type 'number
+  :group 'anything-config)
+
+(defcustom anything-c-google-suggest-url
+  "http://google.com/complete/search?output=toolbar&q="
+  "URL used for looking up Google suggestions."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-c-google-suggest-search-url
+  "http://www.google.com/search?ie=utf-8&oe=utf-8&q="
+  "URL used for Google searching."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-google-suggest-use-curl-p nil
+  "*When non--nil use CURL to get info from `anything-c-google-suggest-url'.
+Otherwise `url-retrieve-synchronously' is used."
+  :type 'boolean
+  :group 'anything-config)
+
+(defcustom anything-c-yahoo-suggest-url
+  "http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion?appid=Generic&query="
+  "Url used for looking up Yahoo suggestions."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-c-yahoo-suggest-search-url
+  "http://search.yahoo.com/search?&ei=UTF-8&fr&h=c&p="
+  "Url used for Yahoo searching."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-c-boring-buffer-regexp
+  (rx (or
+       (group bos  " ")
+       ;; anything-buffer
+       "*anything"
+       ;; echo area
+       " *Echo Area" " *Minibuf"))
+  "The regexp that match boring buffers.
+Buffer candidates matching this regular expression will be
+filtered from the list of candidates if the
+`anything-c-skip-boring-buffers' candidate transformer is used, or
+they will be displayed with face `file-name-shadow' if
+`anything-c-shadow-boring-buffers' is used."
+  :type 'string
+  :group 'anything-config)
+;; (string-match anything-c-boring-buffer-regexp "buf")
+;; (string-match anything-c-boring-buffer-regexp " hidden")
+;; (string-match anything-c-boring-buffer-regexp " *Minibuf-1*")
+
+(defcustom anything-c-boring-file-regexp
+  (rx (or
+       ;; Boring directories
+       (and "/" (or ".svn" "CVS" "_darcs" ".git" ".hg") (or "/" eol))
+       ;; Boring files
+       (and line-start  ".#")
+       (and (or ".class" ".la" ".o" "~") eol)))
+  "The regexp that match boring files.
+File candidates matching this regular expression will be
+filtered from the list of candidates if the
+`anything-c-skip-boring-files' candidate transformer is used, or
+they will be displayed with face `file-name-shadow' if
+`anything-c-shadow-boring-files' is used."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-kill-ring-threshold 10
+  "*Minimum length to be listed by `anything-c-source-kill-ring'."
+  :type 'integer
+  :group 'anything-config)
+
+(defcustom anything-su-or-sudo "su"
+  "What command to use for root access."
+  :type 'string
+  :group 'anything-config)
+
+(defcustom anything-for-files-prefered-list '(anything-c-source-ffap-line
+                                              anything-c-source-ffap-guesser
+                                              anything-c-source-buffers+
+                                              anything-c-source-recentf
+                                              anything-c-source-bookmarks
+                                              anything-c-source-file-cache
+                                              anything-c-source-files-in-current-dir+
+                                              anything-c-source-locate)
+  "Your prefered sources to find files."
+  :type 'list
+  :group 'anything-config)
+
+(defcustom anything-create--actions-private nil
+  "User defined actions for `anything-create' / `anything-c-source-create'.
+It is a list of (DISPLAY . FUNCTION) pairs like `action'
+attribute of `anything-sources'.
+
+It is prepended to predefined pairs."
+  :type 'list
+  :group 'anything-config)
+
+(defcustom anything-allow-skipping-current-buffer t
+  "Show current buffer or not in anything buffer"
+  :type 'boolean
+  :group 'anything-config)
+
+(defcustom anything-c-enable-eval-defun-hack t
+  "*If non-nil, execute `anything' using the source at point when C-M-x is pressed.
+This hack is invoked when pressing C-M-x in the form \
+ (defvar anything-c-source-XXX ...) or (setq anything-c-source-XXX ...)."
+  :type 'boolean
+  :group 'anything-config)
+
+(defcustom anything-tramp-verbose 0
+  "*Just like `tramp-verbose' but specific to anything.
+When set to 0 don't show tramp messages in anything.
+If you want to have the default tramp messages set it to 3."
+  :type 'integer
+  :group 'anything-config)
+
+(defcustom anything-back-to-emacs-shell-command nil
+  "*A shell command to come back to Emacs after running externals programs.
+Stumpwm users could use:
+\"stumpish eval \"\(stumpwm::emacs\)\"\".
+With others windows manager you could use:
+\"wmctrl -xa emacs\"."
+  :type 'string
+  :group 'anything-config)
+
+;;; Documentation
+;; It is replaced by `anything-help'
+(defun anything-c-describe-anything-bindings ()
+  "[OBSOLETE] Describe `anything' bindings."
+  (interactive)
+  (anything-run-after-quit
+   #'(lambda ()
+       (with-current-buffer (get-buffer-create "*Anything Help*")
+         (erase-buffer)
+         (insert
+          (substitute-command-keys
+           "The keys that are defined for `anything' are:
+       \\{anything-map}")))
+       (pop-to-buffer "*Anything Help*")
+       (goto-char (point-min)))))
+
+;; Use `describe-mode' key in `global-map'
+;; (dolist (k (where-is-internal 'describe-mode global-map))
+;;   (define-key anything-map k 'anything-c-describe-anything-bindings))
+
+;;; Help message
+(defun anything-c-list-preconfigured-anything ()
+  (loop with doc
+        with sym
+        for entry in (cdr (assoc
+                           (file-truename (locate-library "anything-config"))
+                           load-history))
+        if (and (consp entry)
+                (eq (car entry) 'defun)
+                (string-match "^Preconfigured.+$"
+                              (setq doc (or (documentation (setq sym (cdr entry)))
+                                            ""))))
+        collect (cons sym (match-string 0 doc))))
+
+(defun anything-c-format-preconfigured-anything ()
+  (mapcar (lambda (x) (format "\\[%s] : %s\n" (car x) (cdr x)))
+          (anything-c-list-preconfigured-anything)))
+
+(setq anything-help-message
+      (lambda ()
+        (concat
+         "\\<anything-map>"
+         "`anything' is QuickSilver-like candidate-selection framework.
+
+Narrow the list by typing some pattern,
+Multiple patterns are allowed by splitting by space.
+Select with natural Emacs operations, choose with RET.
+
+If you have any problems, press C-c C-x C-b!!
+Feel free to send bug reports. I'll fix them.
+The steps are described in the beginning of anything.el file.
+
+== Basic Operations ==
+C-p, Up: Previous Line
+C-n, Down : Next Line
+M-v, PageUp : Previous Page
+C-v, PageDown : Next Page
+Enter : Execute first (default) action / Select 
+M-< : First Line
+M-> : Last Line
+M-PageUp, C-M-S-v, C-M-y : Previous Page (other-window)
+M-PageDown, C-M-v : Next Page (other-window)
+
+Tab, C-i : Show action list
+Left : Previous Source
+Right, C-o : Next Source
+C-k : Delete pattern
+C-z : Persistent Action (Execute action with anything session kept)
+C-c C-x C-b: Send a bug report
+
+== Shortcuts For 2nd/3rd Action ==
+\\[anything-select-2nd-action-or-end-of-line] : Execute 2nd Action (if the minibuffer cursor is at end of line)
+\\[anything-select-3rd-action] : Execute 3rd Action
+
+== Visible Marks ==
+Visible marks store candidate. Some actions uses marked candidates.
+
+\\[anything-toggle-visible-mark] : Toggle Visible Mark
+\\[anything-prev-visible-mark] : Previous Mark
+\\[anything-next-visible-mark] : Next Mark
+
+== Miscellaneous Commands ==
+\\[anything-toggle-resplit-window] : Toggle vertical/horizontal split anything window
+\\[anything-quit-and-find-file] : Drop into `find-file'
+\\[anything-delete-current-selection] : Delete Selected Item (visually)
+\\[anything-kill-selection-and-quit] : Set Item Into the kill-ring And Quit
+\\[anything-yank-selection] : Yank Selected Item Into Pattern
+\\[anything-follow-mode] : Toggle Automatical Execution Of Persistent Action
+\\[anything-force-update] : Recalculate And Redisplay Candidates
+
+== Global Commands ==
+\\<global-map>\\[anything-resume] revives last `anything' session.
+It is very useful, so you should bind any key.
+
+Single source is executed by \\[anything-call-source].
+
+== Preconfigured `anything' ==
+Preconfigured `anything' is commands that uses `anything' interface.
+You can use them without configuration.
+
+"
+         (apply 'concat (anything-c-format-preconfigured-anything))
+         "
+Enjoy!")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Preconfigured Anything ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
+(defun anything-mini ()
+  "Preconfigured `anything' lightweight version (buffer -> recentf)."
+  (interactive)
+  (anything-other-buffer '(anything-c-source-buffers+ anything-c-source-recentf)
+                         "*anything mini*"))
+;;;###autoload
+(defun anything-for-files ()
+  "Preconfigured `anything' for opening files.
+ffap -> recentf -> buffer -> bookmark -> file-cache -> files-in-current-dir -> locate"
+  (interactive)
+  (anything-other-buffer anything-for-files-prefered-list "*anything for files*"))
+
+;;;###autoload
+(defun anything-recentf ()
+  "Preconfigured `anything' for `recentf'."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-recentf "*anything recentf*"))
+;;;###autoload
+(defun anything-info-at-point ()
+  "Preconfigured `anything' for searching info at point."
+  (interactive)
+  (anything '(anything-c-source-info-elisp
+              anything-c-source-info-cl
+              anything-c-source-info-pages)
+            (thing-at-point 'symbol) nil nil nil "*anything info*"))
+
+;;;###autoload
+(defun anything-show-kill-ring ()
+  "Preconfigured `anything' for `kill-ring'. It is drop-in replacement of `yank-pop'.
+You may bind this command to M-y."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-kill-ring "*anything kill-ring*"))
+
+;;;###autoload
+(defun anything-minibuffer-history ()
+  "Preconfigured `anything' for `minibuffer-history'."
+  (interactive)
+  (let ((enable-recursive-minibuffers t))
+    (anything-other-buffer 'anything-c-source-minibuffer-history
+                           "*anything minibuffer-history*")))
+
+;; In Emacs 23.1.50, minibuffer-local-must-match-filename-map was renamed to
+;; minibuffer-local-filename-must-match-map.
+(defvar minibuffer-local-filename-must-match-map (make-sparse-keymap)) ;; Emacs 23.1.+
+(defvar minibuffer-local-must-match-filename-map (make-sparse-keymap)) ;; Older Emacsen
+(dolist (map (list minibuffer-local-filename-completion-map
+                   minibuffer-local-completion-map
+                   minibuffer-local-must-match-filename-map
+                   minibuffer-local-filename-must-match-map
+                   minibuffer-local-map
+                   minibuffer-local-isearch-map
+                   minibuffer-local-must-match-map
+                   minibuffer-local-ns-map))
+  (define-key map "\C-r" 'anything-minibuffer-history))
+
+;;;###autoload
+(defun anything-gentoo ()
+  "Preconfigured `anything' for gentoo linux."
+  (interactive)
+  (anything-other-buffer '(anything-c-source-gentoo
+                           anything-c-source-use-flags)
+                         "*anything gentoo*"))
+
+;;;###autoload
+(defun anything-surfraw-only ()
+  "Preconfigured `anything' for surfraw.
+If region is marked set anything-pattern to region.
+With one prefix arg search symbol at point.
+With two prefix args allow choosing in which symbol to search."
+  (interactive)
+  (let (search pattern)
+    (cond ((region-active-p)
+           (setq pattern (buffer-substring (region-beginning) (region-end))))
+          ((equal current-prefix-arg '(4))
+           (setq pattern (thing-at-point 'symbol)))
+          ((equal current-prefix-arg '(16))
+           (setq search
+                 (intern
+                  (completing-read "Search in: "
+                                   (list "symbol" "sentence" "sexp" "line" "word"))))
+           (setq pattern (thing-at-point search))))
+    (anything 'anything-c-source-surfraw
+              (and pattern (replace-regexp-in-string "\n" "" pattern))
+              nil nil nil "*anything surfraw*")))
+
+;;;###autoload
+(defun anything-imenu ()
+  "Preconfigured `anything' for `imenu'."
+  (interactive)
+  (anything 'anything-c-source-imenu nil nil nil nil "*anything imenu*"))
+
+;;;###autoload
+(defun anything-google-suggest ()
+  "Preconfigured `anything' for google search with google suggest."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-google-suggest "*anything google*"))
+
+;;;###autoload
+(defun anything-yahoo-suggest ()
+  "Preconfigured `anything' for Yahoo searching with Yahoo suggest."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-yahoo-suggest "*anything yahoo*"))
+
+;;; Converted from anything-show-*-only
+;;;###autoload
+(defun anything-for-buffers ()
+  "Preconfigured `anything' for buffer."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-buffers "*anything for buffers*"))
+
+;;;###autoload
+(defun anything-bbdb ()
+  "Preconfigured `anything' for BBDB."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-bbdb "*anything bbdb*"))
+
+;;;###autoload
+(defun anything-locate ()
+  "Preconfigured `anything' for Locate.
+Note you can add locate command after entering pattern.
+See man locate for more infos."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-locate "*anything locate*"))
+
+;;;###autoload
+(defun anything-w3m-bookmarks ()
+  "Preconfigured `anything' for w3m bookmark."
+  (interactive)
+  (anything-other-buffer 'anything-c-source-w3m-bookmarks "*anything w3m bookmarks*"))
+
+;;;###autoload
+(defun anything-colors ()
+  "Preconfigured `anything' for color."
+  (interactive)
+  (anything-other-buffer '(anything-c-source-colors anything-c-source-customize-face)
+                         "*anything colors*"))
+
+;;;###autoload
+(defun anything-bm-list ()
+  "Preconfigured `anything' for visible bookmarks."
+  (interactive)
+  (let ((anything-outline-using t))
+    (anything-other-buffer 'anything-c-source-bm "*anything bm list*")))
+
+;;;###autoload
+(defun anything-timers ()
+  "Preconfigured `anything' for timers."
+  (interactive)
+  (anything-other-buffer '(anything-c-source-absolute-time-timers
+                           anything-c-source-idle-time-timers)
+                         "*anything timers*"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Anything Applications ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; kill buffers
+;;;###autoload
+(defun anything-kill-buffers ()
+  "Preconfigured `anything' to kill buffer you selected."
+  (interactive)
+  (anything
+   '(((name . "Kill Buffers")
+      (candidates . anything-c-buffer-list)
+      (action
+       ("Kill Buffer" . (lambda (candidate)
+                          (kill-buffer candidate)
+                          (anything-kill-buffers)
+                          )))))
+   nil nil))
+
+;;; Regexp
+;;;###autoload
+(defun anything-query-replace-regexp (&rest args)
+  "Preconfigured `anything' : Drop-in replacement of `query-replace-regexp' with building regexp visually."
+  (interactive
+   (let ((common
+          (anything-c-regexp-base "Query Replace Regexp: "
+                                  '((name . "Lines matching Regexp")
+                                    (mode-line . "Set replace start line and type RET.")
+                                    (action . anything-c-query-replace-args)))))
+     (if (not common)
+         (keyboard-quit))
+     (list (car common) (cadr common) (caddr common)
+	   ;; These are done separately here
+	   ;; so that command-history will record these expressions
+	   ;; rather than the values they had this time.
+           ;;
+           ;; This idea is borrowed from original `query-replace-regexp'.
+           (if (and transient-mark-mode mark-active)
+               (region-beginning))
+           (if (and transient-mark-mode mark-active)
+               (region-end)))))
+  (apply 'query-replace-regexp args))
+
+;;;###autoload
+(defun anything-regexp ()
+  "Preconfigured `anything' : It is like `re-builder'. It helps buliding regexp and replacement."
+  (interactive)
+  (anything-c-regexp-base
+   "Regexp: "
+   '((name . "Regexp Builder")
+     (mode-line . "Press TAB to select action.")
+     (action
+      ("Kill Regexp as sexp" .
+       (lambda (x) (anything-c-regexp-kill-new (prin1-to-string (funcall (anything-attr 'regexp))))))
+      ("Query Replace Regexp" .
+       (lambda (x) (apply 'query-replace-regexp (anything-c-query-replace-args (point)))))
+      ("Kill Regexp" .
+       (lambda (x) (anything-c-regexp-kill-new (funcall (anything-attr 'regexp)))))))))
+
+(defun anything-c-query-replace-args (start-point)
+  ;; create arguments of `query-replace-regexp'.
+  (let ((region-only (and transient-mark-mode mark-active))
+        (regexp (funcall (anything-attr 'regexp))))
+    (list
+     regexp
+     (query-replace-read-to regexp
+                            (format "Query replace regexp %s%s%s with: "
+                                    (if region-only "in region " "")
+                                    regexp
+                                    (if current-prefix-arg "(word) " ""))
+                            t)
+     current-prefix-arg)))
+
+(defun anything-c-regexp-get-line (s e)
+  (propertize
+   (apply 'concat
+          ;; Line contents
+          (format "%5d: %s" (line-number-at-pos s) (buffer-substring s e))
+          ;; subexps
+          (loop for i from 0 to (1- (/ (length (match-data)) 2))
+                unless (zerop i)
+                collect (format "\n         $%d = %s"
+                                i (match-string i))))
+   ;; match beginning
+   ;; KLUDGE: point of anything-candidate-buffer is +1 than that of anything-current-buffer.
+   ;; It is implementation problem of candidates-in-buffer.
+   'anything-realvalue
+   (1- s)))
+
+;; Shut up byte compiler
+(defun anything-goto-line (numline)
+  "Replacement of `goto-line'."
+  (goto-char (point-min))
+  (forward-line (1- numline)))
+
+(defun anything-c-regexp-persistent-action (pt)
+  (goto-char pt)
+  (anything-persistent-highlight-point))
+
+(defun anything-c-regexp-base (prompt attributes)
+  (save-restriction
+    (let ((anything-compile-source-functions
+           ;; rule out anything-match-plugin because the input is one regexp.
+           (delq 'anything-compile-source--match-plugin
+                 (copy-sequence anything-compile-source-functions)))
+          (base-attributes
+           '((init . (lambda () (anything-candidate-buffer anything-current-buffer)))
+             (candidates-in-buffer)
+             (get-line . anything-c-regexp-get-line)
+             (persistent-action . anything-c-regexp-persistent-action)
+             (persistent-help . "Show this line")
+             (multiline)
+             (delayed))))
+      (if (and transient-mark-mode mark-active)
+          (narrow-to-region (region-beginning) (region-end)))
+      (anything
+       (list
+        (append
+         attributes
+         '((regexp . (lambda () anything-pattern)))
+         base-attributes)
+        ;; sexp form regexp
+        (append
+         `((name . ,(concat (assoc-default 'name attributes) " (sexp)")))
+         attributes
+         '((candidates-in-buffer
+            . (lambda () (let ((anything-pattern (eval (read anything-pattern))))
+                           (anything-candidates-in-buffer))))
+           (regexp . (lambda () (eval (read anything-pattern)))))
+         base-attributes))
+       nil prompt nil nil "*anything regexp*"))))
+
+;; (anything-c-regexp-base "Regexp: " '((name . "test")))
+;; (anything-c-regexp-base "Regexp: " '((name . "test") (candidates-in-buffer . (lambda () (let ((anything-pattern (eval (read anything-pattern)))) (anything-candidates-in-buffer))))))
+
+(defun anything-c-regexp-kill-new (input)
+  (kill-new input)
+  (message "Killed: %s" input))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Interactive Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun anything-insert-buffer-name ()
+  "Insert buffer name."
+  (interactive)
+  (anything-insert-string
+   (with-current-buffer anything-current-buffer
+     (if buffer-file-name (file-name-nondirectory buffer-file-name)
+       (buffer-name)))))
+
+(defun anything-insert-symbol ()
+  "Insert current symbol."
+  (interactive)
+  (anything-insert-string
+   (with-current-buffer anything-current-buffer
+     (save-excursion
+       (buffer-substring (beginning-of-thing 'symbol)
+                         (end-of-thing 'symbol))))))
+
+(defun anything-insert-selection ()
+  "Insert current selection."
+  (interactive)
+  (anything-insert-string
+   (with-current-buffer anything-current-buffer
+     (anything-get-selection))))
+
+(defun anything-show-buffer-only ()
+  "[OBSOLETE] Only show sources about buffer.
+Use `anything-for-buffers' instead."
+  (interactive)
+  (anything-set-source-filter '("Buffers")))
+
+(defun anything-show-bbdb-only ()
+  "[OBSOLETE] Only show sources about BBDB.
+Use `anything-bbdb' instead."
+  (interactive)
+  (anything-set-source-filter '("BBDB")))
+
+(defun anything-show-locate-only ()
+  "[OBSOLETE] Only show sources about Locate.
+Use `anything-locate' instead."
+  (interactive)
+  (anything-set-source-filter '("Locate")))
+
+(defun anything-show-info-only ()
+  "[OBSOLETE] Only show sources about Info.
+Use `anything-info-at-point' instead."
+  (interactive)
+  (anything-set-source-filter '("Info Pages"
+                                "Info Elisp"
+                                "Info Common-Lisp")))
+
+(defun anything-show-imenu-only ()
+  "[OBSOLETE] Only show sources about Imenu.
+Use `anything-imenu' instead."
+  (interactive)
+  (anything-set-source-filter '("Imenu")))
+
+(defun anything-show-files-only ()
+  "[OBSOLETE] Only show sources about File.
+Use `anything-for-files' instead."
+  (interactive)
+  (anything-set-source-filter '("File Name History"
+                                "Files from Current Directory"
+                                "Recentf")))
+
+(defun anything-show-w3m-bookmarks-only ()
+  "[OBSOLETE] Only show source about w3m bookmark.
+Use `anything-w3m-bookmarks' instead."
+  (interactive)
+  (anything-set-source-filter '("W3m Bookmarks")))
+
+(defun anything-show-colors-only ()
+  "[OBSOLETE] Only show source about color.
+Use `anything-colors' instead."
+  (interactive)
+  (anything-set-source-filter '("Colors"
+                                "Customize Faces")))
+
+(defun anything-show-kill-ring-only ()
+  "[OBSOLETE] Only show source about kill ring.
+Use `anything-show-kill-ring' instead."
+  (interactive)
+  (anything-set-source-filter '("Kill Ring")))
+
+(defun anything-show-this-source-only ()
+  "Only show this source."
+  (interactive)
+  (setq anything-candidate-number-limit 9999)
+  (anything-set-source-filter
+   (list (assoc-default 'name (anything-get-current-source)))))
+
+(defun anything-test-sources ()
+  "List all anything sources for test.
+The output is sexps which are evaluated by \\[eval-last-sexp]."
+  (interactive)
+  (with-output-to-temp-buffer "*Anything Test Sources*"
+    (mapc (lambda (s) (princ (format ";; (anything '%s)\n" s)))
+          (apropos-internal "^anything-c-source" #'boundp))
+    (pop-to-buffer standard-output)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Utilities Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; For compatibility
+(unless (fboundp 'region-active-p)
+  (defun region-active-p ()
+    "Return t if Transient Mark mode is enabled and the mark is active.
+
+Most commands that act on the region if it is active and
+Transient Mark mode is enabled, and on the text near point
+otherwise, should use `use-region-p' instead.  That function
+checks the value of `use-empty-active-region' as well."
+    (and transient-mark-mode mark-active)))
+
+(defun anything-nest (&rest same-as-anything)
+  "Nested `anything'. If you use `anything' within `anything', use it."
+  (with-selected-window (anything-window)
+    (let (anything-current-position
+          anything-current-buffer
+          (orig-anything-buffer anything-buffer)
+          anything-pattern
+          anything-buffer
+          anything-sources
+          anything-compiled-sources
+          anything-buffer-chars-modified-tick
+          (anything-samewindow t)
+          (enable-recursive-minibuffers t))
+      (unwind-protect
+          (apply #'anything same-as-anything)
+        (anything-initialize-overlays orig-anything-buffer)
+        (add-hook 'post-command-hook 'anything-check-minibuffer-input)))))
+
+(defun anything-displaying-source-names ()
+  "Display sources name."
+  (with-current-buffer anything-buffer
+    (goto-char (point-min))
+    (loop with pos
+          while (setq pos (next-single-property-change (point) 'anything-header))
+          do (goto-char pos)
+          collect (buffer-substring-no-properties (point-at-bol)(point-at-eol))
+          do (forward-line 1))))
+
+(defun anything-select-source ()
+  "Select source."
+  (interactive)
+  (let ((default (assoc-default 'name (anything-get-current-source)))
+        (source-names (anything-displaying-source-names))
+        (all-source-names (mapcar (lambda (s) (assoc-default 'name s))
+                                  (anything-get-sources))))
+    (setq anything-candidate-number-limit 9999)
+    (anything-aif
+        (let (anything-source-filter)
+          (anything-nest '(((name . "Anything Source")
+                            (candidates . source-names)
+                            (action . identity))
+                           ((name . "Anything Source (ALL)")
+                            (candidates . all-source-names)
+                            (action . identity)))
+                         nil "Source: " nil
+                         default "*anything select source*"))
+        (anything-set-source-filter (list it))
+      (anything-set-source-filter nil))))
+
+(defun anything-insert-string (str)
+  "Insert STR."
+  (delete-minibuffer-contents)
+  (insert str))
+
+(defun anything-c-match-on-file-name (candidate)
+  "Return non-nil if `anything-pattern' match the filename (without directory part) of CANDIDATE."
+  (string-match anything-pattern (file-name-nondirectory candidate)))
+
+(defun anything-c-match-on-directory-name (candidate)
+  "Return non-nil if `anything-pattern' match the directory part of CANDIDATE (a file)."
+  (anything-aif (file-name-directory candidate)
+      (string-match anything-pattern it)))
+
+(defun anything-c-string-match (candidate)
+  "Return non-nil if `anything-pattern' match CANDIDATE.
+The match is done with `string-match'."
+  (string-match anything-pattern candidate))
+
+;; `anything-c-compose' is no more needed, it is for compatibility.
+(defalias 'anything-c-compose 'anything-compose)
+
+(defun anything-c-skip-entries (list regexp)
+  "Remove entries which matches REGEXP from LIST."
+  (remove-if (lambda (x) (and (stringp x) (string-match regexp x)))
+             list))
+
+(defun anything-c-shadow-entries (list regexp)
+  "Elements of LIST matching REGEXP will be displayed with the `file-name-shadow' face if available."
+  (mapcar (lambda (file)
+            ;; Add shadow face property to boring files.
+            (let ((face (if (facep 'file-name-shadow)
+                            'file-name-shadow
+                          ;; fall back to default on XEmacs
+                          'default)))
+              (if (string-match regexp file)
+                  (setq file (propertize file 'face face))))
+            file)
+          list))
+
+(defsubst anything-c-stringify (str-or-sym)
+  "Get string of STR-OR-SYM."
+  (if (stringp str-or-sym)
+      str-or-sym
+    (symbol-name str-or-sym)))
+
+(defsubst anything-c-symbolify (str-or-sym)
+  "Get symbol of STR-OR-SYM."
+  (if (symbolp str-or-sym)
+      str-or-sym
+    (intern str-or-sym)))
+
+(defun anything-c-describe-function (func)
+  "FUNC is symbol or string."
+  (describe-function (anything-c-symbolify func)))
+
+(defun anything-c-describe-variable (var)
+  "VAR is symbol or string."
+  (describe-variable (anything-c-symbolify var)))
+
+(defun anything-c-find-function (func)
+  "FUNC is symbol or string."
+  (find-function (anything-c-symbolify func)))
+
+(defun anything-c-find-variable (var)
+  "VAR is symbol or string."
+  (find-variable (anything-c-symbolify var)))
+
+(defun anything-c-kill-new (string &optional replace yank-handler)
+  "STRING is symbol or string."
+  (kill-new (anything-c-stringify string) replace yank-handler))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Prefix argument in action ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; TODO
+(defvar anything-current-prefix-arg nil
+  "`current-prefix-arg' when selecting action.
+It is cleared after executing action.")
+
+(defadvice anything-exit-minibuffer (before anything-current-prefix-arg activate)
+  (unless anything-current-prefix-arg
+    (setq anything-current-prefix-arg current-prefix-arg)))
+
+(add-hook 'anything-after-action-hook
+          (lambda () (setq anything-current-prefix-arg nil)))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Hacks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defadvice eval-defun (after anything-source-hack activate)
+  "See `anything-c-enable-eval-defun-hack'."
+  (when anything-c-enable-eval-defun-hack
+    (let ((varsym (save-excursion
+                    (beginning-of-defun)
+                    (forward-char 1)
+                    (when (memq (read (current-buffer)) '(defvar setq))
+                      (read (current-buffer))))))
+      (when (string-match "^anything-c-source-" (symbol-name varsym))
+        (anything varsym)))))
+;; (progn (ad-disable-advice 'eval-defun 'after 'anything-source-hack) (ad-update 'eval-defun))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Document Generator ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun anything-c-create-summary ()
+  "Create `anything' summary."
+  (save-excursion
+    (goto-char (point-min))
+    (loop while (re-search-forward "^;;;; <\\(.+?\\)>$\\|^;; (anything '\\(.+?\\))$\\|^ *;; (anything '\\(.+?\\))$"  nil t)
+          collect (cond ((match-beginning 1)
+                         (cons 'section (match-string-no-properties 1)))
+                        ((match-beginning 2)
+                         (cons 'source
+                               (cons (match-string-no-properties 2)
+                                     (assoc-default 'name (symbol-value (intern (match-string-no-properties 2)))))))
+                        ((match-beginning 3)
+                         (cons 'source
+                               (cons (match-string-no-properties 3)
+                                     (assoc-default 'name (symbol-value (intern (match-string-no-properties 3)))))))))))
+                         
+;; (find-epp (anything-c-create-summary))
+
+(defun anything-c-insert-summary ()
+  "Insert `anything' summary."
+  (save-excursion
+    (goto-char (point-min))
+    (search-forward ";; Below are complete source list you can setup in")
+    (forward-line 1)
+    (delete-region (point)
+                   (progn (search-forward ";;; Change log:" nil t)
+                          (forward-line -1) (point)))
+    (insert ";;\n")
+    (loop with beg
+          for (kind . value) in (anything-c-create-summary)
+          for i from 0
+          do (cond ((eq kind 'section)
+                    (unless (zerop i)
+                      (align-regexp beg (point) "\\(\\s-*\\)(" 1 1 nil))
+                    (insert ";;  " value ":\n")
+                    (setq beg (point)))
+                   (t
+                    (insert ";;     `" (car value) "'    (" (cdr value) ")\n")))
+          finally (align-regexp beg (point) "\\(\\s-*\\)(" 1 1 nil))))
+;; (anything-c-insert-summary)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Anything Sources ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; <Buffer>
+(defun anything-c-buffer-list ()
+  "Return the list of names of buffers with boring buffers filtered out.
+Boring buffers is specified by `anything-c-boring-buffer-regexp'.
+The first buffer in the list will be the last recently used
+buffer that is not the current buffer."
+  (let ((buffers (mapcar 'buffer-name (buffer-list))))
+    (append (cdr buffers) (list (car buffers)))))
+
+(defvar anything-c-source-buffers
+  '((name . "Buffers")
+    (candidates . anything-c-buffer-list)
+    (type . buffer)))
+;; (anything 'anything-c-source-buffers)
+
+(defvar anything-c-source-buffer-not-found
+  '((name . "Create buffer")
+    (dummy)
+    (type . buffer)))
+;; (anything 'anything-c-source-buffer-not-found)
+
+;;; Buffers+
+(defface anything-dir-heading '((t (:foreground "Blue" :background "Pink")))
+  "*Face used for directory headings in dired buffers."
+  :group 'anything)
+
+(defface anything-file-name
+  '((t (:foreground "Blue")))
+  "*Face used for file names (without suffixes) in dired buffers."
+  :group 'anything)
+
+(defface anything-dir-priv
+  '((t (:foreground "DarkRed" :background "LightGray")))
+  "*Face used for directory privilege indicator (d) in dired buffers."
+  :group 'anything)
+
+(defvar anything-c-buffers-face1 'anything-dir-priv)
+(defvar anything-c-buffers-face2 'font-lock-type-face)
+(defvar anything-c-buffers-face3 'italic)
+(eval-when-compile (require 'dired))
+(defun anything-c-highlight-buffers (buffers)
+  (require 'dired)
+  (loop for i in buffers
+        if (rassoc (get-buffer i) dired-buffers)
+        collect (propertize i
+                            'face anything-c-buffers-face1
+                            'help-echo (car (rassoc (get-buffer i) dired-buffers)))
+        if (buffer-file-name (get-buffer i))
+        collect (propertize i
+                            'face anything-c-buffers-face2
+                            'help-echo (buffer-file-name (get-buffer i)))
+        if (and (not (rassoc (get-buffer i) dired-buffers))
+                (not (buffer-file-name (get-buffer i))))
+        collect (propertize i
+                            'face anything-c-buffers-face3)))
+
+(defvar anything-c-source-buffers+
+  '((name . "Buffers")
+    (candidates . anything-c-buffer-list)
+    (type . buffer)
+    (candidate-transformer anything-c-skip-current-buffer
+                           anything-c-highlight-buffers
+                           anything-c-skip-boring-buffers)
+    (persistent-action . anything-c-buffers+-persistent-action)
+    (persistent-help . "Show this buffer / C-u \\[anything-execute-persistent-action]: Kill this buffer")))
+
+(defun anything-c-buffers+-persistent-action (name)
+  (flet ((kill (item)
+               (with-current-buffer item
+                 (if (and (buffer-modified-p)
+                          (buffer-file-name (current-buffer)))
+                     (progn
+                       (save-buffer)
+                       (kill-buffer item))
+                   (kill-buffer item))))
+         (goto (item)
+               (switch-to-buffer item)))
+    (if current-prefix-arg
+        (progn
+          (kill name)
+          (anything-delete-current-selection))
+      (goto name))))
+
+;; (anything 'anything-c-source-buffers+)
+
+
+;;;; <File>
+;;; File name history
+(defvar anything-c-source-file-name-history
+  '((name . "File Name History")
+    (candidates . file-name-history)
+    (match anything-c-match-on-file-name
+           anything-c-match-on-directory-name)
+    (type . file)))
+;; (anything 'anything-c-source-file-name-history)
+
+;;; Files in current dir
+(defvar anything-c-source-files-in-current-dir
+  '((name . "Files from Current Directory")
+    (candidates . (lambda ()
+                    (with-current-buffer anything-current-buffer
+                      (directory-files default-directory))))
+    ;; volatile is not needed, I think.
+    (type . file)))
+;; (anything 'anything-c-source-files-in-current-dir)
+
+(defvar anything-c-files-face1 'anything-dir-priv)
+(defvar anything-c-files-face2 'anything-file-name)
+(defun anything-c-highlight-files (files)
+  (loop for i in files
+        if (file-directory-p i)
+        collect (propertize (file-name-nondirectory i)
+                            'face anything-c-files-face1
+                            'help-echo (expand-file-name i))
+        else
+        collect (propertize (file-name-nondirectory i)
+                            'face anything-c-files-face2
+                            'help-echo (expand-file-name i))))
+
+
+(defvar anything-c-source-files-in-current-dir+
+  '((name . "Files from Current Directory")
+    (candidates . (lambda ()
+                    (with-current-buffer anything-current-buffer
+                      (directory-files default-directory t))))
+    (candidate-transformer anything-c-highlight-files)
+    ;; volatile is not needed, I think.
+    (type . file)))
+
+;; (anything 'anything-c-source-files-in-current-dir+)
+
+;;; Anything replacement of file name completion for `find-file' and friends.
+
+(defvar anything-c-find-files-doc-header (format " (`%s':Go to precedent level)"
+                                                 (if window-system "C-." "C-l")) 
+  "*The doc that is inserted in the Name header of a find-files or dired source.")
+
+(defvar anything-c-source-find-files
+  `((name . ,(concat "Find Files" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (init . (lambda ()
+              (setq ffap-newfile-prompt t)))
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action
+     . ,(delq
+         nil
+         `(("Find File" . find-file-at-point)
+           ("Find file in Dired" . anything-c-point-file-in-dired)
+           ,(and (locate-library "elscreen")
+                 '("Find file in Elscreen"  . anything-elscreen-find-file))
+           ("Complete at point"
+            . anything-c-insert-file-name-completion-at-point)
+           ("Delete File(s)" . anything-delete-marked-files)
+           ("Find file as root" . anything-find-file-as-root)
+           ("Open file externally (C-u to choose)"
+            . anything-c-open-file-externally)
+           ("Find file other window" . find-file-other-window)
+           ("Find file other frame" . find-file-other-frame))))))
+
+;; (anything 'anything-c-source-find-files)
+
+(defun* anything-reduce-file-name (fname level &key unix-close expand)
+    "Reduce FNAME by LEVEL from end or beginning depending LEVEL value.
+If LEVEL is positive reduce from end else from beginning.
+If UNIX-CLOSE is non--nil close filename with /.
+If EXPAND is non--nil expand-file-name."
+  (let* ((exp-fname  (expand-file-name fname))
+         (fname-list (split-string (if (or (string= fname "~/") expand)
+                                       exp-fname fname) "/" t))
+         (len        (length fname-list))
+         (pop-list   (if (< level 0)
+                         (subseq fname-list (* level -1))
+                         (subseq fname-list 0 (- len level))))
+         (result     (mapconcat 'identity pop-list "/"))
+         (empty      (string= result "")))
+    (when unix-close (setq result (concat result "/")))
+    (if (string-match "^~" result)
+        (if (string= result "~/") "~/" result)
+        (if (< level 0)
+            (if empty "../" (concat "../" result))
+            (cond ((and (eq system-type 'windows-nt) empty)
+                   "c:/")
+                  ((and (not empty) (eq system-type 'windows-nt))
+                   result)
+                  (empty "/")
+                  (t
+                   (concat "/" result)))))))
+
+(defun anything-file-completion-source-p ()
+  "Test if current source is a dired or find-files source."
+  (let ((ff-sources '("Find Files" "Copy Files"
+                      "Rename Files" "Symlink Files"
+                      "Hardlink Files" "Write File"
+                      "Insert File" "Read file name"))
+        (cur-source (cdr (assoc 'name (anything-get-current-source)))))
+    (catch 'break
+      (dolist (i ff-sources)
+        (when (equal cur-source (concat i anything-c-find-files-doc-header))
+          (throw 'break t))))))
+
+(defun anything-find-files-down-one-level (arg)
+  "Go down one level like unix command `cd ..'.
+If prefix numeric arg is given go ARG level down."
+  (interactive "p")
+  (when (anything-file-completion-source-p)
+    (let ((new-pattern (anything-reduce-file-name anything-pattern arg :unix-close t :expand t)))
+      (with-selected-window (minibuffer-window)
+        (delete-minibuffer-contents)
+        (insert new-pattern)))))
+
+;; `C-.' doesn't work in terms use `C-l' instead. 
+(if window-system
+    (define-key anything-map (kbd "C-.") 'anything-find-files-down-one-level)
+  (define-key anything-map (kbd "C-l") 'anything-find-files-down-one-level))
+
+(defun anything-c-point-file-in-dired (file)
+  "Put point on filename FILE in dired buffer."
+  (dired (file-name-directory file))
+  (dired-goto-file file))
+
+(defun anything-create-tramp-name (fname)
+  "Build filename for `anything-pattern' like /su:: or /sudo::."
+  (apply #'tramp-make-tramp-file-name
+         (loop
+            with v = (tramp-dissect-file-name fname)
+            for i across v collect i)))
+  
+(defun anything-find-files-get-candidates ()
+  "Create candidate list for `anything-c-source-find-files'."
+  (let* ( ; Don't try to tramp connect before entering the second ":".
+         (tramp-file-name-regexp "\\`/\\([^[/:]+\\|[^/]+]\\):.*:?")
+         (path (cond ((string-match "^~" anything-pattern)
+                      (replace-match (getenv "HOME") nil t anything-pattern))
+                     ((string-match tramp-file-name-regexp anything-pattern)
+                      (let ((tramp-name (anything-create-tramp-name
+                                         (match-string 0 anything-pattern))))
+                        (replace-match tramp-name nil t anything-pattern)))
+                     (t anything-pattern)))
+         (tramp-verbose anything-tramp-verbose)) ; No tramp message when 0.
+    ;; Inlined version (<2010-02-18 Jeu.>.) of `tramp-handle-directory-files'
+    ;; to fix bug in tramp that doesn't show the dot file names(i.e "." "..")
+    ;; and sorting.
+    (flet ((tramp-handle-directory-files
+               (directory &optional full match nosort files-only)
+             "Like `directory-files' for Tramp files."
+             ;; FILES-ONLY is valid for XEmacs only.
+             (when (file-directory-p directory)
+               (setq directory (file-name-as-directory (expand-file-name directory)))
+               (let ((temp (nreverse (file-name-all-completions "" directory)))
+                     result item)
+
+                 (while temp
+                   (setq item (directory-file-name (pop temp)))
+                   (when (and (or (null match) (string-match match item))
+                              (or (null files-only)
+                                  ;; Files only.
+                                  (and (equal files-only t) (file-regular-p item))
+                                  ;; Directories only.
+                                  (file-directory-p item)))
+                     (push (if full (concat directory item) item)
+                           result)))
+                 (if nosort result (sort result 'string<))))))
+
+      (set-text-properties 0 (length path) nil path)
+      (setq anything-pattern path)
+      (cond ((or (file-regular-p path)
+                 (and ffap-url-regexp (string-match ffap-url-regexp path)))
+             (list path))
+            ((string= anything-pattern "") (directory-files "/" t))
+            ((file-directory-p path) (directory-files path t))
+            (t
+             (append
+              (list path)
+              (directory-files (file-name-directory path) t)))))))
+
+(defface anything-dired-symlink-face
+  '((t (:foreground "DarkOrange")))
+  "*Face used for symlinks in `anything-find-files'."
+  :group 'anything)
+
+(defun anything-c-highlight-ffiles (files)
+  "Candidate transformer for `anything-c-source-find-files'."
+  (loop for i in files
+     if (file-symlink-p i)
+     collect (propertize i 'face 'anything-dired-symlink-face
+                         'help-echo (file-truename i)) into a
+     if (file-directory-p i)
+     collect (propertize i 'face anything-c-files-face1) into a
+     else
+     collect (propertize i 'face anything-c-files-face2) into a
+     finally return a))
+
+
+(defun anything-find-files-persistent-action (candidate)
+  "Open subtree CANDIDATE without quitting anything.
+If CANDIDATE is not a directory expand CANDIDATE filename.
+If CANDIDATE is alone, open file CANDIDATE filename."
+  (flet ((insert-in-minibuffer (elm)
+           (with-selected-window (minibuffer-window)
+             (delete-minibuffer-contents)
+             (set-text-properties 0 (length elm) nil elm)
+             (insert elm))))
+    (cond ((and (file-directory-p candidate) (file-symlink-p candidate))
+           (insert-in-minibuffer (file-name-as-directory
+                                  (file-truename
+                                   (expand-file-name candidate)))))
+           ((file-directory-p candidate)
+            (insert-in-minibuffer (file-name-as-directory
+                                  (expand-file-name candidate))))
+          ((file-symlink-p candidate)
+           (insert-in-minibuffer (file-truename candidate)))
+          (t ; First hit on C-z expand CANDIDATE second hit open file.
+           (let ((new-pattern   (anything-get-selection anything-last-buffer))
+                 (num-lines-buf (with-current-buffer anything-last-buffer
+                                  (count-lines (point-min) (point-max)))))
+             (if (> num-lines-buf 3)
+                 (insert-in-minibuffer new-pattern) (find-file candidate)))))))
+
+(defun anything-c-insert-file-name-completion-at-point (candidate)
+  "Insert file name completion at point."
+  (let* ((end         (point))
+         (guess       (thing-at-point 'filename))
+         (full-path-p (or (string-match (concat "^" (getenv "HOME")) guess)
+                          (string-match "^[^\~]" guess))))
+    (set-text-properties 0 (length candidate) nil candidate)
+    (when (and guess (not (string= guess "")))
+      (search-backward guess (- (point) (length guess)))
+      (delete-region (point) end)
+      (if full-path-p
+          (insert (expand-file-name candidate))
+          (insert (abbreviate-file-name candidate))))))
+
+;;;###autoload
+(defun anything-find-files ()
+  "Preconfigured `anything' for anything implementation of `find-file'."
+  (interactive)
+  (anything 'anything-c-source-find-files
+            (anything-find-files-input (ffap-guesser)
+                                       (thing-at-point 'filename))
+            "Find Files or Url: " nil nil "*Anything Find Files*"))
+
+(defun anything-find-files-input (fap tap)
+  "Default input of `anything-find-files'."
+  (let* ((def-dir (if (eq major-mode 'dired-mode)
+                      (dired-current-directory)
+                      default-directory))
+         (file-p  (and fap (file-exists-p fap)
+                       (file-exists-p
+                        (file-name-directory (expand-file-name tap def-dir)))))
+         (input   (if file-p (expand-file-name tap def-dir) fap)))
+    (or input (expand-file-name def-dir))))
+
+;;; Anything completion for `write-file'.==> C-x C-w
+(defvar anything-c-source-write-file
+  `((name . ,(concat "Write File" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Write File" . (lambda (candidate)
+                        (write-file candidate 'confirm)))))))
+
+;;;###autoload
+(defun anything-write-file ()
+  "Preconfigured `anything' providing completion for `write-file'."
+  (interactive)
+  (anything 'anything-c-source-write-file
+            (expand-file-name default-directory)
+            "Write buffer to file: " nil nil "*Anything write file*"))
+
+;;; Anything completion for `insert-file'.==> C-x i
+(defvar anything-c-source-insert-file
+  `((name . ,(concat "Insert File" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Insert File" . (lambda (candidate)
+                        (when (y-or-n-p (format "Really insert %s in %s "
+                                                candidate anything-current-buffer))
+                          (insert-file-contents candidate))))))))
+
+;;;###autoload
+(defun anything-insert-file ()
+  "Preconfigured `anything' providing completion for `insert-file'."
+  (interactive)
+  (anything 'anything-c-source-insert-file
+            (expand-file-name default-directory)
+            "Insert file: " nil nil "*Anything insert file*"))
+
+;;; Anything completion for copy, rename and (rel)sym/hard/link files from dired.
+(defvar anything-c-source-copy-files
+  `((name . ,(concat "Copy Files" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Copy File"
+       . (lambda (candidate)
+           (anything-dired-action candidate :action 'copy)))
+      ("Copy and Follow"
+       . (lambda (candidate)
+           (anything-dired-action candidate :action 'copy :follow t)))))))
+
+
+(defvar  anything-c-source-rename-files
+  `((name . ,(concat "Rename Files" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Rename File"
+       . (lambda (candidate)
+           (anything-dired-action candidate :action 'rename)))
+      ("Rename and Follow"
+       . (lambda (candidate)
+           (anything-dired-action candidate :action 'rename :follow t)))))))
+
+(defvar anything-c-source-symlink-files
+  `((name . ,(concat "Symlink Files" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Symlink File" . (lambda (candidate)
+                          (anything-dired-action candidate :action 'symlink)))
+      ("RelSymlink File" . (lambda (candidate)
+                             (anything-dired-action candidate :action 'relsymlink)))))))
+
+
+(defvar anything-c-source-hardlink-files
+  `((name . ,(concat "Hardlink Files" anything-c-find-files-doc-header))
+    ;; It is needed for filenames with capital letters
+    (disable-shortcuts)
+    (candidates . anything-find-files-get-candidates)
+    (candidate-transformer anything-c-highlight-ffiles)
+    (persistent-action . anything-find-files-persistent-action)
+    (persistent-help . "Expand Candidate")
+    (volatile)
+    (action .
+     (("Hardlink File" . (lambda (candidate)
+                           (anything-dired-action candidate :action 'hardlink)))))))
+
+(defun* anything-dired-action (candidate &key action follow)
+  "Copy, rename or symlink file at point or marked files in dired to CANDIDATE.
+ACTION is a key that can be one of 'copy, 'rename, 'symlink, 'relsymlink."
+  (let ((files  (dired-get-marked-files))
+        (fn     (case action
+                  ('copy       'dired-copy-file)
+                  ('rename     'dired-rename-file)
+                  ('symlink    'make-symbolic-link)
+                  ('relsymlink 'dired-make-relative-symlink)
+                  ('hardlink   'dired-hardlink)))
+        (marker (case action
+                  ((copy rename)   dired-keep-marker-copy)
+                  ('symlink        dired-keep-marker-symlink)
+                  ('relsymlink     dired-keep-marker-relsymlink)
+                  ('hardlink       dired-keep-marker-hardlink))))
+    (dired-create-files
+     fn (symbol-name action) files
+     (if (file-directory-p candidate)
+         ;; When CANDIDATE is a directory, build file-name in this directory.
+         ;; Else we use CANDIDATE.
+         #'(lambda (from)
+             (expand-file-name (file-name-nondirectory from) candidate))
+         #'(lambda (from) candidate))
+     marker)
+    (when follow
+      (let* ((src          (car files))
+             (dest         (expand-file-name candidate))
+             (basename-src (if (file-directory-p src)
+                               (file-relative-name
+                                (directory-file-name src)
+                                (file-name-directory src))
+                               (file-name-nondirectory src)))
+             (fname        (if (file-directory-p dest)
+                               (concat (file-name-as-directory dest)
+                                       basename-src)
+                               dest)))
+        (anything-c-point-file-in-dired fname)))))
+
+
+(defun* anything-dired-do-action-on-file (&key action)
+  (let* ((files     (dired-get-marked-files))
+         (len       (length files))
+         (fname     (if (> len 1)
+                        (format "* %d Files" len)
+                        (car files)))
+         (source    (case action
+                      ('copy     'anything-c-source-copy-files)
+                      ('rename   'anything-c-source-rename-files)
+                      ('symlink  'anything-c-source-symlink-files)
+                      ('hardlink 'anything-c-source-hardlink-files)))
+         (prompt-fm (case action
+                      ('copy     "Copy %s to: ")
+                      ('rename   "Rename %s to: ")
+                      ('symlink  "Symlink %s to: ")
+                      ('hardlink "Hardlink %s to: ")))
+         (buffer    (case action
+                      ('copy     "*Anything Copy Files*")
+                      ('rename   "*Anything Rename Files*")
+                      ('symlink  "*Anything Symlink Files*")
+                      ('hardlink "*Anything Hardlink Files*"))))
+    (anything source
+              (or (dired-dwim-target-directory)
+                  (expand-file-name default-directory))
+              (format prompt-fm fname) nil nil buffer)))
+
+
+;;;###autoload
+(defun anything-dired-rename-file ()
+  "Preconfigured `anything' to rename files from dired."
+  (interactive)
+  (anything-dired-do-action-on-file :action 'rename))
+
+;;;###autoload
+(defun anything-dired-copy-file ()
+  "Preconfigured `anything' to copy files from dired."
+  (interactive)
+  (anything-dired-do-action-on-file :action 'copy))
+
+;;;###autoload
+(defun anything-dired-symlink-file ()
+  "Preconfigured `anything' to symlink files from dired."
+  (interactive)
+  (anything-dired-do-action-on-file :action 'symlink))
+
+;;;###autoload
+(defun anything-dired-hardlink-file ()
+  "Preconfigured `anything' to hardlink files from dired."
+  (interactive)
+  (anything-dired-do-action-on-file :action 'hardlink))
+
+(defvar anything-dired-bindings nil)
+;;;###autoload
+(defun anything-dired-bindings (&optional arg)
+  "Replace usual dired commands `C' and `R' by anything ones.
+When call interactively toggle dired bindings and anything bindings.
+When call non--interactively with arg > 0, enable anything bindings.
+You can put (anything-dired-binding 1) in init file to enable anything bindings."
+  (interactive)
+  (if (or (when arg (> arg 0)) (not anything-dired-bindings))
+      (progn
+        (define-key dired-mode-map (kbd "C") 'anything-dired-copy-file)
+        (define-key dired-mode-map (kbd "R") 'anything-dired-rename-file)
+        (define-key dired-mode-map (kbd "S") 'anything-dired-symlink-file)
+        (define-key dired-mode-map (kbd "H") 'anything-dired-hardlink-file)
+        (setq anything-dired-bindings t))
+      (define-key dired-mode-map (kbd "C") 'dired-do-copy)
+      (define-key dired-mode-map (kbd "R") 'dired-do-rename)
+      (define-key dired-mode-map (kbd "S") 'dired-do-symlink)
+      (define-key dired-mode-map (kbd "H") 'dired-do-hardlink)
+      (setq anything-dired-bindings nil)))
+
+(defun* anything-c-read-file-name (prompt &key (initial-input default-directory)
+                                        (buffer "*Anything Completions*")
+                                        test)
+  "Anything `read-file-name' emulation.
+INITIAL-INPUT is a valid path, TEST is a predicate that take one arg."
+  (when (get-buffer anything-action-buffer)
+    (kill-buffer anything-action-buffer))
+  (or (anything
+       `((name . ,(concat "Read file name" anything-c-find-files-doc-header))
+         ;; It is needed for filenames with capital letters
+         (disable-shortcuts)
+         (candidates . (lambda ()
+                         (if test
+                             (loop with seq = (anything-find-files-get-candidates)
+                                for fname in seq when (funcall test fname)
+                                collect fname)
+                             (anything-find-files-get-candidates))))
+         (candidate-transformer anything-c-highlight-ffiles)
+         (persistent-action . anything-find-files-persistent-action)
+         (persistent-help . "Expand Candidate")
+         (volatile)
+         (action . (("candidate" . ,'identity))))
+         initial-input prompt 'noresume nil buffer)
+      (keyboard-quit)))
+
+;;; File Cache
+(defvar anything-c-source-file-cache-initialized nil)
+
+(defvar anything-c-file-cache-files nil)
+
+(defvar anything-c-source-file-cache
+  '((name . "File Cache")
+    (init . (lambda ()
+              (require 'filecache nil t)
+              (unless anything-c-source-file-cache-initialized
+                (setq anything-c-file-cache-files
+                      (loop for item in file-cache-alist append
+                            (destructuring-bind (base &rest dirs) item
+                              (loop for dir in dirs collect
+                                    (concat dir base)))))
+                (defadvice file-cache-add-file (after file-cache-list activate)
+                  (add-to-list 'anything-c-file-cache-files (expand-file-name file)))
+                (setq anything-c-source-file-cache-initialized t))))
+    (candidates . anything-c-file-cache-files)
+    (match anything-c-match-on-file-name
+           anything-c-match-on-directory-name)
+    (type . file)))
+;; (anything 'anything-c-source-file-cache)
+
+;;; Locate
+;; NOTE for WINDOZE users:
+;; You have to install Everything with his command line interface here:
+;; http://www.voidtools.com/download.php
+
+(defvar anything-c-locate-command
+  (case system-type
+    ('gnu/linux "locate -i -r %s")
+    ('berkeley-unix "locate -i %s")
+    ('windows-nt "es -i -r %s")
+    (t "locate %s"))
+  "A list of arguments for locate program.
+The \"-r\" option must be the last option.")
+
+(defun anything-c-locate-init ()
+  "Initialize async locate process for `anything-c-source-locate'."
+  (start-process-shell-command "locate-process" nil
+                               (format anything-c-locate-command
+                                       anything-pattern)))
+
+(defvar anything-c-source-locate
+  '((name . "Locate")
+    (candidates . anything-c-locate-init)
+    (type . file)
+    (requires-pattern . 3)
+    (delayed))
+  "Find files matching the current input pattern with locate.")
+
+;; (anything 'anything-c-source-locate)
+
+;;; Recentf files
+(defvar anything-c-source-recentf
+  '((name . "Recentf")
+    (init . (lambda ()
+              (require 'recentf)
+              (or recentf-mode (recentf-mode 1))
+              ;; Big value empowers anything/recentf
+              (when (and (numberp recentf-max-saved-items)
+                         (<= recentf-max-saved-items 20))
+                (setq recentf-max-saved-items 500))))
+    (candidates . recentf-list)
+    (match anything-c-match-on-file-name
+           anything-c-match-on-directory-name)
+    (type . file))
+  "See (info \"(emacs)File Conveniences\").
+if `recentf-max-saved-items' is too small, set it to 500.")
+;; (anything 'anything-c-source-recentf)
+
+;;; ffap
+(eval-when-compile (require 'ffap))
+(defvar anything-c-source-ffap-guesser
+  '((name . "File at point")
+    (init . (lambda () (require 'ffap)))
+    (candidates . (lambda ()
+                    (anything-aif
+                        (with-current-buffer anything-current-buffer
+                          (ffap-guesser))
+                        (list it))))
+    (type . file)))
+;; (anything 'anything-c-source-ffap-guesser)
+
+;;; ffap with line number
+(defun anything-c-ffap-file-line-at-point ()
+  "Get (FILENAME . LINENO) at point."
+  (anything-aif (let (ffap-alist) (ffap-file-at-point))
+      (save-excursion
+        (beginning-of-line)
+        (when (and (search-forward it nil t)
+                   (looking-at ":\\([0-9]+\\)"))
+          (cons it (string-to-number (match-string 1)))))))
+
+(defvar anything-c-ffap-line-location nil
+  "(FILENAME . LINENO) used by `anything-c-source-ffap-line'.
+It is cleared after jumping line.")
+
+(defun anything-c-ffap-line-candidates ()
+  (with-current-buffer anything-current-buffer
+    (setq anything-c-ffap-line-location (anything-c-ffap-file-line-at-point)))
+  (when anything-c-ffap-line-location
+    (destructuring-bind (file . line) anything-c-ffap-line-location
+      (list (cons (format "%s (line %d)" file line) file)))))
+
+;;; Goto line after opening file by `anything-c-source-ffap-line'.
+(defun anything-c-ffap-line-goto-line ()
+  (when (car anything-c-ffap-line-location)
+    (unwind-protect
+        (ignore-errors
+          (with-selected-window (get-buffer-window
+                                 (get-file-buffer (car anything-c-ffap-line-location)))
+            (anything-goto-line (cdr anything-c-ffap-line-location)))))))
+(add-hook 'anything-after-action-hook 'anything-c-ffap-line-goto-line)
+(add-hook 'anything-after-persistent-action-hook 'anything-c-ffap-line-goto-line)
+
+(defvar anything-c-source-ffap-line
+  '((name . "File/Lineno at point")
+    (init . (lambda () (require 'ffap)))
+    (candidates . anything-c-ffap-line-candidates)
+    (type . file)))
+;; (anything 'anything-c-source-ffap-line)
+
+;;; list of files gleaned from every dired buffer
+(defun anything-c-files-in-all-dired-candidates ()
+  (save-excursion
+    (mapcan
+     (lambda (dir)
+       (cond ((listp dir)               ;filelist
+              dir)
+             ((equal "" (file-name-nondirectory dir)) ;dir
+              (directory-files dir t))
+             (t                         ;wildcard
+              (file-expand-wildcards dir t))))
+     (delq nil
+           (mapcar (lambda (buf)
+                     (set-buffer buf)
+                     (when (eq major-mode 'dired-mode)
+                       (if (consp dired-directory)
+                           (cdr dired-directory) ;filelist
+                         dired-directory))) ;dir or wildcard
+                   (buffer-list))))))
+;; (dired '("~/" "~/.emacs-custom.el" "~/.emacs.bmk"))
+
+(defvar anything-c-source-files-in-all-dired
+  '((name . "Files in all dired buffer.")
+    (candidates . anything-c-files-in-all-dired-candidates)
+    (type . file)))
+;; (anything 'anything-c-source-files-in-all-dired)
+
+;;;; <info>
+;;; Info pages
+(defvar anything-c-info-pages nil
+  "All info pages on system.
+Will be calculated the first time you invoke anything with this
+source.")
+
+(defvar anything-c-source-info-pages
+  `((name . "Info Pages")
+    (candidates . (lambda ()
+                    (if anything-c-info-pages
+                        anything-c-info-pages
+                      (setq anything-c-info-pages
+                            (save-window-excursion
+                              (save-excursion
+                                (require 'info)
+                                (Info-find-node "dir" "top")
+                                (goto-char (point-min))
+                                (let ((info-topic-regexp "\\* +\\([^:]+: ([^)]+)[^.]*\\)\\.")
+                                      topics)
+                                  (while (re-search-forward info-topic-regexp nil t)
+                                    (add-to-list 'topics (match-string-no-properties 1)))
+                                  (goto-char (point-min))
+                                  (Info-exit)
+                                  topics)))))))
+    (action . (("Show with Info" .(lambda (node-str)
+                                    (info (replace-regexp-in-string "^[^:]+: "
+                                                                    ""
+                                                                    node-str))))))
+    (requires-pattern . 2)))
+;; (anything 'anything-c-source-info-pages)
+
+
+;;; Use info-index plug-in. Note that `name' attribute is
+;;; not needed but `anything-c-insert-summary' uses it.
+;; Info Elisp
+(defvar anything-c-source-info-elisp
+  '((name . "Info index: elisp")
+    (info-index . "elisp")))
+;; (anything 'anything-c-source-info-elisp)
+
+;; Info-Common-Lisp
+(defvar anything-c-source-info-cl
+  '((name . "Info index: cl")
+    (info-index . "cl")))
+;; (anything 'anything-c-source-info-cl)
+
+;; Info Index org
+(defvar anything-c-source-info-org
+  '((name . "Info index: org")
+    (info-index . "org")))
+;; (anything 'anything-c-source-info-org)
+
+;; Info Index ratpoison
+(defvar anything-c-source-info-ratpoison
+  '((name . "Info index: ratpoison")
+    (info-index . "ratpoison")))
+;; (anything 'anything-c-source-info-ratpoison)