Index: file-commands.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/file-commands.lisp,v
retrieving revision 1.9
diff -u -r1.9 file-commands.lisp
--- file-commands.lisp	23 Apr 2006 19:37:58 -0000	1.9
+++ file-commands.lisp	26 Apr 2006 14:07:52 -0000
@@ -250,14 +250,16 @@
     (or (filepath buffer)
 	(user-homedir-pathname)))))
 
-(define-command (com-find-file :name t :command-table buffer-table) ()
-  (let* ((filepath (accept 'pathname :prompt "Find File"
-			   :default (directory-of-buffer (buffer (current-window)))
-			   :default-type 'pathname
-			   :insert-default t)))
-    (find-file filepath)))
+(define-command (com-find-file :name t :command-table buffer-table)
+    ((filepath 'pathname 
+               :default (directory-of-buffer (buffer (current-window)))
+               :default-type 'pathname
+               :insert-default t
+               :prompt "Find File: " 
+               :prompt-mode :raw))
+  (find-file filepath))
 
-(set-key 'com-find-file
+(set-key `(com-find-file ,*unsupplied-argument-marker*)
 	 'buffer-table
 	 '((#\x :control) (#\f :control)))
 
Index: gui.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/gui.lisp,v
retrieving revision 1.209
diff -u -r1.209 gui.lisp
--- gui.lisp	27 Mar 2006 15:54:31 -0000	1.209
+++ gui.lisp	26 Apr 2006 14:07:52 -0000
@@ -221,6 +221,33 @@
 	    (*mini-fg-color* +white+))
 	(climacs :new-process new-process :process-name process-name :width width :height height))))
 
+(define-presentation-type read-only ())
+(define-presentation-method highlight-presentation 
+    ((type read-only) record stream state)
+  nil)
+(define-presentation-type modified ())
+(define-presentation-method highlight-presentation 
+    ((type modified) record stream state)
+  nil)
+
+(define-command (com-toggle-read-only :name t :command-table base-table)
+    ((buffer 'buffer))
+  (setf (read-only-p buffer) (not (read-only-p buffer))))
+(define-presentation-to-command-translator toggle-read-only
+    (read-only com-toggle-read-only base-table
+     :gesture :menu)
+    (object)
+  (list object))
+
+(define-command (com-toggle-modified :name t :command-table base-table)
+    ((buffer 'buffer))
+  (setf (needs-saving buffer) (not (needs-saving buffer))))
+(define-presentation-to-command-translator toggle-modified
+    (modified com-toggle-modified base-table
+     :gesture :menu)
+    (object)
+  (list object))
+
 (defun display-info (frame pane)
   (let* ((master-pane (master-pane pane))
 	 (buffer (buffer master-pane))
@@ -228,16 +255,24 @@
 	 (top (top master-pane))
 	 (bot (bot master-pane)))
     (princ "   " pane)
-    (princ (cond ((and (needs-saving buffer)
-		       (read-only-p buffer)
-		       "%*"))
-		 ((needs-saving buffer) "**")
-		 ((read-only-p buffer) "%%")
-		 (t "--"))
-	   pane)
+    (with-output-as-presentation (pane buffer 'read-only)
+      (princ (cond
+               ((read-only-p buffer) "%")
+               ((needs-saving buffer) "*")
+               (t "-"))
+             pane))
+    (with-output-as-presentation (pane buffer 'modified)
+      (princ (cond
+               ((needs-saving buffer) "*")
+               ((read-only-p buffer) "%")
+               (t "-"))
+             pane))
     (princ "  " pane)
     (with-text-face (pane :bold)
-      (format pane "~25A" (name buffer)))
+      (with-output-as-presentation (pane buffer 'buffer)
+        (format pane "~A" (name buffer)))
+      ;; FIXME: bare 25.
+      (format pane "~V@T" (- 25 (length (name buffer)))))
     (format pane "  ~A  "
 	    (cond ((and (mark= size bot)
 			(mark= 0 top))
@@ -474,13 +509,13 @@
 (defmethod kill-buffer ((symbol (eql 'nil)))
   (kill-buffer (buffer (current-window))))
 
-(define-command (com-kill-buffer :name t :command-table pane-table) ()
-  (let ((buffer (accept 'buffer
-			:prompt "Kill buffer"
-			:default (buffer (current-window))
-			:default-type 'buffer)))
-    (kill-buffer buffer)))
+(define-command (com-kill-buffer :name t :command-table pane-table)
+    ((buffer 'buffer
+             :prompt "Kill buffer"
+             :default (buffer (current-window))
+             :default-type 'buffer))
+  (kill-buffer buffer))
 
-(set-key 'com-kill-buffer
+(set-key `(com-kill-buffer ,*unsupplied-argument-marker*)
 	 'pane-table
 	 '((#\x :control) (#\k)))
