[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Sat Jan 26 23:06:04 UTC 2008


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv16324

Modified Files:
	file-commands.lisp gui.lisp 
Log Message:
Make defaults for view-switching slightly nicer.


--- /project/climacs/cvsroot/climacs/file-commands.lisp	2007/12/08 08:55:06	1.29
+++ /project/climacs/cvsroot/climacs/file-commands.lisp	2008/01/26 23:06:04	1.30
@@ -137,7 +137,9 @@
 ;;; Buffer commands
 
 (define-command (com-switch-to-view :name t :command-table pane-table)
-    ((view 'view :default (or (second (views *application-frame*))
+    ;; Perhaps the default should be an undisplayed view?
+    ((view 'view :default (or (find (current-view) (views *application-frame*)
+                               :test (complement #'eq))
                               (any-view))))
   "Prompt for a buffer name and switch to that buffer.
 If the a buffer with that name does not exist, create it. Uses
--- /project/climacs/cvsroot/climacs/gui.lisp	2008/01/20 19:51:48	1.255
+++ /project/climacs/cvsroot/climacs/gui.lisp	2008/01/26 23:06:04	1.256
@@ -137,6 +137,11 @@
                  (cancel ()
                   :report "Cancel the setting of the windows view and just return nil")))
               (t (call-next-method)))
+      ;; Move view to the front of the view-list, doesn't carry
+      ;; semantic significance, but makes view-switching more
+      ;; convenient.
+      (setf (views (pane-frame pane))
+            (cons view (delete view (views (pane-frame pane)))))
       (when old-view-active
         (ensure-only-view-active (pane-frame pane) view)))))
 




More information about the Climacs-cvs mailing list