[climacs-cvs] CVS update: climacs/gui.lisp climacs/packages.lisp climacs/pane.lisp

Aleksandar Bakic abakic at common-lisp.net
Fri May 6 22:32:31 UTC 2005


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv21864

Modified Files:
	gui.lisp packages.lisp pane.lisp 
Log Message:
Contribution by John Q Splittist: Renamed occurrences of `filename'
(actually referring to pathnames) to `filepath'.

Date: Sat May  7 00:32:28 2005
Author: abakic

Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.133 climacs/gui.lisp:1.134
--- climacs/gui.lisp:1.133	Fri May  6 18:56:32 2005
+++ climacs/gui.lisp	Sat May  7 00:32:28 2005
@@ -693,14 +693,14 @@
     (declare (ignore success))
     (or pathname string)))
 
-(defun pathname-filename (pathname)
+(defun filepath-filename (pathname)
   (if (null (pathname-type pathname))
       (pathname-name pathname)
       (concatenate 'string (pathname-name pathname)
 		   "." (pathname-type pathname))))
 
 (define-named-command com-find-file ()
-  (let ((filename (accept 'completable-pathname
+  (let ((filepath (accept 'completable-pathname
 			  :prompt "Find File"))
 	(buffer (make-instance 'climacs-buffer))
 	(pane (current-window)))
@@ -709,11 +709,11 @@
     (setf (syntax buffer) (make-instance
 			   'basic-syntax :buffer (buffer (point pane))))
     ;; Don't want to create the file if it doesn't exist.
-    (when (probe-file filename) 
-      (with-open-file (stream filename :direction :input)
+    (when (probe-file filepath) 
+      (with-open-file (stream filepath :direction :input)
 	(input-from-stream stream buffer 0)))
-    (setf (filename buffer) filename
-	  (name buffer) (pathname-filename filename)
+    (setf (filepath buffer) filepath
+	  (name buffer) (filepath-filename filepath)
 	  (needs-saving buffer) nil)
     (beginning-of-buffer (point pane))
     ;; this one is needed so that the buffer modification protocol
@@ -721,19 +721,19 @@
     (redisplay-frame-panes *application-frame*)))
 
 (defun save-buffer (buffer)
-  (let ((filename (or (filename buffer)
+  (let ((filepath (or (filepath buffer)
 		      (accept 'completable-pathname
 			      :prompt "Save Buffer to File"))))
-    (with-open-file (stream filename :direction :output :if-exists :supersede)
+    (with-open-file (stream filepath :direction :output :if-exists :supersede)
       (output-to-stream stream buffer 0 (size buffer)))
-    (setf (filename buffer) filename
-	  (name buffer) (pathname-filename filename))
-    (display-message "Wrote: ~a" (filename buffer))
+    (setf (filepath buffer) filepath
+	  (name buffer) (filepath-filename filepath))
+    (display-message "Wrote: ~a" (filepath buffer))
     (setf (needs-saving buffer) nil)))
 
 (define-named-command com-save-buffer ()
   (let ((buffer (buffer (current-window))))
-    (if (or (null (filename buffer))
+    (if (or (null (filepath buffer))
 	    (needs-saving buffer))
 	(save-buffer buffer)
 	(display-message "No changes need to be saved from ~a" (name buffer)))))
@@ -756,15 +756,15 @@
     (frame-exit *application-frame*)))
 
 (define-named-command com-write-buffer ()
-  (let ((filename (accept 'completable-pathname
+  (let ((filepath (accept 'completable-pathname
 			  :prompt "Write Buffer to File"))
 	(buffer (buffer (current-window))))
-    (with-open-file (stream filename :direction :output :if-exists :supersede)
+    (with-open-file (stream filepath :direction :output :if-exists :supersede)
       (output-to-stream stream buffer 0 (size buffer)))
-    (setf (filename buffer) filename
-	  (name buffer) (pathname-filename filename)
+    (setf (filepath buffer) filepath
+	  (name buffer) (filepath-filename filepath)
 	  (needs-saving buffer) nil)
-    (display-message "Wrote: ~a" (filename buffer))))
+    (display-message "Wrote: ~a" (filepath buffer))))
 
 (define-presentation-method accept
     ((type buffer) stream (view textual-view) &key)
@@ -809,9 +809,9 @@
   (full-redisplay (current-window)))
 
 (define-named-command com-load-file ()
-  (let ((filename (accept 'completable-pathname
+  (let ((filepath (accept 'completable-pathname
 			  :prompt "Load File")))
-    (load filename)))
+    (load filepath)))
 
 (define-named-command com-beginning-of-buffer ()
   (beginning-of-buffer (point (current-window))))


Index: climacs/packages.lisp
diff -u climacs/packages.lisp:1.61 climacs/packages.lisp:1.62
--- climacs/packages.lisp:1.61	Fri Apr 22 10:19:11 2005
+++ climacs/packages.lisp	Sat May  7 00:32:28 2005
@@ -123,7 +123,7 @@
 (defpackage :climacs-pane
   (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev
 	:climacs-syntax :flexichain :undo)
-  (:export #:climacs-buffer #:needs-saving #:filename
+  (:export #:climacs-buffer #:needs-saving #:filepath
 	   #:climacs-pane #:point #:mark
 	   #:redisplay-pane #:full-redisplay
 	   #:page-down #:page-up


Index: climacs/pane.lisp
diff -u climacs/pane.lisp:1.24 climacs/pane.lisp:1.25
--- climacs/pane.lisp:1.24	Wed Apr  6 07:31:53 2005
+++ climacs/pane.lisp	Sat May  7 00:32:28 2005
@@ -182,8 +182,8 @@
 (defclass climacs-textual-view (textual-view tabify-mixin)
   ())
 
-(defclass filename-mixin ()
-  ((filename :initform nil :accessor filename)))
+(defclass filepath-mixin ()
+  ((filepath :initform nil :accessor filepath)))
 
 ;(defgeneric indent-tabs-mode (climacs-buffer))
 
@@ -193,7 +193,7 @@
 (defclass extended-binseq2-buffer (binseq2-buffer p-undo-mixin abbrev-mixin) ()
   (:documentation "Extensions accessible via marks."))
 
-(defclass climacs-buffer (delegating-buffer filename-mixin name-mixin)
+(defclass climacs-buffer (delegating-buffer filepath-mixin name-mixin)
   ((needs-saving :initform nil :accessor needs-saving)
    (syntax :accessor syntax)
    (indent-tabs-mode :initarg indent-tabs-mode :initform t




More information about the Climacs-cvs mailing list