 or the root directory is reached.  If the root directory is reached,
 the current directory will be used."
   (let (info regexps dir-regexp this-directory)
-    (setq top-directory (cscope-canonicalize-directory top-directory))
+    (setq top-directory (cscope-canonicalize-directory
+			 (or top-directory cscope-initial-directory)))
     (catch 'done
       ;; Try searching using `cscope-database-regexps' ...
       (setq regexps cscope-database-regexps)

;; * Locating the cscope databases:
;;
;; This module will first use the variable, `cscope-database-regexps',
;; to search for a suitable database directory.  If a database
;; location cannot be found using this variable, then the current
;; directory is searched, then the parent, then the parent's parent,
;; etc. until a cscope database directory is found, or the root
;; directory is reached.  If the root directory is reached, the
;; current directory will be used.
;;
;; A cscope database directory is one in which EITHER a cscope database
;; file (e.g., "cscope.out") OR a cscope file list (e.g.,

		    [ "Auto edit single match" (setq cscope-edit-single-match
						     (not cscope-edit-single-match))
		      :style toggle :selected cscope-edit-single-match ]
		    [ "Auto display *cscope* buffer"
		      (setq cscope-display-cscope-buffer
			    (not cscope-display-cscope-buffer))
		      :style toggle :selected cscope-display-cscope-buffer ]
		    [ "Stop at first matching database"
		      (setq cscope-stop-at-first-match-dir
			    (not cscope-stop-at-first-match-dir))
