 (define-derived-mode ledger-reconcile-mode text-mode "Reconcile"
   "A mode for reconciling ledger entries."
   (let ((map (make-sparse-keymap)))
-    (define-key map [space] 'ledger-reconcile-toggle)
+    (define-key map [? ] 'ledger-reconcile-toggle)
     (use-local-map map)))
 
 (defvar ledger-buf nil)

  (let ((map (current-local-map)))
    (define-key map [(control ?c) (control ?n)] 'ledger-add-entry)
    (define-key map [(control ?c) (control ?c)]
  'ledger-clear-current)))

(defun ledger-parse-entries (account)
  (let* ((now (current-time))

				      (or year current-year)))
	      (when (or (not mark) (time-less-p then when))
		(forward-line)
		(setq total 0.0)
		(while (looking-at
			(concat "\\s-+\\([A-Za-z_].+?\\)\\(\\s-*$\\|  \\s-*"
				"\\([^0-9]+\\)\\s-*\\([0-9.]+\\)\\)"))
		  (let ((acct (match-string 1))
			(amt (match-string 4)))
		    (if amt
			(setq amt (string-to-number amt)
			      total (+ total amt)))
		    (if (string= account acct)
			(setq entries
			      (cons (list (copy-marker start)
					  mark when desc (or amt total))
				    entries))))
		  (forward-line)))))))
      (forward-line))
