(require 'anything-config)

;; From http://www.emacswiki.org/cgi-bin/wiki/AnythingSources
(defvar anything-c-source-occur
  '((name . "Occur")
    (init . (lambda ()
              (setq anything-occur-current-buffer
                    (current-buffer))))
    (candidates . (lambda ()
                    (let ((anything-occur-buffer (get-buffer-create "*Anything Occur*")))
                      (with-current-buffer anything-occur-buffer
                        (occur-mode)
                        (erase-buffer)
                        (let ((count (occur-engine anything-pattern
                                                   (list anything-occur-current-buffer) anything-occur-buffer
                                                   list-matching-lines-default-context-lines case-fold-search
                                                   list-matching-lines-buffer-name-face
                                                   nil list-matching-lines-face
                                                   (not (eq occur-excluded-properties t)))))
                          (when (> count 0)
                            (setq next-error-last-buffer anything-occur-buffer)
                            (cdr (split-string (buffer-string) "\n" t))))))))
    (action . (("Goto line" . (lambda (candidate)
                                (with-current-buffer "*Anything Occur*"
                                  (search-forward candidate))
                                (goto-line (string-to-number candidate) anything-occur-current-buffer)))))
    (requires-pattern . 3)
    (volatile)
    (delayed)))


(setq anything-sources
      '(anything-c-source-buffers
        anything-c-source-recentf
        anything-c-source-occur
        anything-c-source-files-in-current-dir
        anything-c-source-emacs-commands
        anything-c-source-emacs-functions))

(setq anything-samewindow nil)
(setq anything-input-idle-delay 0.05)

(global-set-key [\M-f10] 'anything)


(provide 'init-anything)

(require 'anything-config)

(setq anything-sources
      '(anything-c-source-buffers
        anything-c-source-recentf
        anything-c-source-occur
        anything-c-source-files-in-current-dir
        anything-c-source-emacs-commands
        anything-c-source-emacs-functions))

(setq anything-samewindow nil)
(setq anything-input-idle-delay 0.05)

(global-set-key [\M-f10] 'anything)


(provide 'init-anything)

Remove local anything-c-source-occur defn, which is now part of anything-config
Remove local anything-c-source-occur defn, which is now part of anything-config

ernest-dzf/emacs.d,danfengcao/emacs.d,gsmlg/emacs.d,cyjia/emacs.d,purcell/emacs.d,exclamaforte/emacs.d,jthetzel/emacs.d,Shanicky/emacs.d,kongfy/emacs.d,zuoshifan/emacs.d,wegatron/emacs.d,zuoshifan/emacs.d,farzadbekran/emacs.d,LittleLmp/emacs.d,Jadecity/PurcellEmacs.d,braveoyster/emacs.d,qinshulei/emacs.d,Enzo-Liu/emacs.d,zuoshifan/emacs.d,caoyuanqi/emacs.d,cjqw/emacs.d,farzadbekran/emacs.d,farzadbekran/emacs.d,baohaojun/emacs.d,ruiyang/emacs.d,blueseason/emacs.d,zuoshifan/emacs.d,LKI/emacs.d,wenpincui/emacs.d,qianwan/emacs.d,renatoriccio/emacs.d,svenyurgensson/emacs.d,zuoshifan/emacs.d,DarkThrone/emacs.d,jachinpy/emacs.d,scorpionis/emacs.d,blueabysm/emacs.d,Guoozz/emacs.d,farzadbekran/emacs.d,jkaessens/emacs.d,zhuoyikang/emacs.d,mmqmzk/emacs.d,zuoshifan/emacs.d,lromang/emacs.d,sgarciac/emacs.d,haodaivshen/emacs.d,me020523/emacs.d,bibaijin/emacs.d,arthurl/emacs.d,modkzs/emcs.d,hkcqr/emacs.d,dcorking/emacs.d,shafayetkhan/emacs.d,zhaotai/.emacs.d,Werewolflsp/emacs.d,ilove0518/emacs.d,carlosliu/emacs.d,atreeyang/emacs.d,krzysz00/emacs.d,whizzzkid/emacs.d,jachinpy/emacs.d,kindoblue/emacs.d,roxolan/emacs.d,lujianmei/emacs.d,YangXin/emacs.d,boblannon/emacs.d,Togal/emacs.d,ruiyang/emacs.d,zuoshifan/emacs.d,YangXin/emacs.d,pairyo/emacs.d,zuoshifan/emacs.d,dongdonghu/.emacs.d,alant/emacs.d,dhanunjaya/emacs.d,jhpx/emacs.d,zuoshifan/emacs.d,farzadbekran/emacs.d,hophacker/emacs.d,fengxl/emacs.d,zenith-john/emacs.d,emuio/emacs.d,mpwang/emacs.d,46do14/emacs.d,benkha/emacs.d,lust4life/emacs.d