From heller at common-lisp.net Thu Dec 2 17:10:45 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 2 Dec 2004 18:10:45 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041202171045.206A7884FD@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv19785 Modified Files: slime.el Log Message: (slime-repl-clear-buffer, slime-repl-clear-output): Fix docstrings. Date: Thu Dec 2 18:10:44 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.433 slime/slime.el:1.434 --- slime/slime.el:1.433 Mon Nov 29 18:31:03 2004 +++ slime/slime.el Thu Dec 2 18:10:43 2004 @@ -2563,6 +2563,7 @@ ;; xemacs stuff start-open t end-open t) (insert prompt)) + ;; FIXME: we could also set beginning-of-defun-function (setq defun-prompt-regexp (concat "^" prompt)) (set-marker slime-output-end start) (set-marker slime-repl-prompt-start-mark prompt-start) @@ -2803,7 +2804,7 @@ (line-beginning-position))) (defun slime-repl-clear-buffer () - "Delete all die tage die wir im Umlauf w?rhen" + "Delete the entire output generated by the Lisp process." (interactive) (set-marker slime-repl-last-input-start-mark nil) (let ((inhibit-read-only t)) @@ -2811,7 +2812,7 @@ (goto-char slime-repl-input-start-mark))) (defun slime-repl-clear-output () - "See slime-repl-clear-buffer." + "Delete the output inserted since the last input." (interactive) (let ((start (save-excursion (slime-repl-previous-prompt) @@ -5928,7 +5929,7 @@ (defun sldb-get-buffer (thread) (or (sldb-find-buffer thread) (let* ((name (slime-connection-name)) - (buffer-name (format "*sldb [%s/%s]*" name thread)) + (buffer-name (format "*sldb %s/%s*" name thread)) (buffer (get-buffer-create buffer-name))) (push (cons (cons (slime-connection) thread) buffer) sldb-buffers) From heller at common-lisp.net Thu Dec 2 17:11:53 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 2 Dec 2004 18:11:53 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank.lisp Message-ID: <20041202171153.BF709884FD@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv19829 Modified Files: swank.lisp Log Message: (inspect-for-emacs (symbol)): Handle non-interned symbols. Date: Thu Dec 2 18:11:51 2004 Author: heller Index: slime/swank.lisp diff -u slime/swank.lisp:1.267 slime/swank.lisp:1.268 --- slime/swank.lisp:1.267 Mon Nov 29 18:31:53 2004 +++ slime/swank.lisp Thu Dec 2 18:11:50 2004 @@ -2752,12 +2752,15 @@ symbol 'compiler-macro) ;; ;; Package - `("It is " ,(string-downcase (string status)) " to the package: " - (:value ,package ,(package-name package)) - ,@(if (eq :internal status) - `((:action " [export it]" - ,(lambda () (export symbol package))))) - (:newline)) + (if package + `("It is " ,(string-downcase (string status)) + " to the package: " + (:value ,package ,(package-name package)) + ,@(if (eq :internal status) + `((:action " [export it]" + ,(lambda () (export symbol package))))) + (:newline)) + '("It is a non-interned symbol." (:newline))) ;; ;; Plist (label-value-line "Property list" (symbol-plist symbol)) From heller at common-lisp.net Thu Dec 2 17:14:14 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 2 Dec 2004 18:14:14 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041202171414.BE679884FD@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv19885 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 2 18:14:13 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.582 slime/ChangeLog:1.583 --- slime/ChangeLog:1.582 Mon Nov 29 18:36:37 2004 +++ slime/ChangeLog Thu Dec 2 18:14:12 2004 @@ -1,3 +1,11 @@ +2004-12-02 Helmut Eller + + * swank.lisp: (inspect-for-emacs (symbol)): Handle non-interned + symbols. + + * slime.el (slime-repl-clear-buffer, slime-repl-clear-output): Fix + docstrings. + 2004-11-29 Lynn Quam * slime.el (slime-global-variable-name-p): Allow optional From heller at common-lisp.net Sun Dec 5 14:49:42 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 15:49:42 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041205144942.CFB58880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv4968 Modified Files: slime.el Log Message: (slime-global-variable-name-p): Return true for names of constants like +foo+. Date: Sun Dec 5 15:49:40 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.434 slime/slime.el:1.435 --- slime/slime.el:1.434 Thu Dec 2 18:10:43 2004 +++ slime/slime.el Sun Dec 5 15:49:39 2004 @@ -3902,6 +3902,7 @@ (re-search-forward (format "\\s *(def\\(\\s_\\|\\sw\\)*\\s +%s\\>" name) nil t) (re-search-forward + ;; FIXME: Isn't this far to general? (format "[( \t]%s\\>\\(\\s \\|$\\)" name) nil t))) (goto-char (match-beginning 0))) ;; Looks for a sequence of words (def method name @@ -4271,7 +4272,7 @@ (defun slime-global-variable-name-p (name) "Is NAME a global variable? Globals are recognised purely by *this-naming-convention*." - (string-match "^\\(.*::?\\)?\\*.*\\*$" name)) + (string-match "^\\(.*::?\\)?[*+].*[*+]$" name)) (defun slime-get-cached-autodoc (symbol-name) "Return the cached autodoc documentation for SYMBOL-NAME, or nil." From heller at common-lisp.net Sun Dec 5 14:52:41 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 15:52:41 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-allegro.lisp Message-ID: <20041205145241.E0C48880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv5014 Modified Files: swank-allegro.lisp Log Message: (handle-compiler-warning): Handle undefined-functions warnings by looking the fromat-arguments of the condition. (compiler-undefined-functions-called-warning-p, location-for-warning) (handle-undefined-functions-warning): New functions. Date: Sun Dec 5 15:52:39 2004 Author: heller Index: slime/swank-allegro.lisp diff -u slime/swank-allegro.lisp:1.65 slime/swank-allegro.lisp:1.66 --- slime/swank-allegro.lisp:1.65 Mon Nov 29 18:35:03 2004 +++ slime/swank-allegro.lisp Sun Dec 5 15:52:39 2004 @@ -51,10 +51,10 @@ (defimplementation close-socket (socket) (close socket)) -(defimplementation accept-connection (socket - &key (external-format :iso-latin-1-unix)) - (let ((s (socket:accept-connection socket :wait t))) - (set-external-format s external-format) +(defimplementation accept-connection (socket &key external-format) + (let ((ef (or external-format :iso-latin-1-unix)) + (s (socket:accept-connection socket :wait t))) + (set-external-format s ef) s)) (defun set-external-format (stream external-format) @@ -89,12 +89,13 @@ "allegro") (defimplementation set-default-directory (directory) - (excl:chdir directory) - (namestring (setf *default-pathname-defaults* - (truename (merge-pathnames directory))))) + (let ((dir (namestring (setf *default-pathname-defaults* + (truename (merge-pathnames directory)))))) + (excl:chdir dir) + dir)) (defimplementation default-directory () - (excl:chdir)) + (namestring (excl:current-directory))) ;;;; Misc @@ -213,37 +214,57 @@ (defvar *buffer-string*) (defvar *compile-filename* nil) -(defun compiler-note-p (x) - (member (type-of x) '(excl::compiler-note compiler::compiler-note))) +(defun compiler-note-p (object) + (member (type-of object) '(excl::compiler-note compiler::compiler-note))) + +(defun compiler-undefined-functions-called-warning-p (object) + #-allegro-v5.0 + (typep object 'excl:compiler-undefined-functions-called-warning)) (deftype compiler-note () `(satisfies compiler-note-p)) +(defun signal-compiler-condition (&rest args) + (signal (apply #'make-condition 'compiler-condition args))) + (defun handle-compiler-warning (condition) + (declare (optimize (debug 3) (speed 0) (space 0))) + (cond ((and (not *buffer-name*) + (compiler-undefined-functions-called-warning-p condition)) + (handle-undefined-functions-warning condition)) + (t + (signal-compiler-condition + :original-condition condition + :severity (etypecase condition + (warning :warning) + (compiler-note :note)) + :message (format nil "~A" condition) + :location (location-for-warning condition))))) + +(defun location-for-warning (condition) (let ((loc (getf (slot-value condition 'excl::plist) :loc))) - (signal - (make-condition - 'compiler-condition - :original-condition condition - :severity (etypecase condition - (warning :warning) - (compiler-note :note)) - :message (format nil "~A" condition) - :location (cond (*buffer-name* - (make-location - (list :buffer *buffer-name*) - (list :position *buffer-start-position*))) - (loc - (destructuring-bind (file . pos) loc - (make-location - (list :file (namestring (truename file))) - (list :position (1+ pos))))) - (*compile-filename* - (make-location - (list :file *compile-filename*) - (list :position 1))) - (t - (list :error "No error location available."))))))) + (cond (*buffer-name* + (make-location + (list :buffer *buffer-name*) + (list :position *buffer-start-position*))) + (loc + (destructuring-bind (file . pos) loc + (make-location + (list :file (namestring (truename file))) + (list :position (1+ pos))))) + (t + (list :error "No error location available."))))) + +(defun handle-undefined-functions-warning (condition) + (let ((fargs (slot-value condition 'excl::format-arguments))) + (dolist (farg (car fargs)) + (destructuring-bind (fname (pos file)) farg + (signal-compiler-condition + :original-condition condition + :severity :warning + :message (format nil "Undefined function referenced: ~S" fname) + :location (make-location (list :file file) + (list :position (1+ pos)))))))) (defimplementation call-with-compilation-hooks (function) (handler-bind ((warning #'handle-compiler-warning) From heller at common-lisp.net Sun Dec 5 14:58:07 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 15:58:07 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041205145807.9D766880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv5058 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Sun Dec 5 15:58:05 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.583 slime/ChangeLog:1.584 --- slime/ChangeLog:1.583 Thu Dec 2 18:14:12 2004 +++ slime/ChangeLog Sun Dec 5 15:58:04 2004 @@ -1,3 +1,15 @@ +2004-12-05 Helmut Eller + + * slime.el (slime-global-variable-name-p): Also return true for + names of constants like +foo+. Suggested by Christian Lynbech. + + * swank-allegro.lisp (handle-compiler-warning): Handle + undefined-functions warnings by looking the fromat-arguments of + the condition. + (compiler-undefined-functions-called-warning-p) + (location-for-warning, handle-undefined-functions-warning): New + functions. + 2004-12-02 Helmut Eller * swank.lisp: (inspect-for-emacs (symbol)): Handle non-interned From heller at common-lisp.net Sun Dec 5 15:25:39 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 16:25:39 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-clisp.lisp Message-ID: <20041205152539.B3D8C880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv6530 Modified Files: swank-clisp.lisp Log Message: Minor cleanups. Date: Sun Dec 5 16:25:37 2004 Author: heller Index: slime/swank-clisp.lisp diff -u slime/swank-clisp.lisp:1.43 slime/swank-clisp.lisp:1.44 --- slime/swank-clisp.lisp:1.43 Mon Nov 29 18:35:03 2004 +++ slime/swank-clisp.lisp Sun Dec 5 16:25:37 2004 @@ -40,55 +40,13 @@ (defvar *have-mop* (and (find-package :clos) (eql :external - (nth-value 1 (find-symbol (string ':standard-slot-definition) :clos)))) + (nth-value 1 (find-symbol (string ':standard-slot-definition) + :clos)))) "True in those CLISP imagse which have a complete MOP implementation.")) #+#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or)) (progn - (import-to-swank-mop - '( ;; classes - cl:standard-generic-function - clos:standard-slot-definition - cl:method - cl:standard-class - clos::eql-specializer - ;; standard-class readers - clos:class-default-initargs - clos:class-direct-default-initargs - clos:class-direct-slots - clos:class-direct-subclasses - clos:class-direct-superclasses - clos:class-finalized-p - cl:class-name - clos:class-precedence-list - clos:class-prototype - clos:class-slots - clos:specializer-direct-methods - ;; eql-specializer accessors - clos::eql-specializer-object - ;; generic function readers - clos:generic-function-argument-precedence-order - clos:generic-function-declarations - clos:generic-function-lambda-list - clos:generic-function-methods - clos:generic-function-method-class - clos:generic-function-method-combination - clos:generic-function-name - ;; method readers - clos:method-generic-function - clos:method-function - clos:method-lambda-list - clos:method-specializers - clos:method-qualifiers - ;; slot readers - clos:slot-definition-allocation - clos:slot-definition-initargs - clos:slot-definition-initform - clos:slot-definition-initfunction - clos:slot-definition-name - clos:slot-definition-type - clos:slot-definition-readers - clos:slot-definition-writers)) + (import-swank-mop-symbols :clos '(:slot-definition-documentation)) (defun swank-mop:slot-definition-documentation (slot) (clos::slot-definition-documentation slot))) @@ -96,7 +54,8 @@ #-#.(cl:if swank-backend::*have-mop* '(and) '(or)) (defclass swank-mop:standard-slot-definition () () - (:documentation "Dummy class created so that swank.lisp will compile and load.")) + (:documentation + "Dummy class created so that swank.lisp will compile and load.")) #+linux (defmacro with-blocked-signals ((&rest signals) &body body) @@ -121,7 +80,9 @@ (defimplementation call-without-interrupts (fn) (funcall fn)) -#+unix (defmethod getpid () (system::program-id)) +#+unix +(defmethod getpid () + (system::program-id)) #+win32 (defmethod getpid () (cond ((find-package :win32) @@ -523,44 +484,11 @@ (sys::insp-blurb inspection)) (loop with count = (sys::insp-num-slots inspection) for i upto count - for (value name) = (multiple-value-list (funcall (sys::insp-nth-slot inspection) i)) - collect `(:value ,name) - collect " = " - collect `(:value ,value) - collect '(:newline)))))) - -#-#.(cl:if swank-backend::*have-mop* '(cl:and) '(cl:or)) -(progn - (defmethod inspect-for-emacs ((o standard-object) (inspector clisp-inspector)) - (declare (ignore inspector)) - (values (format nil "An instance of the class" (class-of o)) - `("Sorry, inspecting of instances is not supported in this version of CLISP." - (:newline) - "Please upgrade to a recent version of CLISP."))) - - (defmethod inspect-for-emacs ((gf standard-generic-function) (inspector clisp-inspector)) - (declare (ignore inspector)) - (values "A generic function." - `("Sorry, inspecting of generic functions is not supported in this version of CLISP." - (:newline) - "Please upgrade to a recent version of CLISP."))) - - (defmethod inspect-for-emacs ((method standard-method) (inspector t)) - (declare (ignore inspector)) - (values "A standard method." - `("Sorry, inspecting of methods is not supported in this version of CLISP." - (:newline) - "Please upgrade to a recent version of CLISP."))) - - (defmethod inspect-for-emacs ((class standard-class) (inspector t)) - (declare (ignore inspector)) - (values "A class." - `("Sorry, inspecting of classes is not supported in this version of CLISP." - (:newline) - "Please upgrade to a recent version of CLISP."))) - - (defmethod inspect-for-emacs ((slot swank-mop:standard-slot-definition) (inspector t)) - (declare (ignore inspector)))) + for (value name) = (multiple-value-list + (funcall (sys::insp-nth-slot + inspection) i)) + collect `((:value ,name) " = " (:value ,value) + (:newline))))))) (defimplementation quit-lisp () #+lisp=cl (ext:quit) From heller at common-lisp.net Sun Dec 5 21:06:54 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 22:06:54 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank.lisp Message-ID: <20041205210654.54340880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv23361 Modified Files: swank.lisp Log Message: (eval-region): Use a simple loop. Date: Sun Dec 5 22:06:53 2004 Author: heller Index: slime/swank.lisp diff -u slime/swank.lisp:1.268 slime/swank.lisp:1.269 --- slime/swank.lisp:1.268 Thu Dec 2 18:11:50 2004 +++ slime/swank.lisp Sun Dec 5 22:06:52 2004 @@ -616,8 +616,9 @@ (defun send-to-socket-io (event) (log-event "DISPATCHING: ~S~%" event) - (flet ((send (o) (without-interrupts - (encode-message o (current-socket-io))))) + (flet ((send (o) + (without-interrupts + (encode-message o (current-socket-io))))) (destructure-case event (((:debug-activate :debug :debug-return :read-string :read-aborted) thread &rest args) @@ -1202,23 +1203,22 @@ "Evaluate STRING and return the result. If PACKAGE-UPDATE-P is non-nil, and evaluation causes a package change, then send Emacs an update." - (let (- values) - (unwind-protect - (with-input-from-string (stream string) - (loop for form = (read stream nil stream) - until (eq form stream) - do (progn - (setq - form) - (setq values (multiple-value-list (eval form))) - (force-output)) - finally (progn - (fresh-line) - (force-output) - (return (values values -))))) - (when (and package-update-p (not (eq *package* *buffer-package*))) - (send-to-emacs - (list :new-package (package-name *package*) - (package-string-for-prompt *package*))))))) + (unwind-protect + (with-input-from-string (stream string) + (let (- values) + (loop + (let ((form (read stream nil stream))) + (when (eq form stream) + (fresh-line) + (force-output) + (return (values values -))) + (setq - form) + (setq values (multiple-value-list (eval form))) + (force-output))))) + (when (and package-update-p (not (eq *package* *buffer-package*))) + (send-to-emacs + (list :new-package (package-name *package*) + (package-string-for-prompt *package*)))))) (defun package-string-for-prompt (package) "Return the shortest nickname (or canonical name) of PACKAGE." From heller at common-lisp.net Sun Dec 5 21:13:23 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 22:13:23 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-cmucl.lisp Message-ID: <20041205211323.6B74F880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv23422 Modified Files: swank-cmucl.lisp Log Message: (sending-safe-p): New predicate. (pre-gc-hook, post-gc-hook): Use it. (*install-gc-hooks*): New user variable. Date: Sun Dec 5 22:13:22 2004 Author: heller Index: slime/swank-cmucl.lisp diff -u slime/swank-cmucl.lisp:1.132 slime/swank-cmucl.lisp:1.133 --- slime/swank-cmucl.lisp:1.132 Mon Nov 29 18:35:03 2004 +++ slime/swank-cmucl.lisp Sun Dec 5 22:13:22 2004 @@ -76,11 +76,17 @@ (defimplementation preferred-communication-style () :sigio) +#-(or ppc mips) (defimplementation create-socket (host port) - #+ppc (declare (ignore host)) (ext:create-inet-listener port :stream - :reuse-address t - #-ppc :host #-ppc (resolve-hostname host))) + :reuse-address t + :host (resolve-hostname host))) + +;; There seems to be a bug in create-inet-listener on Mac/OSX and Irix. +#+(or ppc mips) +(defimplementation create-socket (host port) + (declare (ignore host)) + (ext:create-inet-listener port :stream :reuse-address t)) (defimplementation local-port (socket) (nth-value 1 (ext::get-socket-host-and-port (socket-fd socket)))) @@ -89,10 +95,10 @@ (sys:invalidate-descriptor socket) (ext:close-socket (socket-fd socket))) -(defimplementation accept-connection (socket - &key (external-format :iso-latin-1-unix)) - (assert (eq external-format ':iso-latin-1-unix)) - (make-socket-io-stream (ext:accept-tcp-connection socket))) +(defimplementation accept-connection (socket &key external-format) + (let ((ef (or external-format :iso-latin-1-unix))) + (assert (eq ef ':iso-latin-1-unix)) + (make-socket-io-stream (ext:accept-tcp-connection socket)))) ;;;;; Sockets @@ -1588,7 +1594,7 @@ (defimplementation sldb-break-on-return (frame) (break-on-return (nth-frame frame))) -;;; We set the breakpoint the caller which might be a bit confusing. +;;; We set the breakpoint in the caller which might be a bit confusing. ;;; (defun break-on-return (frame) (let* ((caller (di:frame-down frame)) @@ -2126,10 +2132,12 @@ ;;; normal output. ;;; +(defun swank-sym (name) (find-symbol (string name) :swank)) +(defun sending-safe-p () (symbol-value (swank-sym :*emacs-connection*))) + ;; this should probably not be here, but where else? (defun eval-in-emacs (form) - (let ((sym (find-symbol (string :eval-in-emacs) :swank))) - (funcall sym form))) + (funcall (swank-sym :eval-in-emacs) form)) (defun print-bytes (nbytes &optional stream) "Print the number NBYTES to STREAM in KB, MB, or GB units." @@ -2147,15 +2155,16 @@ (defun pre-gc-hook (bytes-in-use) (let ((msg (format nil "[Commencing GC with ~A in use.]" (print-bytes bytes-in-use)))) - (eval-in-emacs `(slime-background-message "%s" ,msg)))) + (when (sending-safe-p) + (eval-in-emacs `(slime-background-message "%s" ,msg))))) (defun post-gc-hook (bytes-retained bytes-freed trigger) - (force-output) (let ((msg (format nil "[GC completed. ~A freed ~A retained ~A trigger]" (print-bytes bytes-freed) (print-bytes bytes-retained) (print-bytes trigger)))) - (eval-in-emacs `(slime-background-message "%s" ,msg)))) + (when (sending-safe-p) + (eval-in-emacs `(slime-background-message "%s" ,msg))))) (defun install-gc-hooks () (setq ext:*gc-notify-before* #'pre-gc-hook) @@ -2164,9 +2173,13 @@ (defun remove-gc-hooks () (setq ext:*gc-notify-before* nil) (setq ext:*gc-notify-after* nil)) - + +(defvar *install-gc-hooks* t + "If non-nil install GC hooks") + (defimplementation emacs-connected () - (install-gc-hooks)) + (when *install-gc-hooks* + (install-gc-hooks))) ;; Local Variables: ;; pbook-heading-regexp: "^;;;\\(;+\\)" From heller at common-lisp.net Sun Dec 5 21:15:29 2004 From: heller at common-lisp.net (Helmut Eller) Date: Sun, 5 Dec 2004 22:15:29 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041205211529.C22BE880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv23660 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Sun Dec 5 22:15:27 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.584 slime/ChangeLog:1.585 --- slime/ChangeLog:1.584 Sun Dec 5 15:58:04 2004 +++ slime/ChangeLog Sun Dec 5 22:15:26 2004 @@ -10,6 +10,12 @@ (location-for-warning, handle-undefined-functions-warning): New functions. + * swank-cmucl.lisp (*install-gc-hooks*): New user variable. + (sending-safe-p): New predicate. + (pre-gc-hook, post-gc-hook): Use it. + + * swank.lisp (eval-region): Use a simple loop. + 2004-12-02 Helmut Eller * swank.lisp: (inspect-for-emacs (symbol)): Handle non-interned From heller at common-lisp.net Thu Dec 9 20:43:24 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 9 Dec 2004 21:43:24 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank.lisp Message-ID: <20041209204324.91FBF88509@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv17564 Modified Files: swank.lisp Log Message: (*sldb-print-pretty*, *sldb-print-circle*, *sldb-print-length*) (*sldb-print-level*, *sldb-print-lines*) (*sldb-print-pprint-dispatch*): Export those symbols. Date: Thu Dec 9 21:43:21 2004 Author: heller Index: slime/swank.lisp diff -u slime/swank.lisp:1.269 slime/swank.lisp:1.270 --- slime/swank.lisp:1.269 Sun Dec 5 22:06:52 2004 +++ slime/swank.lisp Thu Dec 9 21:43:20 2004 @@ -29,6 +29,12 @@ #:*readtable-alist* #:*globally-redirect-io* #:*global-debugger* + #:*sldb-print-pretty* + #:*sldb-print-circle* + #:*sldb-print-length* + #:*sldb-print-level* + #:*sldb-print-lines* + #:*sldb-print-pprint-dispatch* ;; These are re-exported directly from the backend: #:buffer-first-change #:frame-source-location-for-emacs From heller at common-lisp.net Thu Dec 9 20:44:31 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 9 Dec 2004 21:44:31 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041209204431.1E03288509@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv17607 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 9 21:44:30 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.585 slime/ChangeLog:1.586 --- slime/ChangeLog:1.585 Sun Dec 5 22:15:26 2004 +++ slime/ChangeLog Thu Dec 9 21:44:30 2004 @@ -1,3 +1,10 @@ +2004-12-09 Helmut Eller + + * /project/slime/cvsroot/slime/swank.lisp: + (*sldb-print-pretty*, *sldb-print-circle*, *sldb-print-length*) + (*sldb-print-level*, *sldb-print-lines*) + (*sldb-print-pprint-dispatch*): Export those symbols. + 2004-12-05 Helmut Eller * slime.el (slime-global-variable-name-p): Also return true for From heller at common-lisp.net Thu Dec 9 20:45:26 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 9 Dec 2004 21:45:26 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041209204526.974DC88509@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv17940 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 9 21:45:25 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.586 slime/ChangeLog:1.587 --- slime/ChangeLog:1.586 Thu Dec 9 21:44:30 2004 +++ slime/ChangeLog Thu Dec 9 21:45:24 2004 @@ -1,8 +1,7 @@ 2004-12-09 Helmut Eller - * /project/slime/cvsroot/slime/swank.lisp: - (*sldb-print-pretty*, *sldb-print-circle*, *sldb-print-length*) - (*sldb-print-level*, *sldb-print-lines*) + * swank.lisp (*sldb-print-pretty*, *sldb-print-circle*) + (*sldb-print-length*, (*sldb-print-level*, *sldb-print-lines*) (*sldb-print-pprint-dispatch*): Export those symbols. 2004-12-05 Helmut Eller From heller at common-lisp.net Mon Dec 13 19:54:30 2004 From: heller at common-lisp.net (Helmut Eller) Date: Mon, 13 Dec 2004 20:54:30 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041213195430.16C83884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv18101 Modified Files: slime.el Log Message: (slime-repl-mode-map): Bind to slime-repl-bol. Suggested by Chris Capel. Date: Mon Dec 13 20:54:24 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.435 slime/slime.el:1.436 --- slime/slime.el:1.435 Sun Dec 5 15:49:39 2004 +++ slime/slime.el Mon Dec 13 20:54:23 2004 @@ -2933,6 +2933,7 @@ ("\C-\M-m" 'slime-repl-closing-return) ([(control return)] 'slime-repl-closing-return) ("\C-a" 'slime-repl-bol) + ([home] 'slime-repl-bol) ("\C-e" 'slime-repl-eol) ("\M-p" 'slime-repl-previous-input) ((kbd "C-") 'slime-repl-previous-input) From heller at common-lisp.net Mon Dec 13 19:55:25 2004 From: heller at common-lisp.net (Helmut Eller) Date: Mon, 13 Dec 2004 20:55:25 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041213195525.395F1884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv18138 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Mon Dec 13 20:55:22 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.587 slime/ChangeLog:1.588 --- slime/ChangeLog:1.587 Thu Dec 9 21:45:24 2004 +++ slime/ChangeLog Mon Dec 13 20:55:21 2004 @@ -1,7 +1,12 @@ +2004-12-13 Helmut Eller + + * slime.el (slime-repl-mode-map): Bind to slime-repl-bol. + Suggested by Chris Capel. + 2004-12-09 Helmut Eller * swank.lisp (*sldb-print-pretty*, *sldb-print-circle*) - (*sldb-print-length*, (*sldb-print-level*, *sldb-print-lines*) + (*sldb-print-length*, *sldb-print-level*, *sldb-print-lines*) (*sldb-print-pprint-dispatch*): Export those symbols. 2004-12-05 Helmut Eller From heller at common-lisp.net Mon Dec 13 20:05:23 2004 From: heller at common-lisp.net (Helmut Eller) Date: Mon, 13 Dec 2004 21:05:23 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041213200523.B817C884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv18869 Modified Files: slime.el Log Message: (slime-repl-grab-old-input): Append the old input to the current input by default. If the new `replace' argument and is true, replace the current input. Date: Mon Dec 13 21:05:19 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.436 slime/slime.el:1.437 --- slime/slime.el:1.436 Mon Dec 13 20:54:23 2004 +++ slime/slime.el Mon Dec 13 21:05:16 2004 @@ -2720,7 +2720,7 @@ (slime-check-connected) (assert (<= (point) slime-repl-input-end-mark)) (cond ((get-text-property (point) 'slime-repl-old-input) - (slime-repl-grab-old-input)) + (slime-repl-grab-old-input end-of-input)) (end-of-input (slime-repl-send-input)) (slime-repl-read-mode ; bad style? @@ -2749,9 +2749,11 @@ (slime-mark-output-start) (slime-repl-send-string input))) -(defun slime-repl-grab-old-input () - "Resend the old REPL input at point. -The old input has the text property `slime-repl-old-input'." +(defun slime-repl-grab-old-input (replace) + "Resend the old REPL input at point. +If replace it non-nil the current input is replaced with the old +input; otherwise the new input is appended. The old input has the +text property `slime-repl-old-input'." (let ((prop 'slime-repl-old-input)) (let* ((beg (save-excursion ;; previous-single-char-property-change searches for @@ -2764,7 +2766,10 @@ (previous-single-char-property-change (point) prop))) (end (next-single-char-property-change (point) prop)) (old-input (buffer-substring beg end))) - (goto-char slime-repl-input-start-mark) + (cond (replace (goto-char slime-repl-input-start-mark)) + (t (goto-char slime-repl-input-end-mark) + (unless (eq (char-before) ?\ ) + (insert " ")))) (delete-region (point) slime-repl-input-end-mark) (insert old-input) (while (eq (char-before) ?\n) From heller at common-lisp.net Mon Dec 13 20:11:01 2004 From: heller at common-lisp.net (Helmut Eller) Date: Mon, 13 Dec 2004 21:11:01 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041213201101.6E842884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv18912 Modified Files: slime.el Log Message: (slime-repl-grab-old-input): Remove the 'old-input text-property from the copied text. Date: Mon Dec 13 21:10:56 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.437 slime/slime.el:1.438 --- slime/slime.el:1.437 Mon Dec 13 21:05:16 2004 +++ slime/slime.el Mon Dec 13 21:10:56 2004 @@ -2765,7 +2765,7 @@ (ignore-errors (forward-char)) (previous-single-char-property-change (point) prop))) (end (next-single-char-property-change (point) prop)) - (old-input (buffer-substring beg end))) + (old-input (buffer-substring-no-properties beg end))) (cond (replace (goto-char slime-repl-input-start-mark)) (t (goto-char slime-repl-input-end-mark) (unless (eq (char-before) ?\ ) From heller at common-lisp.net Mon Dec 13 20:14:53 2004 From: heller at common-lisp.net (Helmut Eller) Date: Mon, 13 Dec 2004 21:14:53 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041213201453.DF6A5884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv18959 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Mon Dec 13 21:14:51 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.588 slime/ChangeLog:1.589 --- slime/ChangeLog:1.588 Mon Dec 13 20:55:21 2004 +++ slime/ChangeLog Mon Dec 13 21:14:51 2004 @@ -2,6 +2,13 @@ * slime.el (slime-repl-mode-map): Bind to slime-repl-bol. Suggested by Chris Capel. + (slime-repl-grab-old-input): Remove the 'old-input text-property + from the copied text. Reported by Tim Oates. + (slime-repl-grab-old-input): Append the old input to the current + input by default. If the new `replace' argument is true, replace + the current input. Suggested by Antonio Menezes Leitao. + (slime-repl-return): Pass the prefix argument to + slime-repl-grab-old-input. 2004-12-09 Helmut Eller From heller at common-lisp.net Wed Dec 15 07:09:55 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 08:09:55 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041215070955.47DF5884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv26497 Modified Files: slime.el Log Message: (slime-edit-definition-other-frame): New function. (slime-edit-definition): Switch to the other frame if the `where' is 'frame. Date: Wed Dec 15 08:09:52 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.438 slime/slime.el:1.439 --- slime/slime.el:1.438 Mon Dec 13 21:10:56 2004 +++ slime/slime.el Wed Dec 15 08:09:48 2004 @@ -2421,10 +2421,11 @@ (slime-with-output-end-mark (slime-propertize-region '(face slime-repl-output-face) (insert string)) - (when (and (= (point) slime-repl-prompt-start-mark) - (not (bolp))) - (insert "\n") - (set-marker slime-output-end (1- (point))))))) + ;;(when (and (= (point) slime-repl-prompt-start-mark) + ;; (not (bolp))) + ;; (insert "\n") + ;; (set-marker slime-output-end (1- (point)))) + ))) (defun slime-switch-to-output-buffer (&optional connection) "Select the output buffer, preferably in a different window." @@ -2742,13 +2743,19 @@ (add-text-properties slime-repl-input-start-mark (point) `(face slime-repl-input-face rear-nonsticky (face slime-repl-old-input) - slime-repl-old-input ,(incf slime-repl-old-input-counter))) + slime-repl-old-input + ,(incf slime-repl-old-input-counter))) + (slime-make-region-read-only slime-repl-input-start-mark (point)) (let ((input (slime-repl-current-input))) (goto-char slime-repl-input-end-mark) (slime-mark-input-start) (slime-mark-output-start) (slime-repl-send-string input))) +(defun slime-make-region-read-only (start end) + (add-text-properties (max start (1- end)) end '(rear-nonsticky (read-only))) + (add-text-properties start end `(read-only t))) + (defun slime-repl-grab-old-input (replace) "Resend the old REPL input at point. If replace it non-nil the current input is replaced with the old @@ -2764,16 +2771,20 @@ ;; old input. -luke (18/Jun/2004) (ignore-errors (forward-char)) (previous-single-char-property-change (point) prop))) - (end (next-single-char-property-change (point) prop)) - (old-input (buffer-substring-no-properties beg end))) + (end (save-excursion + (goto-char (next-single-char-property-change (point) prop)) + (skip-chars-backward "\n \t\r" beg) + (point))) + (old-input (buffer-substring-no-properties beg end)) + (offset (- (point) beg))) + ;; Append the old input or replace the current input (cond (replace (goto-char slime-repl-input-start-mark)) (t (goto-char slime-repl-input-end-mark) (unless (eq (char-before) ?\ ) (insert " ")))) (delete-region (point) slime-repl-input-end-mark) - (insert old-input) - (while (eq (char-before) ?\n) - (delete-char -1))))) + (save-excursion (insert old-input)) + (forward-char offset)))) (defun slime-repl-closing-return () "Evaluate the current input string after closing all open lists." @@ -4958,7 +4969,7 @@ (:type list)) dspec location) -(defun slime-edit-definition (name &optional other-window) +(defun slime-edit-definition (name &optional where) "Lookup the definition of the symbol at point. If there's no symbol at point, or a prefix argument is given, then the function name is prompted." @@ -4974,15 +4985,22 @@ (t (slime-goto-source-location (slime-definition.location (car definitions))) - (cond ((not other-window) - (switch-to-buffer (current-buffer))) + (cond ((equal where 'window) + (switch-to-buffer-other-window (current-buffer))) + ((equal where 'frame) + (switch-to-buffer-other-frame (current-buffer))) (t - (switch-to-buffer-other-window (current-buffer))))))))) + (switch-to-buffer (current-buffer))))))))) (defun slime-edit-definition-other-window (name) "Like `slime-edit-definition' but switch to the other window." - (interactive (list (slime-read-symbol-name "Function name: "))) - (slime-edit-definition name t)) + (interactive (list (slime-read-symbol-name "Symbol: "))) + (slime-edit-definition name 'window)) + +(defun slime-edit-definition-other-frame (name) + "Like `slime-edit-definition' but switch to the other window." + (interactive (list (slime-read-symbol-name "Symbol: "))) + (slime-edit-definition name 'frame)) (defun slime-show-definitions (name definitions) (slime-show-xrefs From heller at common-lisp.net Wed Dec 15 07:11:49 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 08:11:49 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041215071149.CC1A1884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv26547 Modified Files: slime.el Log Message: (slime-output-string): Remove debugging stuff. Date: Wed Dec 15 08:11:47 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.439 slime/slime.el:1.440 --- slime/slime.el:1.439 Wed Dec 15 08:09:48 2004 +++ slime/slime.el Wed Dec 15 08:11:47 2004 @@ -2421,11 +2421,10 @@ (slime-with-output-end-mark (slime-propertize-region '(face slime-repl-output-face) (insert string)) - ;;(when (and (= (point) slime-repl-prompt-start-mark) - ;; (not (bolp))) - ;; (insert "\n") - ;; (set-marker slime-output-end (1- (point)))) - ))) + (when (and (= (point) slime-repl-prompt-start-mark) + (not (bolp))) + (insert "\n") + (set-marker slime-output-end (1- (point))))))) (defun slime-switch-to-output-buffer (&optional connection) "Select the output buffer, preferably in a different window." From heller at common-lisp.net Wed Dec 15 07:14:48 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 08:14:48 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041215071448.E3DFF884F7@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv26582 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Wed Dec 15 08:14:47 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.589 slime/ChangeLog:1.590 --- slime/ChangeLog:1.589 Mon Dec 13 21:14:51 2004 +++ slime/ChangeLog Wed Dec 15 08:14:47 2004 @@ -1,3 +1,15 @@ +2004-12-15 Bryan O'Connor + + * slime.el (slime-edit-definition): Switch to the other frame if + the `where' is 'frame. + (slime-edit-definition-other-frame): New function. + +2004-12-15 Helmut Eller + + * slime.el (slime-repl-send-input): Make the input read-only to + avoid confusion. + (slime-make-region-read-only): New function. + 2004-12-13 Helmut Eller * slime.el (slime-repl-mode-map): Bind to slime-repl-bol. From heller at common-lisp.net Wed Dec 15 22:31:02 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:31:02 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank.lisp Message-ID: <20041215223102.3F88588649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv7544 Modified Files: swank.lisp Log Message: (slime-lisp-modes): New variable to make C-c C-k customizable and usable in scheme-mode. (slime-compile-file): Use it. Date: Wed Dec 15 23:30:57 2004 Author: heller Index: slime/swank.lisp diff -u slime/swank.lisp:1.270 slime/swank.lisp:1.271 --- slime/swank.lisp:1.270 Thu Dec 9 21:43:20 2004 +++ slime/swank.lisp Wed Dec 15 23:30:56 2004 @@ -1562,12 +1562,11 @@ (defslimefun frame-locals-for-emacs (index) "Return a property list ((&key NAME ID VALUE) ...) describing the local variables in the frame INDEX." - (let* ((*package* (or (frame-package index) *package*))) - (mapcar (lambda (frame-locals) - (destructuring-bind (&key name id value) frame-locals - (list :name (prin1-to-string name) :id id - :value (to-string value)))) - (frame-locals index)))) + (mapcar (lambda (frame-locals) + (destructuring-bind (&key name id value) frame-locals + (list :name (prin1-to-string name) :id id + :value (to-string value)))) + (frame-locals index))) (defslimefun frame-catch-tags-for-emacs (frame-index) (mapcar #'to-string (frame-catch-tags frame-index))) From heller at common-lisp.net Wed Dec 15 22:32:51 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:32:51 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041215223251.A2C8488649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv7968 Modified Files: slime.el Log Message: (slime-lisp-modes): New variable to make C-c C-k customizable and usable in scheme-mode. (slime-compile-file): Use it. Date: Wed Dec 15 23:32:50 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.440 slime/slime.el:1.441 --- slime/slime.el:1.440 Wed Dec 15 08:11:47 2004 +++ slime/slime.el Wed Dec 15 23:32:50 2004 @@ -3283,12 +3283,14 @@ (interactive) (slime-compile-file t)) +(defvar slime-lisp-modes '(lisp-mode)) + (defun slime-compile-file (&optional load) "Compile current buffer's file and highlight resulting compiler notes. See `slime-compile-and-load-file' for further details." (interactive) - (unless (eq major-mode 'lisp-mode) + (unless (memq major-mode slime-lisp-modes) (error "Only valid in lisp-mode")) (unless buffer-file-name (error "Buffer %s is not associated with a file." (buffer-name))) From heller at common-lisp.net Wed Dec 15 22:35:21 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:35:21 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-clisp.lisp Message-ID: <20041215223521.9EF6688649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv8027 Modified Files: swank-clisp.lisp Log Message: (*buffer-name* *buffer-offset*): Move definitions upward before the first use. Date: Wed Dec 15 23:35:20 2004 Author: heller Index: slime/swank-clisp.lisp diff -u slime/swank-clisp.lisp:1.44 slime/swank-clisp.lisp:1.45 --- slime/swank-clisp.lisp:1.44 Sun Dec 5 16:25:37 2004 +++ slime/swank-clisp.lisp Wed Dec 15 23:35:20 2004 @@ -337,7 +337,10 @@ `(ext:letf* ,(loop for (name function) in names-functions collect `((symbol-function ',name) ,function)) , at body)) - + +(defvar *buffer-name* nil) +(defvar *buffer-offset*) + (defun compiler-note-location () "Return the current compiler location." (let ((lineno1 sys::*compile-file-lineno1*) @@ -383,9 +386,6 @@ :severity :warning :message (princ-to-string condition) :location (compiler-note-location)))) - -(defvar *buffer-name* nil) -(defvar *buffer-offset*) (defimplementation swank-compile-file (filename load-p) (with-compilation-hooks () From heller at common-lisp.net Wed Dec 15 22:37:34 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:37:34 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-source-path-parser.lisp Message-ID: <20041215223734.33E4088649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv8066 Modified Files: swank-source-path-parser.lisp Log Message: (source-path-stream-position): Bind *read-suppress* to nil before calling read-and-record-source-map. Date: Wed Dec 15 23:37:33 2004 Author: heller Index: slime/swank-source-path-parser.lisp diff -u slime/swank-source-path-parser.lisp:1.9 slime/swank-source-path-parser.lisp:1.10 --- slime/swank-source-path-parser.lisp:1.9 Sat Oct 30 12:16:29 2004 +++ slime/swank-source-path-parser.lisp Wed Dec 15 23:37:32 2004 @@ -38,7 +38,7 @@ (values (multiple-value-list (funcall fn stream char))) (end (file-position stream))) ;;(format t "[~D ~{~A~^, ~} ~D ~D]~%" start values end (char-code char)) - (unless (null values) + (unless (null values) (push (cons start end) (gethash (car values) source-map))) (values-list values)))) @@ -72,7 +72,9 @@ (destructuring-bind (tlf-number . path) path (let ((*read-suppress* t)) (dotimes (i tlf-number) (read stream))) - (multiple-value-bind (form source-map) (read-and-record-source-map stream) + (multiple-value-bind (form source-map) + (let ((*read-suppress* nil)) + (read-and-record-source-map stream)) (source-path-source-position (cons 0 path) form source-map)))) (defun source-path-string-position (path string) From heller at common-lisp.net Wed Dec 15 22:40:44 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:40:44 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-cmucl.lisp Message-ID: <20041215224044.A1F3E88649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv8099 Modified Files: swank-cmucl.lisp Log Message: (frame-package): Delete it. Include the package name for local variables because it is utterly confusing if `eval-in-frame' doesn't work due to missing package prefixes. Date: Wed Dec 15 23:40:42 2004 Author: heller Index: slime/swank-cmucl.lisp diff -u slime/swank-cmucl.lisp:1.133 slime/swank-cmucl.lisp:1.134 --- slime/swank-cmucl.lisp:1.133 Sun Dec 5 22:13:22 2004 +++ slime/swank-cmucl.lisp Wed Dec 15 23:40:42 2004 @@ -1536,15 +1536,6 @@ (error (e) (ignore-errors (princ e stream)))))) -(defimplementation frame-package (frame-number) - (find-package - (ignore-errors - (c::compiled-debug-info-package - (kernel:%code-debug-info - (kernel:function-code-header - (di:debug-function-function - (di:frame-debug-function (nth-frame frame-number))))))))) - (defimplementation frame-source-location-for-emacs (index) (code-location-source-location (di:frame-code-location (nth-frame index)))) From heller at common-lisp.net Wed Dec 15 22:45:23 2004 From: heller at common-lisp.net (Helmut Eller) Date: Wed, 15 Dec 2004 23:45:23 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-backend.lisp Message-ID: <20041215224523.E71A688649@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv8379 Modified Files: swank-backend.lisp Log Message: (frame-package): Delete it. Include the package name for local variables because it is utterly confusing if `eval-in-frame' doesn't work due to missing package prefixes. Date: Wed Dec 15 23:45:20 2004 Author: heller Index: slime/swank-backend.lisp diff -u slime/swank-backend.lisp:1.76 slime/swank-backend.lisp:1.77 --- slime/swank-backend.lisp:1.76 Wed Nov 24 20:57:10 2004 +++ slime/swank-backend.lisp Wed Dec 15 23:45:20 2004 @@ -244,7 +244,7 @@ (funcall fn)) (definterface default-readtable-alist () - "Return a suitable initial value for SWANK:*READTABLE-ALIST*." + "Return a suitable initial value for SWANK:*READTABLE-ALIST*." '()) (definterface quit-lisp () @@ -437,12 +437,6 @@ (definterface print-frame (frame stream) "Print frame to stream.") - -(definterface frame-package (frame) - "Return the preferred package to use when printing local variables. -NIL can be used if no particular package is known." - (declare (ignore frame)) - nil) (definterface frame-source-location-for-emacs (frame-number) "Return the source location for FRAME-NUMBER.") From heller at common-lisp.net Wed Dec 15 23:01:12 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 00:01:12 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041215230112.A59ED88657@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv9116 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 16 00:00:52 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.590 slime/ChangeLog:1.591 --- slime/ChangeLog:1.590 Wed Dec 15 08:14:47 2004 +++ slime/ChangeLog Thu Dec 16 00:00:44 2004 @@ -1,3 +1,23 @@ +2004-12-15 Matthias Koeppe + + * slime.el (slime-lisp-modes): New variable to make C-c C-k + customizable and usable in scheme-mode. + (slime-compile-file): Use it. + +2004-12-15 Helmut Eller + + * swank-cmucl.lisp, swank-backend.lisp (frame-package): Delete it. + Include the package name for local variables because it is utterly + confusing if `eval-in-frame' doesn't work due to missing package + prefixes. + + * swank-source-path-parser.lisp (source-path-stream-position): + Bind *read-suppress* to nil before calling + read-and-record-source-map. + + * swank-clisp.lisp (*buffer-name*, *buffer-offset*): Move + definitions upward before the first use. + 2004-12-15 Bryan O'Connor * slime.el (slime-edit-definition): Switch to the other frame if From heller at common-lisp.net Thu Dec 16 21:08:05 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 22:08:05 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041216210805.4EB4F880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv11787 Modified Files: slime.el Log Message: (slime-keys): Bind M-* to slime-pop-find-definition-stack for compatibility with standard Emacs convention. Date: Thu Dec 16 22:08:03 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.441 slime/slime.el:1.442 --- slime/slime.el:1.441 Wed Dec 15 23:32:50 2004 +++ slime/slime.el Thu Dec 16 22:08:02 2004 @@ -546,6 +546,7 @@ ("\M-i" slime-fuzzy-complete-symbol :prefixed t :inferior t) ("\M-." slime-edit-definition :inferior t :sldb t) ("\M-," slime-pop-find-definition-stack :inferior t :sldb t) + ("\M-*" slime-pop-find-definition-stack :inferior t :sldb t) ("\C-q" slime-close-parens-at-point :prefixed t :inferior t) ("\C-c\M-q" slime-reindent-defun :inferior t) ;; Evaluating @@ -6127,9 +6128,9 @@ (defun sldb-insert-frame (frame &optional detailedp) (destructuring-bind (number string) frame - (slime-insert-propertized + (slime-insert-propertized `(frame ,frame sldb-default-action sldb-toggle-details) - " " (in-sldb-face frame-label (format "%d" number)) ": " + " " (in-sldb-face frame-label (format "%2d" number)) ": " (if detailedp (in-sldb-face detailed-frame-line string) (in-sldb-face frame-line string)) @@ -7347,6 +7348,7 @@ The results are presented in an outline-mode buffer, with the tests that succeeded initially folded away." (interactive) + (assert (not (slime-busy-p))) (slime-create-test-results-buffer) (unwind-protect (slime-execute-tests) From heller at common-lisp.net Thu Dec 16 21:13:57 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 22:13:57 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-source-path-parser.lisp Message-ID: <20041216211357.E15BC880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv11847 Modified Files: swank-source-path-parser.lisp Log Message: (read-source-form): New function. Common code from source-path-stream-position and form-number-stream-position. (source-path-stream-position): Use it. Date: Thu Dec 16 22:13:50 2004 Author: heller Index: slime/swank-source-path-parser.lisp diff -u slime/swank-source-path-parser.lisp:1.10 slime/swank-source-path-parser.lisp:1.11 --- slime/swank-source-path-parser.lisp:1.10 Wed Dec 15 23:37:32 2004 +++ slime/swank-source-path-parser.lisp Thu Dec 16 22:13:49 2004 @@ -67,14 +67,19 @@ *source-map*))) (values (read stream) *source-map*))) +(defun read-source-form (n stream) + "Read the Nth toplevel form number with source location recording. +Return the form and the source-map." + (let ((*read-suppress* t)) + (dotimes (i n) + (read stream))) + (let ((*read-suppress* nil)) + (read-and-record-source-map stream))) + (defun source-path-stream-position (path stream) "Search the source-path PATH in STREAM and return its position." (destructuring-bind (tlf-number . path) path - (let ((*read-suppress* t)) - (dotimes (i tlf-number) (read stream))) - (multiple-value-bind (form source-map) - (let ((*read-suppress* nil)) - (read-and-record-source-map stream)) + (multiple-value-bind (form source-map) (read-source-form tlf-number stream) (source-path-source-position (cons 0 path) form source-map)))) (defun source-path-string-position (path string) @@ -88,7 +93,7 @@ (defun source-path-source-position (path form source-map) "Return the start position of PATH from FORM and SOURCE-MAP. All subforms along the path are considered and the start and end position -of deepest (i.e. smallest) possible form is returned." +of the deepest (i.e. smallest) possible form is returned." ;; compute all subforms along path (let ((forms (loop for n in path for f = form then (nth n f) From heller at common-lisp.net Thu Dec 16 21:14:45 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 22:14:45 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-cmucl.lisp Message-ID: <20041216211445.079D0880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv11883 Modified Files: swank-cmucl.lisp Log Message: (form-number-stream-position): Use read-source-form. Date: Thu Dec 16 22:14:44 2004 Author: heller Index: slime/swank-cmucl.lisp diff -u slime/swank-cmucl.lisp:1.134 slime/swank-cmucl.lisp:1.135 --- slime/swank-cmucl.lisp:1.134 Wed Dec 15 23:40:42 2004 +++ slime/swank-cmucl.lisp Thu Dec 16 22:14:42 2004 @@ -788,15 +788,13 @@ "Return the starting character position of a form in STREAM. TLF-NUMBER is the top-level-form number. FORM-NUMBER is an index into a source-path table for the TLF." - (let ((*read-suppress* t)) - (dotimes (i tlf-number) (read stream)) - (multiple-value-bind (tlf position-map) (read-and-record-source-map stream) - (let* ((path-table (di:form-number-translations tlf 0)) - (source-path - (if (<= (length path-table) form-number) ; source out of sync? - (list 0) ; should probably signal a condition - (reverse (cdr (aref path-table form-number)))))) - (source-path-source-position source-path tlf position-map))))) + (multiple-value-bind (tlf position-map) (read-source-form tlf-number stream) + (let* ((path-table (di:form-number-translations tlf 0)) + (source-path + (if (<= (length path-table) form-number) ; source out of sync? + (list 0) ; should probably signal a condition + (reverse (cdr (aref path-table form-number)))))) + (source-path-source-position source-path tlf position-map)))) (defun code-location-string-offset (code-location string) "Return the byte offset of CODE-LOCATION in STRING. From heller at common-lisp.net Thu Dec 16 21:16:53 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 22:16:53 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank.lisp Message-ID: <20041216211653.B41D5880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv12598 Modified Files: swank.lisp Log Message: (frame-for-emacs): Print the frame number a little nicer with ~2D. Date: Thu Dec 16 22:16:51 2004 Author: heller Index: slime/swank.lisp diff -u slime/swank.lisp:1.271 slime/swank.lisp:1.272 --- slime/swank.lisp:1.271 Wed Dec 15 23:30:56 2004 +++ slime/swank.lisp Thu Dec 16 22:16:50 2004 @@ -1474,7 +1474,7 @@ (princ-to-string restart)))) (defun frame-for-emacs (n frame) - (let* ((label (format nil " ~D: " n)) + (let* ((label (format nil " ~2D: " n)) (string (with-output-to-string (stream) (princ label stream) (print-frame frame stream)))) From heller at common-lisp.net Thu Dec 16 21:26:10 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 22:26:10 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041216212610.D01AF880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv12689 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 16 22:26:08 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.591 slime/ChangeLog:1.592 --- slime/ChangeLog:1.591 Thu Dec 16 00:00:44 2004 +++ slime/ChangeLog Thu Dec 16 22:26:08 2004 @@ -1,3 +1,22 @@ +2004-12-16 Matthias Koeppe + + * slime.el (slime-keys): Bind M-* to + slime-pop-find-definition-stack for compatibility with standard + Emacs conventions. + +2004-12-16 Helmut Eller + + * swank-source-path-parser.lisp (read-source-form): New function + which uses *read-suppress* properly. Common code from + source-path-stream-position and form-number-stream-position. + (source-path-stream-position): Use it. + + * swank-cmucl.lisp (form-number-stream-position): Use + read-source-form. + + * swank.lisp (frame-for-emacs): Print the frame number a little + nicer with ~2D. + 2004-12-15 Matthias Koeppe * slime.el (slime-lisp-modes): New variable to make C-c C-k From heller at common-lisp.net Thu Dec 16 22:24:43 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 23:24:43 +0100 (CET) Subject: [slime-cvs] CVS update: slime/slime.el Message-ID: <20041216222443.541D3880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv15864 Modified Files: slime.el Log Message: (slime-complete-symbol*): Bind comint-completion-addsuffix so unambiguous or exact completion closes the string automatically. Date: Thu Dec 16 23:24:41 2004 Author: heller Index: slime/slime.el diff -u slime/slime.el:1.442 slime/slime.el:1.443 --- slime/slime.el:1.442 Thu Dec 16 22:08:02 2004 +++ slime/slime.el Thu Dec 16 23:24:41 2004 @@ -4502,7 +4502,9 @@ ;; NB: It is only the name part of the symbol that we actually want ;; to complete -- the package prefix, if given, is just context. (when (save-excursion (re-search-backward "\"[^ \t\n]+\\=" nil t)) - (return-from slime-complete-symbol* (comint-dynamic-complete-as-filename))) + (return-from slime-complete-symbol* + (let ((comint-completion-addsuffix '("/" . "\""))) + (comint-dynamic-complete-as-filename)))) (let* ((end (move-marker (make-marker) (slime-symbol-end-pos))) (beg (move-marker (make-marker) (slime-symbol-start-pos))) (prefix (buffer-substring-no-properties beg end)) From heller at common-lisp.net Thu Dec 16 22:25:25 2004 From: heller at common-lisp.net (Helmut Eller) Date: Thu, 16 Dec 2004 23:25:25 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041216222525.6FFE9880A8@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv15902 Modified Files: ChangeLog Log Message: *** empty log message *** Date: Thu Dec 16 23:25:23 2004 Author: heller Index: slime/ChangeLog diff -u slime/ChangeLog:1.592 slime/ChangeLog:1.593 --- slime/ChangeLog:1.592 Thu Dec 16 22:26:08 2004 +++ slime/ChangeLog Thu Dec 16 23:25:23 2004 @@ -1,3 +1,9 @@ +2004-12-16 Edi Weitz + + * slime.el (slime-complete-symbol*): Bind + comint-completion-addsuffix so unambiguous or exact completion + closes the string automatically. + 2004-12-16 Matthias Koeppe * slime.el (slime-keys): Bind M-* to From msimmons at common-lisp.net Tue Dec 21 13:48:42 2004 From: msimmons at common-lisp.net (Martin Simmons) Date: Tue, 21 Dec 2004 14:48:42 +0100 (CET) Subject: [slime-cvs] CVS update: slime/ChangeLog Message-ID: <20041221134842.5AF44884A9@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv29046 Modified Files: ChangeLog Log Message: Date: Tue Dec 21 14:48:40 2004 Author: msimmons Index: slime/ChangeLog diff -u slime/ChangeLog:1.593 slime/ChangeLog:1.594 --- slime/ChangeLog:1.593 Thu Dec 16 23:25:23 2004 +++ slime/ChangeLog Tue Dec 21 14:48:40 2004 @@ -1,3 +1,8 @@ +2004-12-16 Martin Simmons + + * swank-lispworks.lisp (create-socket): Work around bug in + comm::create-tcp-socket-for-service on Mac OS LW 4.3. + 2004-12-16 Edi Weitz * slime.el (slime-complete-symbol*): Bind From msimmons at common-lisp.net Tue Dec 21 13:49:33 2004 From: msimmons at common-lisp.net (Martin Simmons) Date: Tue, 21 Dec 2004 14:49:33 +0100 (CET) Subject: [slime-cvs] CVS update: slime/swank-lispworks.lisp Message-ID: <20041221134933.5D99A884A9@common-lisp.net> Update of /project/slime/cvsroot/slime In directory common-lisp.net:/tmp/cvs-serv29072 Modified Files: swank-lispworks.lisp Log Message: (create-socket): Work around bug in comm::create-tcp-socket-for-service on Mac OS LW 4.3. Date: Tue Dec 21 14:49:31 2004 Author: msimmons Index: slime/swank-lispworks.lisp diff -u slime/swank-lispworks.lisp:1.63 slime/swank-lispworks.lisp:1.64 --- slime/swank-lispworks.lisp:1.63 Mon Nov 29 18:33:04 2004 +++ slime/swank-lispworks.lisp Tue Dec 21 14:49:30 2004 @@ -55,8 +55,10 @@ (defimplementation create-socket (host port) (multiple-value-bind (socket where errno) - #-lispworks4.1(comm::create-tcp-socket-for-service port :address host) - #+lispworks4.1(comm::create-tcp-socket-for-service port) + #-(or lispworks4.1 (and macosx lispworks4.3)) + (comm::create-tcp-socket-for-service port :address host) + #+(or lispworks4.1 (and macosx lispworks4.3)) + (comm::create-tcp-socket-for-service port) (cond (socket socket) (t (error 'network-error :format-control "~A failed: ~A (~D)"