[FIXED] appinfo.json bug in buffer history. blurgh.

This commit is contained in:
Sami Samhuri 2009-11-21 16:11:31 -08:00
parent bb69ad4000
commit a9574633c8

View file

@ -336,13 +336,14 @@ NAME is the name of the scene."
(defun read-json-file (filename) (defun read-json-file (filename)
"Parse the JSON in FILENAME and return the result." "Parse the JSON in FILENAME and return the result."
(let ((origbuffer (current-buffer)) (save-excursion
(filebuffer (find-file filename)) (let ((origbuffer (current-buffer))
(text)) (filebuffer (find-file filename))
(goto-char (point-min)) ;; in case buffer already open (text))
(let ((text (buffer-string))) (goto-char (point-min)) ;; in case buffer already open
(switch-to-buffer origbuffer) (let ((text (buffer-string)))
(json-read-from-string text)))) (set-buffer origbuffer)
(json-read-from-string text)))))
(defun mojo-app-version () (defun mojo-app-version ()
"Parse the project version from the appinfo.json file in `MOJO-ROOT'." "Parse the project version from the appinfo.json file in `MOJO-ROOT'."
@ -397,8 +398,7 @@ NAME is the name of the scene."
(defun mojo-read-root () (defun mojo-read-root ()
"Get the path to a Mojo application, prompting with completion and "Get the path to a Mojo application, prompting with completion and
history." history."
(read-file-name "Mojo project: " (expand-file-name (concat mojo-project-directory (read-file-name "Mojo project: " (expand-file-name (concat mojo-project-directory "/"))))
"/"))))
(defun mojo-read-package-filename () (defun mojo-read-package-filename ()
"Get the filename of a packaged application, prompting with completion and "Get the filename of a packaged application, prompting with completion and