 ;; New maintainer.
 ;;
 
-(defvar anything-version "$Id: anything.el,v 1.136 2008/10/27 17:41:27 rubikitch Exp $")
+(defvar anything-version "$Id: anything.el,v 1.137 2008/12/20 19:38:47 rubikitch Exp $")
 (require 'cl)
 
 ;; (@* "User Configuration")

  (interactive)
  (condition-case v
      (with-anything-restore-variables
       (let ((frameconfig (anything-current-frame/window-configuration))
             ;; It is needed because `anything-source-name' is non-nil
             ;; when `anything' is invoked by action. Awful global scope.
             anything-source-name anything-in-persistent-action
             (anything-buffer (or any-buffer anything-buffer))
             (anything-sources (anything-normalize-sources any-sources)))
         
         (add-hook 'post-command-hook 'anything-check-minibuffer-input)

         (setq anything-current-position (cons (point) (window-start)))
         (if any-resume
             (anything-initialize-overlays (anything-buffer-get))
           (anything-initialize))
         (setq anything-last-buffer anything-buffer)
         (when any-input (setq anything-input any-input anything-pattern any-input))
         (if anything-samewindow
             (switch-to-buffer anything-buffer)
           (pop-to-buffer anything-buffer))        

         (unwind-protect
             (progn
               (if any-resume (anything-mark-current-line) (anything-update))
               (select-frame-set-input-focus (window-frame (minibuffer-window)))
               (anything-preselect any-preselect)
               (let ((minibuffer-local-map anything-map))
                 (read-string (or any-prompt "pattern: ") (if any-resume anything-pattern any-input))))

           (anything-cleanup)
           (remove-hook 'post-command-hook 'anything-check-minibuffer-input)
           (anything-set-frame/window-configuration frameconfig))
         (unwind-protect
             (anything-execute-selection-action)
           (anything-aif (get-buffer anything-action-buffer)
               (kill-buffer it))
           (run-hooks 'anything-after-action-hook))))
    (quit
     (goto-char (car anything-current-position))
     (set-window-start (selected-window) (cdr anything-current-position))

;;; anything.el --- open anything / QuickSilver-like candidate-selection framework
;; $Id: anything.el,v 1.137 2008/12/20 19:38:47 rubikitch Exp $

;; Copyright (C) 2007  Tamas Patrovics
;;               2008  rubikitch <rubikitch@ruby-lang.org>
