[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Tue Jan 29 23:09:23 UTC 2008


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

Modified Files:
	file-commands.lisp gui.lisp packages.lisp window-commands.lisp 
Log Message:
Added sweet new menu items.


--- /project/climacs/cvsroot/climacs/file-commands.lisp	2008/01/26 23:06:04	1.30
+++ /project/climacs/cvsroot/climacs/file-commands.lisp	2008/01/29 23:09:22	1.31
@@ -136,35 +136,6 @@
 ;;; 
 ;;; Buffer commands
 
-(define-command (com-switch-to-view :name t :command-table pane-table)
-    ;; 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
-the name of the next buffer (if any) as a default."
-  (handler-case (switch-to-view (current-window) view)
-    (view-already-displayed (condition)
-      (other-window (window condition)))))
-
-(set-key `(com-switch-to-view ,*unsupplied-argument-marker*)
-	 'pane-table
-	 '((#\x :control) (#\b)))
-
-(define-command (com-kill-view :name t :command-table pane-table)
-    ((view 'view :prompt "Kill view"
-                 :default (current-view)))
-  "Prompt for a view name and kill that view.
-If the view is of a buffer and the buffer needs saving, you will
-be prompted to do so before killing it. Uses the current view
-as a default."
-  (kill-view view))
-
-(set-key `(com-kill-view ,*unsupplied-argument-marker*)
-	 'pane-table
-	 '((#\x :control) (#\k)))
-
 (define-command (com-toggle-read-only :name t :command-table buffer-table)
     ((buffer 'buffer :default (current-buffer *application-frame*)))
   (setf (read-only-p buffer) (not (read-only-p buffer))))
@@ -183,4 +154,4 @@
     (modified com-toggle-modified buffer-table
               :gesture :menu)
     (object)
-  (list object))
\ No newline at end of file
+  (list object))
--- /project/climacs/cvsroot/climacs/gui.lisp	2008/01/28 17:08:50	1.257
+++ /project/climacs/cvsroot/climacs/gui.lisp	2008/01/29 23:09:22	1.258
@@ -203,8 +203,6 @@
 (make-command-table 'buffer-table :errorp nil)
 ;;; Commands used for climacs development
 (make-command-table 'development-table :errorp nil)
-;;; Panes
-(make-command-table 'pane-table :errorp nil)
 ;;; Windows
 (make-command-table 'window-table :errorp nil)
 
@@ -219,7 +217,6 @@
                     :errorp nil
                     :inherit-from '(base-table
                                     buffer-table
-                                    pane-table
                                     window-table
                                     development-table
                                     climacs-help-table
@@ -242,30 +239,10 @@
 (make-command-table 'climacs-global-table
  :inherit-from (list (make-instance 'climacs-command-table
                       :name 'climacs-dispatching-table))
- :menu `(("File" :menu ,(make-command-table nil
-                         :inherit-from 'esa-io-table
-                         :menu `(("Find File"
-                                  :command (com-find-file ,*unsupplied-argument-marker*))
-                                 ("Find File (read-only)"
-                                  :command (com-find-file-read-only ,*unsupplied-argument-marker*))
-                                 ("Save Buffer"
-                                  :command (com-save-buffer))
-                                 ("Save Bufer As"
-                                  :command (com-write-buffer ,*unsupplied-argument-marker*))
-                                 ("Set Visited File Name"
-                                  :command (com-set-visited-file-name ,*unsupplied-argument-marker*))
-                                 (nil :divider :line)
-                                 ("Quit" :command com-quit))))
-         ("Help" :menu ,(make-command-table nil
-                         :inherit-from 'help-table
-                         :menu `(("Where is" :command com-where-is)
-                                 ("Describe Bindings" :command (com-describe-bindings nil))
-                                 ("Describe Bindings (sorted)" :command (com-describe-bindings t))
-                                 ("Describe Key" :command com-describe-key)
-                                 ("Describe Command"
-                                  :command (com-describe-command ,*unsupplied-argument-marker*))
-                                 ("Apropos Command"
-                                  :command (com-apropos-command ,*unsupplied-argument-marker*))))))
+ :menu `(("File" :menu esa-io-menu-table)
+         ("Macros" :menu keyboard-macro-menu-table)
+         ("Windows" :menu window-menu-table)
+         ("Help" :menu help-menu-table))
  :errorp nil)
 
 (define-application-frame climacs (esa-frame-mixin
--- /project/climacs/cvsroot/climacs/packages.lisp	2008/01/23 18:17:05	1.136
+++ /project/climacs/cvsroot/climacs/packages.lisp	2008/01/29 23:09:22	1.137
@@ -82,8 +82,8 @@
              #:global-climacs-table #:keyboard-macro-table #:climacs-help-table
              #:base-table #:buffer-table #:case-table 
              #:development-table
-             #:info-table #:pane-table
-             #:window-table
+             #:info-table
+             #:window-table #:window-menu-table
 
              ;; Typeout
              #:typeout-view #:typeout-view-p
--- /project/climacs/cvsroot/climacs/window-commands.lisp	2008/01/20 19:51:48	1.18
+++ /project/climacs/cvsroot/climacs/window-commands.lisp	2008/01/29 23:09:23	1.19
@@ -173,3 +173,46 @@
 	 'window-table
 	 '((#\x :control) (#\0)))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; 
+;;; Commands for switching/killing current view.
+
+(define-command (com-switch-to-view :name t :command-table window-table)
+    ;; 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 view name and switch to that view.
+If the a view with that name does not exist, create a buffer-view
+with the name and switch to it. Uses the name of the next
+view (if any) as a default."
+  (handler-case (switch-to-view (current-window) view)
+    (view-already-displayed (condition)
+      (other-window (window condition)))))
+
+(set-key `(com-switch-to-view ,*unsupplied-argument-marker*)
+	 'window-table
+	 '((#\x :control) (#\b)))
+
+(define-command (com-kill-view :name t :command-table window-table)
+    ((view 'view :prompt "Kill view"
+                 :default (current-view)))
+  "Prompt for a view name and kill that view.
+If the view is of a buffer and the buffer needs saving, you will
+be prompted to do so before killing it. Uses the current view
+as a default."
+  (kill-view view))
+
+(set-key `(com-kill-view ,*unsupplied-argument-marker*)
+	 'window-table
+	 '((#\x :control) (#\k)))
+
+(define-menu-table window-menu-table (window-table)
+  '(com-split-window-vertically nil)
+  '(com-split-window-horizontally nil)
+  'com-other-window
+  'com-single-window
+  'com-delete-window
+  :divider
+  `(com-switch-to-view ,*unsupplied-argument-marker*)
+  `(com-kill-view ,*unsupplied-argument-marker*))




More information about the Climacs-cvs mailing list