     (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

(anything-document-attribute 'subexp "Headline plug-in"
  "Display (match-string-no-properties subexp).")

(defun anything-headline-get-candidates (regexp subexp)
  (save-excursion
    (set-buffer anything-current-buffer)
    (save-excursion
      (goto-char (point-min))
      (if (functionp regexp) (setq regexp (funcall regexp)))
      (let (hierarchy curhead)
        (flet ((matched ()
                        (if (numberp subexp)
                            (cons (match-string-no-properties subexp) (match-beginning subexp))
                          (cons (buffer-substring (point-at-bol) (point-at-eol))
                                (point-at-bol))))
               (hierarchies (headlines)
                            (1+ (loop for (_ . hierarchy) in headlines
                                      maximize hierarchy)))
               (vector-0-n (v n)
                           (loop for i from 0 to hierarchy
                                 collecting (aref curhead i)))
               (arrange (headlines)
                        (loop with curhead = (make-vector (hierarchies headlines) "")
                              for ((str . pt) . hierarchy) in headlines
                              do (aset curhead hierarchy str)
                              collecting
                              (cons
                               (mapconcat 'identity (vector-0-n curhead hierarchy) " / ")
                               pt))))
          (if (listp regexp)
              (arrange
               (sort
                (loop for re in regexp
                      for hierarchy from 0
                      do (goto-char (point-min))
                      appending
                      (loop
                       while (re-search-forward re nil t)
                       collect (cons (matched) hierarchy)))
                (lambda (a b) (> (cdar b) (cdar a)))))
            (loop while (re-search-forward regexp nil t)
                  collect (matched))))))))

(defun anything-headline-make-candidate-buffer (regexp subexp)
  (with-current-buffer (anything-candidate-buffer 'local)

  :group 'anything-config)

(defcustom anything-c-google-suggest-url
  "http://google.com/complete/search?output=toolbar&q="
  "URL used for looking up suggestions."
  :type 'string
  :group 'anything-config)
