[climacs-cvs] CVS climacs
crhodes
crhodes at common-lisp.net
Mon Mar 27 15:43:17 UTC 2006
Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv29597
Modified Files:
file-commands.lisp gui.lisp
Log Message:
The order of events when executing a command must go:
1. execute the command
2. (a) update-syntax;
(b) update needs-saving;
3. redisplay panes
4. clear-modify
Put 1. and 2. in execute-frame-command :after and 4. in
execute-frame-command :around; 3. happens in execute-frame-command
:around ESA. It's not the tidiest implementation right now but it sort
of works.
Make sure that a loaded file has an up-to-date syntax and a cleared
modified flag.
--- /project/climacs/cvsroot/climacs/file-commands.lisp 2006/03/25 20:58:41 1.4
+++ /project/climacs/cvsroot/climacs/file-commands.lisp 2006/03/27 15:43:17 1.5
@@ -164,9 +164,8 @@
(name buffer) (filepath-filename filepath)
(needs-saving buffer) nil)
(beginning-of-buffer (point pane))
- ;; this one is needed so that the buffer modification protocol
- ;; resets the low and high marks after redisplay
- (redisplay-frame-panes *application-frame*)
+ (update-syntax buffer (syntax buffer))
+ (clear-modify buffer)
buffer))))))
(defun directory-of-buffer (buffer)
--- /project/climacs/cvsroot/climacs/gui.lisp 2006/03/27 14:10:24 1.207
+++ /project/climacs/cvsroot/climacs/gui.lisp 2006/03/27 15:43:17 1.208
@@ -188,15 +188,6 @@
"Return the current buffer."
(buffer (current-window)))
-(defmethod redisplay-frame-panes :around ((frame climacs) &rest args)
- (declare (ignore args))
- (let ((buffers (remove-duplicates (loop for pane in (windows frame)
- when (buffer-pane-p pane)
- collect (buffer pane)))))
- (loop for buffer in buffers
- do (update-syntax buffer (syntax buffer)))
- (call-next-method)))
-
(defun climacs (&key new-process (process-name "Climacs")
(width 900) (height 400))
"Starts up a climacs session"
@@ -288,10 +279,14 @@
(defmethod execute-frame-command :around ((frame climacs) command)
(let ((current-window (car (windows frame))))
(handler-case
- (if (buffer-pane-p current-window)
- (with-undo ((buffer current-window))
+ (progn
+ (if (buffer-pane-p current-window)
+ (with-undo ((buffer current-window))
+ (call-next-method))
(call-next-method))
- (call-next-method))
+ (loop for buffer in (buffers frame)
+ do (when (modified-p buffer)
+ (clear-modify buffer))))
(offset-before-beginning ()
(beep) (display-message "Beginning of buffer"))
(offset-after-end ()
@@ -309,9 +304,9 @@
(defmethod execute-frame-command :after ((frame climacs) command)
(loop for buffer in (buffers frame)
+ do (update-syntax buffer (syntax buffer))
do (when (modified-p buffer)
- (setf (needs-saving buffer) t)
- (clear-modify buffer))))
+ (setf (needs-saving buffer) t))))
(defmethod find-applicable-command-table ((frame climacs))
(or
More information about the Climacs-cvs
mailing list