/[climacs]/climacs/gui.lisp
ViewVC logotype

Diff of /climacs/gui.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.138 by crhodes, Tue May 10 16:28:53 2005 UTC revision 1.139 by crhodes, Thu May 19 09:04:26 2005 UTC
# Line 721  Line 721 
721      ;; resets the low and high marks after redisplay      ;; resets the low and high marks after redisplay
722      (redisplay-frame-panes *application-frame*)))      (redisplay-frame-panes *application-frame*)))
723    
724    (define-named-command com-insert-file ()
725      (let ((filename (accept 'completable-pathname
726                              :prompt "Insert File"))
727            (pane (current-window)))
728        (when (probe-file filename)
729          (setf (mark pane) (clone-mark (point pane) :left))
730          (with-open-file (stream filename :direction :input)
731            (input-from-stream stream
732                               (buffer pane)
733                               (offset (point pane))))
734          (psetf (offset (mark pane)) (offset (point pane))
735                 (offset (point pane)) (offset (mark pane))))
736        (redisplay-frame-panes *application-frame*)))
737    
738  (defun save-buffer (buffer)  (defun save-buffer (buffer)
739    (let ((filepath (or (filepath buffer)    (let ((filepath (or (filepath buffer)
740                        (accept 'completable-pathname                        (accept 'completable-pathname
# Line 1458  as two values" Line 1472  as two values"
1472  (c-x-set-key '(#\e) 'com-call-last-kbd-macro)  (c-x-set-key '(#\e) 'com-call-last-kbd-macro)
1473  (c-x-set-key '(#\c :control) 'com-quit)  (c-x-set-key '(#\c :control) 'com-quit)
1474  (c-x-set-key '(#\f :control) 'com-find-file)  (c-x-set-key '(#\f :control) 'com-find-file)
1475    (c-x-set-key '(#\i) 'com-insert-file)
1476  (c-x-set-key '(#\k) 'com-kill-buffer)  (c-x-set-key '(#\k) 'com-kill-buffer)
1477  (c-x-set-key '(#\l :control) 'com-load-file)  (c-x-set-key '(#\l :control) 'com-load-file)
1478  (c-x-set-key '(#\o) 'com-other-window)  (c-x-set-key '(#\o) 'com-other-window)

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139

  ViewVC Help
Powered by ViewVC 1.1.5