[Phemlock-cvs] CVS update: phemlock/src/user/bufed.lisp phemlock/src/user/command.lisp phemlock/src/user/echocoms.lisp phemlock/src/user/edit-defs.lisp phemlock/src/user/filecoms.lisp

Aleksandar Bakic abakic at common-lisp.net
Fri Sep 3 23:07:09 UTC 2004


Update of /project/phemlock/cvsroot/phemlock/src/user
In directory common-lisp.net:/tmp/cvs-serv4954/src/user

Modified Files:
	bufed.lisp command.lisp echocoms.lisp edit-defs.lisp 
	filecoms.lisp 
Log Message:
Changes to get rid of warnings and notes. As a side-effect, more code
has been commented out. There should be no more warnings nor notes
with CMUCL, and only two style warnings with SBCL. Not tested with
other implementations yet. TODO: spread key bindings to different
files.

Date: Sat Sep  4 01:07:07 2004
Author: abakic

Index: phemlock/src/user/bufed.lisp
diff -u phemlock/src/user/bufed.lisp:1.1.1.1 phemlock/src/user/bufed.lisp:1.2
--- phemlock/src/user/bufed.lisp:1.1.1.1	Fri Jul  9 15:38:37 2004
+++ phemlock/src/user/bufed.lisp	Sat Sep  4 01:07:06 2004
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 #+CMU (ext:file-comment
-  "$Header: /project/phemlock/cvsroot/phemlock/src/user/bufed.lisp,v 1.1.1.1 2004/07/09 13:38:37 gbaumann Exp $")
+  "$Header: /project/phemlock/cvsroot/phemlock/src/user/bufed.lisp,v 1.2 2004/09/03 23:07:06 abakic Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -41,7 +41,21 @@
     (setf *bufed-buffer* nil)
     (setf *bufed-buffers* nil)))
 
-
+;;; copied from diredcoms.lisp (hemlock-internal package) --amb
+;;; ARRAY-ELEMENT-FROM-MARK -- Internal Interface.
+;;;
+;;; This counts the lines between it and the beginning of the buffer.  The
+;;; number is used to index vector as if each line mapped to an element
+;;; starting with the zero'th element (lines are numbered starting at 1).
+;;; This must use AREF since some modes use this with extendable vectors.
+;;;
+(defun array-element-from-mark (mark vector
+				&optional (error-msg "Invalid line."))
+  (when (blank-line-p (mark-line mark)) (editor-error error-msg))
+  (aref vector
+	 (1- (count-lines (region
+			   (buffer-start-mark (line-buffer (mark-line mark)))
+			   mark)))))
 
 ;;;; Commands.
 


Index: phemlock/src/user/command.lisp
diff -u phemlock/src/user/command.lisp:1.1.1.1 phemlock/src/user/command.lisp:1.2
--- phemlock/src/user/command.lisp:1.1.1.1	Fri Jul  9 15:39:09 2004
+++ phemlock/src/user/command.lisp	Sat Sep  4 01:07:06 2004
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 #+CMU (ext:file-comment
-  "$Header: /project/phemlock/cvsroot/phemlock/src/user/command.lisp,v 1.1.1.1 2004/07/09 13:39:09 gbaumann Exp $")
+  "$Header: /project/phemlock/cvsroot/phemlock/src/user/command.lisp,v 1.2 2004/09/03 23:07:06 abakic Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -40,7 +40,7 @@
   "Pause the Hemlock/Lisp process returning to the process that invoked the
    Lisp."
   (declare (ignore p))
-  (pause-hemlock))
+  #+nilamb(pause-hemlock))
 
 
 


Index: phemlock/src/user/echocoms.lisp
diff -u phemlock/src/user/echocoms.lisp:1.1.1.1 phemlock/src/user/echocoms.lisp:1.2
--- phemlock/src/user/echocoms.lisp:1.1.1.1	Fri Jul  9 15:39:10 2004
+++ phemlock/src/user/echocoms.lisp	Sat Sep  4 01:07:06 2004
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 #+CMU (ext:file-comment
-  "$Header: /project/phemlock/cvsroot/phemlock/src/user/echocoms.lisp,v 1.1.1.1 2004/07/09 13:39:10 gbaumann Exp $")
+  "$Header: /project/phemlock/cvsroot/phemlock/src/user/echocoms.lisp,v 1.2 2004/09/03 23:07:06 abakic Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -80,8 +80,9 @@
 		 (write-line 
  "There are no possible completions of what you have typed." s))))))
      ((and (eq *parse-type* :file) (not (zerop (length input))))
-      (let ((pns (ambiguous-files (region-to-string *parse-input-region*)
-				  *parse-default*)))
+      (let ((pns #-CMU(ambiguous-files (region-to-string *parse-input-region*)
+				  *parse-default*)
+		 #+CMU(list (region-to-string *parse-input-region*))))
 	(declare (list pns))
 	(with-pop-up-display(s :height (+ (length pns) 2))
 	  (write-line help s)


Index: phemlock/src/user/edit-defs.lisp
diff -u phemlock/src/user/edit-defs.lisp:1.1.1.1 phemlock/src/user/edit-defs.lisp:1.2
--- phemlock/src/user/edit-defs.lisp:1.1.1.1	Fri Jul  9 15:38:48 2004
+++ phemlock/src/user/edit-defs.lisp	Sat Sep  4 01:07:06 2004
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 #+CMU (ext:file-comment
-  "$Header: /project/phemlock/cvsroot/phemlock/src/user/edit-defs.lisp,v 1.1.1.1 2004/07/09 13:38:48 gbaumann Exp $")
+  "$Header: /project/phemlock/cvsroot/phemlock/src/user/edit-defs.lisp,v 1.2 2004/09/03 23:07:06 abakic Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -164,10 +164,13 @@
 	  (unless in-editor-p
 	    (message "Editing definition from editor Lisp ..."))
 	  (go-to-definition pathname type name))
-	(let ((results (eval-form-in-server
-			info
+	(let ((results (eval;-form-in-server ; disabled, trying something close --amb
+			;info
+			(mapcar
+			 #'prin1-to-string
+			(read-from-string
 			(format nil "(hemlock::definition-editing-info ~S)"
-				fun-name))))
+				fun-name))))))
 	  (go-to-definition (read-from-string (first results)) ;file
 			    (read-from-string (second results)) ;type
 			    (read-from-string (third results))))))) ;name


Index: phemlock/src/user/filecoms.lisp
diff -u phemlock/src/user/filecoms.lisp:1.1.1.1 phemlock/src/user/filecoms.lisp:1.2
--- phemlock/src/user/filecoms.lisp:1.1.1.1	Fri Jul  9 15:39:05 2004
+++ phemlock/src/user/filecoms.lisp	Sat Sep  4 01:07:06 2004
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 #+CMU (ext:file-comment
-  "$Header: /project/phemlock/cvsroot/phemlock/src/user/filecoms.lisp,v 1.1.1.1 2004/07/09 13:39:05 gbaumann Exp $")
+  "$Header: /project/phemlock/cvsroot/phemlock/src/user/filecoms.lisp,v 1.2 2004/09/03 23:07:06 abakic Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -372,9 +372,10 @@
     (cond ((not found)
            (if (and (null (pathname-name trial-pathname))
                     (null (pathname-type trial-pathname))
-                    (pathname-directory trial-pathname))
+                    (pathname-directory trial-pathname)
+		    nil) ; dired-guts is commented out for now --amb
                ;; This looks like a directory -- make dired buffer
-               (dired-guts nil nil trial-pathname)
+               nil ; (dired-guts nil nil trial-pathname)
 
                (let* ((name (pathname-to-buffer-name trial-pathname))
                       (found (getstring name *buffer-names*))
@@ -882,6 +883,15 @@
 
 
 ;;;; File utility commands:
+
+(defun print-directory (pathname &optional stream &key all verbose return-list)
+  "Portable surrogate of cmucl ext:print-directory. --amb"
+  (declare (ignorable all verbose return-list))
+  (let ((s (cond
+	     ((null stream) *standard-output*)
+	     ((eq t stream) *terminal-io*)
+	     (t stream))))
+    (format s "~{~&~A~}" (directory pathname))))
 
 (defcommand "Directory" (p)
   "Do a directory into a pop-up window.  If an argument is supplied, then





More information about the Phemlock-cvs mailing list