From sboukarev at common-lisp.net Sat May 1 06:12:30 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 01 May 2010 02:12:30 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv6980 Modified Files: ChangeLog slime.el Log Message: * contrib/slime-repl.el (slime-repl-update-banner): Use slime-move-point instead of goto-char alone, ensuring that the point is moved even if the window isn't currently selected. * slime.el (slime-restart-sentinel): Don't pop to the inferior buffer, since this command is usually run either from *inferior-lisp* buffer or from REPL, it makes sense to reuse current window instead of messing up window configuration. (slime-move-point): New function, moves point in a buffer and its window. --- /project/slime/cvsroot/slime/ChangeLog 2010/04/30 03:14:35 1.2079 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/01 06:12:30 1.2080 @@ -1,3 +1,12 @@ +2010-05-01 Stas Boukarev + + * slime.el (slime-restart-sentinel): Don't pop to the inferior + buffer, since this command is usually run either from + *inferior-lisp* buffer or from REPL, it makes sense to reuse + current window instead of messing up window configuration. + (slime-move-point): New function, moves point in a buffer and + its window. + 2010-04-29 Stas Boukarev * slime.el (slime-compile-file): Run check-parens after checking --- /project/slime/cvsroot/slime/slime.el 2010/04/30 03:14:36 1.1309 +++ /project/slime/cvsroot/slime/slime.el 2010/05/01 06:12:30 1.1310 @@ -2475,7 +2475,6 @@ buffer))) (slime-net-close process) (slime-inferior-connect new-proc args) - (pop-to-buffer buffer) (switch-to-buffer buffer) (goto-char (point-max)))) @@ -6267,6 +6266,13 @@ (defvar slime-thread-index-to-id nil) +(defun slime-move-point (position) + "Move point in the current buffer and in the window the buffer is displayed." + (let ((window (get-buffer-window (current-buffer) t))) + (goto-char position) + (when window + (set-window-point window position)))) + ;;; FIXME: the region selection is jumping (defun slime-display-threads (threads) (with-current-buffer slime-threads-buffer-name @@ -6283,7 +6289,7 @@ (goto-char (point-min)) (forward-line (1- (or new-position old-line))) (move-to-column old-column) - (set-window-point (get-buffer-window (current-buffer)) (point)))))) + (slime-move-point (point)))))) (defvar *slime-threads-table-properties* '(nil (face bold))) From sboukarev at common-lisp.net Sat May 1 06:12:30 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 01 May 2010 02:12:30 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv6980/contrib Modified Files: ChangeLog slime-repl.el Log Message: * contrib/slime-repl.el (slime-repl-update-banner): Use slime-move-point instead of goto-char alone, ensuring that the point is moved even if the window isn't currently selected. * slime.el (slime-restart-sentinel): Don't pop to the inferior buffer, since this command is usually run either from *inferior-lisp* buffer or from REPL, it makes sense to reuse current window instead of messing up window configuration. (slime-move-point): New function, moves point in a buffer and its window. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/04/18 01:35:10 1.371 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/01 06:12:30 1.372 @@ -1,3 +1,9 @@ +2010-05-01 Stas Boukarev + + * slime-repl.el (slime-repl-update-banner): Use slime-move-point + instead of goto-char alone, ensuring that the point is moved even + if the window isn't currently selected. + 2010-04-18 Stas Boukarev * slime-presentations.el --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/04/05 23:45:23 1.40 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/01 06:12:30 1.41 @@ -134,7 +134,7 @@ (defun slime-repl-update-banner () (funcall slime-repl-banner-function) - (goto-char (point-max)) + (slime-move-point (point-max)) (slime-mark-output-start) (slime-mark-input-start) (slime-repl-insert-prompt)) From sboukarev at common-lisp.net Sat May 1 15:28:43 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 01 May 2010 11:28:43 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv26218 Modified Files: ChangeLog slime-fuzzy.el Log Message: * slime-fuzzy.el(slime-fuzzy-dehighlight-current-completion): instead of creating new overlays, move one overlay around. (slime-mimic-key-bindings): Renamed from mimic-key-bindings. Patch by Leo Liu. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/01 06:12:30 1.372 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/01 15:28:43 1.373 @@ -1,5 +1,12 @@ 2010-05-01 Stas Boukarev + * slime-fuzzy.el(slime-fuzzy-dehighlight-current-completion): + instead of creating new overlays, move one overlay around. + (slime-mimic-key-bindings): Renamed from mimic-key-bindings. + Patch by Leo Liu. + +2010-05-01 Stas Boukarev + * slime-repl.el (slime-repl-update-banner): Use slime-move-point instead of goto-char alone, ensuring that the point is moved even if the window isn't currently selected. --- /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2010/03/20 08:27:50 1.17 +++ /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2010/05/01 15:28:43 1.18 @@ -80,7 +80,7 @@ ;; FIXME: clean this up -(defun mimic-key-bindings (from-keymap to-keymap bindings-or-operation operation) +(defun slime-mimic-key-bindings (from-keymap to-keymap bindings-or-operation operation) "Iterate on BINDINGS-OR-OPERATION. If an element is a symbol then try to look it up (as an operation) in FROM-KEYMAP. Non symbols are taken as default key bindings when none to be mimiced was found in FROM-KEYMAP. @@ -97,7 +97,7 @@ (defvar slime-target-buffer-fuzzy-completions-map (let* ((map (make-sparse-keymap))) (flet ((remap (keys to) - (mimic-key-bindings global-map map keys to))) + (slime-mimic-key-bindings global-map map keys to))) (remap (list 'keyboard-quit (kbd "C-g")) 'slime-fuzzy-abort) @@ -116,8 +116,7 @@ ;; some unconditional direct bindings (dolist (key (list (kbd "") (kbd "RET") (kbd "") "(" ")" "[" "]")) (define-key map key 'slime-fuzzy-select-and-process-event-in-target-buffer))) - map - ) + map) "Keymap for slime-target-buffer-fuzzy-completions-mode. This will override the key bindings in the target buffer temporarily during completion.") @@ -185,12 +184,14 @@ \\\ \\{slime-fuzzy-completions-map}" - (use-local-map slime-fuzzy-completions-map)) + (use-local-map slime-fuzzy-completions-map) + (set (make-local-variable 'slime-fuzzy-current-completion-overlay) + (make-overlay (point) (point) nil t nil))) (defvar slime-fuzzy-completions-map (let* ((map (make-sparse-keymap))) (flet ((remap (keys to) - (mimic-key-bindings global-map map keys to))) + (slime-mimic-key-bindings global-map map keys to))) (remap (list 'keyboard-quit (kbd "C-g")) 'slime-fuzzy-abort) (define-key map "q" 'slime-fuzzy-abort) @@ -461,7 +462,6 @@ buffer." (interactive) (with-current-buffer (slime-get-fuzzy-buffer) - (slime-fuzzy-dehighlight-current-completion) (let ((point (next-single-char-property-change (point) 'completion nil slime-fuzzy-last))) (set-window-point (get-buffer-window (current-buffer)) point) (goto-char point)) @@ -472,24 +472,19 @@ completions buffer." (interactive) (with-current-buffer (slime-get-fuzzy-buffer) - (slime-fuzzy-dehighlight-current-completion) (let ((point (previous-single-char-property-change (point) 'completion nil slime-fuzzy-first))) (set-window-point (get-buffer-window (current-buffer)) point) (goto-char point)) (slime-fuzzy-highlight-current-completion))) -(defun slime-fuzzy-dehighlight-current-completion () - "Restores the original face for the current completion." - (when slime-fuzzy-current-completion-overlay - (overlay-put slime-fuzzy-current-completion-overlay 'face 'nil))) - (defun slime-fuzzy-highlight-current-completion () "Highlights the current completion, so that the user can see it on the screen." (let ((pos (point))) - (setq slime-fuzzy-current-completion-overlay - (make-overlay (point) (1- (search-forward " ")) - (current-buffer) t nil)) - (overlay-put slime-fuzzy-current-completion-overlay 'face 'secondary-selection) + (when (overlayp slime-fuzzy-current-completion-overlay) + (move-overlay slime-fuzzy-current-completion-overlay + (point) (1- (search-forward " "))) + (overlay-put slime-fuzzy-current-completion-overlay + 'face 'secondary-selection)) (goto-char pos))) (defun slime-fuzzy-abort () From heller at common-lisp.net Wed May 5 05:19:37 2010 From: heller at common-lisp.net (CVS User heller) Date: Wed, 05 May 2010 01:19:37 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv10267 Modified Files: ChangeLog slime.el Log Message: * slime.el (sldb-exit): When stepping, close buffer after a delay. (sldb-close-step-buffer): New function. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/01 06:12:30 1.2080 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:19:37 1.2081 @@ -1,3 +1,8 @@ +2010-05-05 Helmut Eller + + * slime.el (sldb-exit): When stepping, close buffer after a delay. + (sldb-close-step-buffer): New function. + 2010-05-01 Stas Boukarev * slime.el (slime-restart-sentinel): Don't pop to the inferior --- /project/slime/cvsroot/slime/slime.el 2010/05/01 06:12:30 1.1310 +++ /project/slime/cvsroot/slime/slime.el 2010/05/05 05:19:37 1.1311 @@ -5532,10 +5532,17 @@ (when-let (sldb (sldb-find-buffer thread)) (with-current-buffer sldb (cond (stepping - (setq sldb-level nil)) + (setq sldb-level nil) + (run-with-timer 0.4 nil 'sldb-close-step-buffer sldb)) (t (slime-popup-buffer-quit t)))))) +(defun sldb-close-step-buffer (buffer) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (when (not sldb-level) + (slime-popup-buffer-quit t))))) + ;;;;;; SLDB buffer insertion From heller at common-lisp.net Wed May 5 05:19:46 2010 From: heller at common-lisp.net (CVS User heller) Date: Wed, 05 May 2010 01:19:46 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv10300 Modified Files: ChangeLog slime.el Log Message: Fix for Cygwin Emacs filename problem. * slime.el (slime-init-command): Use slime-to-lisp-filename. Patch from Mark Evenson. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:19:37 1.2081 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:19:46 1.2082 @@ -1,3 +1,9 @@ +2010-05-05 Mark Evenson + + Fix for Cygwin Emacs filename problem. + + * slime.el (slime-init-command): Use slime-to-lisp-filename. + 2010-05-05 Helmut Eller * slime.el (sldb-exit): When stepping, close buffer after a delay. --- /project/slime/cvsroot/slime/slime.el 2010/05/05 05:19:37 1.1311 +++ /project/slime/cvsroot/slime/slime.el 2010/05/05 05:19:46 1.1312 @@ -1315,10 +1315,11 @@ ;; Return a single form to avoid problems with buffered input. (format "%S\n\n" `(progn - (load ,(expand-file-name loader) :verbose t) + (load ,(slime-to-lisp-filename (expand-file-name loader)) + :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") - ,port-filename + ,(slime-to-lisp-filename port-filename) :coding-system ,encoding))))) (defun slime-swank-port-file () From heller at common-lisp.net Wed May 5 05:19:50 2010 From: heller at common-lisp.net (CVS User heller) Date: Wed, 05 May 2010 01:19:50 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv10338/contrib Modified Files: ChangeLog slime-editing-commands.el Log Message: * slime-editing-commands.el: Fix typo. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/01 15:28:43 1.373 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/05 05:19:50 1.374 @@ -1,3 +1,7 @@ +2010-05-05 Helmut Eller + + * slime-editing-commands.el: Fix typo. + 2010-05-01 Stas Boukarev * slime-fuzzy.el(slime-fuzzy-dehighlight-current-completion): --- /project/slime/cvsroot/slime/contrib/slime-editing-commands.el 2008/12/24 08:13:51 1.10 +++ /project/slime/cvsroot/slime/contrib/slime-editing-commands.el 2010/05/05 05:19:50 1.11 @@ -1,4 +1,4 @@ -;;; slime-editing-commands.el -- editing commands whithout server interaction +;;; slime-editing-commands.el -- editing commands without server interaction ;; ;; Authors: Thomas F. Burdick ;; Luke Gorrie From heller at common-lisp.net Wed May 5 05:25:29 2010 From: heller at common-lisp.net (CVS User heller) Date: Wed, 05 May 2010 01:25:29 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv20324 Modified Files: ChangeLog swank-cmucl.lisp Log Message: * swank-cmucl.lisp (gdb-command): Use gdb's MI. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:19:46 1.2082 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:25:29 1.2083 @@ -1,3 +1,7 @@ +2010-05-05 Helmut Eller + + * swank-cmucl.lisp (gdb-command): Use gdb's MI. + 2010-05-05 Mark Evenson Fix for Cygwin Emacs filename problem. --- /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/03/03 11:57:11 1.221 +++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/05/05 05:25:29 1.222 @@ -1894,10 +1894,13 @@ (delete-file name)))) (defun gdb-command (format-string &rest args) - (let ((str (gdb-exec (format nil "attach ~d~%~a~%detach" + (let ((str (gdb-exec (format nil + "interpreter-exec mi2 \"attach ~d\"~%~ + interpreter-exec console ~s~%detach" (getpid) - (apply #'format nil format-string args))))) - (subseq str (1+ (position #\newline str))))) + (apply #'format nil format-string args)))) + (prompt (format nil "~%^done~%(gdb) ~%"))) + (subseq str (+ (search prompt str) (length prompt))))) (defun gdb-exec (cmd) (with-temporary-file (file filename) @@ -1946,7 +1949,8 @@ (format nil "~a/lisp/" (unix-truename "target:"))))) (list :line (parse-integer line)))))) - (t `(:error ,string)))))) + (t + `(:error ,string)))))) (defun read-word (&optional (stream *standard-input*)) (peek-char t stream) From sboukarev at common-lisp.net Wed May 5 13:55:18 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 May 2010 09:55:18 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv3769 Modified Files: ChangeLog slime-tramp.el Log Message: * slime-tramp.el (slime-tramp-to-lisp-filename): Check if slime is connected, because slime-to-lisp-filename is now used for establishing connection. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/05 05:19:50 1.374 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/05 13:55:18 1.375 @@ -1,3 +1,9 @@ +2010-05-05 Stas Boukarev + + * slime-tramp.el (slime-tramp-to-lisp-filename): Check if slime is + connected, because slime-to-lisp-filename is now used for + establishing connection. + 2010-05-05 Helmut Eller * slime-editing-commands.el: Fix typo. --- /project/slime/cvsroot/slime/contrib/slime-tramp.el 2008/03/18 13:21:28 1.3 +++ /project/slime/cvsroot/slime/contrib/slime-tramp.el 2010/05/05 13:55:18 1.4 @@ -100,7 +100,9 @@ lisp-filename))))) (defun slime-tramp-to-lisp-filename (filename) - (funcall (first (slime-find-filename-translators (slime-machine-instance))) + (funcall (if (slime-connected-p) + (first (slime-find-filename-translators (slime-machine-instance))) + 'identity) (expand-file-name filename))) (defun slime-tramp-from-lisp-filename (filename) @@ -110,4 +112,4 @@ (setq slime-to-lisp-filename-function #'slime-tramp-to-lisp-filename) (setq slime-from-lisp-filename-function #'slime-tramp-from-lisp-filename) -(provide 'slime-tramp) \ No newline at end of file +(provide 'slime-tramp) From sboukarev at common-lisp.net Wed May 5 16:00:43 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 May 2010 12:00:43 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv20353 Modified Files: ChangeLog slime.el Log Message: * Make buffer names more consistent. Patch by Leo Liu. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/05 05:25:29 1.2083 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/05 16:00:42 1.2084 @@ -1,3 +1,8 @@ +2010-05-05 Stas Boukarev + + * Make buffer names more consistent. + Patch by Leo Liu. + 2010-05-05 Helmut Eller * swank-cmucl.lisp (gdb-command): Use gdb's MI. --- /project/slime/cvsroot/slime/slime.el 2010/05/05 05:19:46 1.1312 +++ /project/slime/cvsroot/slime/slime.el 2010/05/05 16:00:43 1.1313 @@ -721,6 +721,12 @@ (defvar slime-message-function 'message) ;; Interface +(defun slime-buffer-name (type &optional hidden) + (assert (keywordp type)) + (concat (if hidden " " "") + (format "*slime-%s*" (substring (symbol-name type) 1)))) + +;; Interface (defun slime-message (format &rest args) "Like `message' but with special support for multi-line messages. Single-line messages use the echo area." @@ -2301,7 +2307,7 @@ ((:ping thread tag) (slime-send `(:emacs-pong ,thread ,tag))) ((:reader-error packet condition) - (slime-with-popup-buffer ("*Slime Error*") + (slime-with-popup-buffer (slime-buffer-name :error) (princ (format "Invalid protocol message:\n%s\n\n%S" condition packet)) (goto-char (point-min))) @@ -2412,7 +2418,7 @@ (defvar slime-outline-mode-in-events-buffer nil "*Non-nil means use outline-mode in *slime-events*.") -(defvar slime-event-buffer-name "*slime-events*" +(defvar slime-event-buffer-name (slime-buffer-name :events) "The name of the slime event buffer.") (defun slime-log-event (event) @@ -2774,7 +2780,7 @@ (defun slime-create-compilation-log (notes) "Create a buffer for `next-error' to use." - (with-current-buffer (get-buffer-create "*SLIME Compilation*") + (with-current-buffer (get-buffer-create (slime-buffer-name :compilation)) (let ((inhibit-read-only t)) (erase-buffer)) (slime-insert-compilation-log notes) @@ -2786,7 +2792,7 @@ (with-struct (slime-compilation-result. notes duration successp) slime-last-compilation-result (unless successp - (with-current-buffer "*SLIME Compilation*" + (with-current-buffer (slime-buffer-name :compilation) (let ((inhibit-read-only t)) (goto-char (point-max)) (insert "Compilation " (if successp "succeeded." "failed.")) @@ -2796,7 +2802,7 @@ (defun slime-show-compilation-log (notes) "Create and display the compilation log buffer." (interactive (list (slime-compiler-notes))) - (slime-with-popup-buffer ("*SLIME Compilation*" + (slime-with-popup-buffer ((slime-buffer-name :compilation) :mode 'compilation-mode) (slime-insert-compilation-log notes))) @@ -2864,7 +2870,7 @@ (defun slime-goto-note-in-compilation-log (note) "Find `note' in the compilation log and display it." - (with-current-buffer (get-buffer "*SLIME Compilation*") + (with-current-buffer (get-buffer (slime-buffer-name :compilation)) (let ((origin (point)) (foundp nil)) (goto-char (point-min)) @@ -3243,7 +3249,7 @@ (slime-check-location-buffer-name-sanity buffer-name) (set-buffer buffer-name)) ((:source-form string) - (set-buffer (get-buffer-create "*SLIME Source Form*")) + (set-buffer (get-buffer-create (slime-buffer-name :source))) (erase-buffer) (lisp-mode) (insert string) @@ -3477,7 +3483,7 @@ (defun slime-show-note (overlay) "Present the details of a compiler note to the user." (slime-temporarily-highlight-note overlay) - (if (get-buffer-window "*SLIME Compilation*" t) + (if (get-buffer-window (slime-buffer-name :compilation) t) (slime-goto-note-in-compilation-log (overlay-get overlay 'slime-note)) (let ((message (get-char-property (point) 'help-echo))) (slime-message "%s" (if (zerop (length message)) "\"\"" message))))) @@ -4105,7 +4111,7 @@ ;; So we can have one description buffer open per connection. Useful ;; for comparing the output of DISASSEMBLE across implementations. ;; FIXME: could easily be achieved with M-x rename-buffer - (let ((bufname (format "*SLIME Description <%s>*" (slime-connection-name)))) + (let ((bufname (slime-buffer-name :description))) (slime-with-popup-buffer (bufname :package package :connection t :select slime-description-autofocus) @@ -4622,7 +4628,7 @@ (defun slime-show-apropos (plists string package summary) (if (null plists) (message "No apropos matches for %S" string) - (slime-with-popup-buffer ("*SLIME Apropos*" + (slime-with-popup-buffer ((slime-buffer-name :apropos) :package package :connection t :mode 'apropos-mode) (if (boundp 'header-line-format) @@ -4744,8 +4750,7 @@ (defmacro* slime-with-xref-buffer ((xref-type symbol &optional package) &body body) "Execute BODY in a xref buffer, then show that buffer." - `(let ((xref-buffer-name% (format "*slime xref[%s: %s]*" - ,xref-type ,symbol))) + `(let ((xref-buffer-name% (slime-buffer-name :xref))) (slime-with-popup-buffer (xref-buffer-name% :package ,package :connection t @@ -5143,7 +5148,7 @@ (font-lock-fontify-buffer))) (defun slime-create-macroexpansion-buffer () - (let ((name "*SLIME Macroexpansion*")) + (let ((name (slime-buffer-name :macroexpansion))) (slime-with-popup-buffer (name :package t :connection t :mode 'lisp-mode) (slime-mode 1) @@ -6219,7 +6224,7 @@ ;;;; Thread control panel -(defvar slime-threads-buffer-name "*SLIME Threads*") +(defvar slime-threads-buffer-name (slime-buffer-name :threads)) (defvar slime-threads-buffer-timer nil) (defcustom slime-threads-update-interval nil @@ -6438,7 +6443,7 @@ (slime-select-connection (slime-connection-at-point)) (slime-update-connection-list)) -(defvar slime-connections-buffer-name "*SLIME Connections*") +(defvar slime-connections-buffer-name (slime-buffer-name :connections)) (defun slime-list-connections () "Display a list of all connections." @@ -6534,8 +6539,9 @@ (setq buffer-read-only t)) (defun slime-inspector-buffer () - (or (get-buffer "*Slime Inspector*") - (slime-with-popup-buffer ("*Slime Inspector*" :mode 'slime-inspector-mode) + (or (get-buffer (slime-buffer-name :inspector)) + (slime-with-popup-buffer ((slime-buffer-name :inspector) + :mode 'slime-inspector-mode) (setq slime-inspector-mark-stack '()) (buffer-disable-undo) (make-local-variable 'slime-saved-window-config) @@ -7210,7 +7216,7 @@ (defun slime-cheat-sheet () (interactive) - (switch-to-buffer-other-frame (get-buffer-create "*SLIME Cheat Sheet*")) + (switch-to-buffer-other-frame (get-buffer-create (slime-buffer-name :cheat-sheet))) (setq buffer-read-only nil) (delete-region (point-min) (point-max)) (goto-char (point-min)) @@ -8127,7 +8133,7 @@ (string-match name (buffer-name buffer)))) (defun slime-inspector-visible-p () - (slime-buffer-visible-p "\\*Slime Inspector\\*" )) + (slime-buffer-visible-p (slime-buffer-name :inspector))) (defun slime-execute-as-command (name) "Execute `name' as if it was done by the user through the @@ -8157,9 +8163,9 @@ (slime-execute-as-command 'slime-macroexpand-1) (slime-wait-condition "Macroexpansion buffer visible" (lambda () - (slime-buffer-visible-p "*SLIME Macroexpansion*")) + (slime-buffer-visible-p (slime-buffer-name :macroexpansion))) 5) - (with-current-buffer (get-buffer "*SLIME Macroexpansion*") + (with-current-buffer (get-buffer (slime-buffer-name :macroexpansion)) (slime-test-expect "Initial macroexpansion is correct" expansion1 (downcase (buffer-string))) From sboukarev at common-lisp.net Wed May 5 16:00:44 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 May 2010 12:00:44 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv20353/contrib Modified Files: slime-autodoc.el slime-clipboard.el slime-compiler-notes-tree.el slime-mrepl.el slime-presentations.el slime-repl.el slime-scratch.el slime-sprof.el slime-typeout-frame.el slime-xref-browser.el Log Message: * Make buffer names more consistent. Patch by Leo Liu. --- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2010/04/12 18:51:02 1.44 +++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2010/05/05 16:00:44 1.45 @@ -114,7 +114,7 @@ (defun slime-fontify-string (string) "Fontify STRING as `font-lock-mode' does in Lisp mode." - (with-current-buffer (get-buffer-create " *slime-fontify*") + (with-current-buffer (get-buffer-create (slime-buffer-name :fontify 'hidden)) (erase-buffer) (unless (eq major-mode 'lisp-mode) ;; Just calling (lisp-mode) will turn slime-mode on in that buffer, --- /project/slime/cvsroot/slime/contrib/slime-clipboard.el 2010/04/17 18:10:20 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-clipboard.el 2010/05/05 16:00:44 1.6 @@ -64,7 +64,7 @@ #'slime-clipboard-display-entries)) (defun slime-clipboard-display-entries (entries) - (slime-with-popup-buffer ("*Slime Clipboard*" + (slime-with-popup-buffer ((slime-buffer-name :clipboard) :mode 'slime-clipboard-mode) (slime-clipboard-insert-entries entries))) --- /project/slime/cvsroot/slime/contrib/slime-compiler-notes-tree.el 2010/04/17 18:10:20 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-compiler-notes-tree.el 2010/05/05 16:00:44 1.5 @@ -22,7 +22,7 @@ "Show the compiler notes NOTES in tree view." (interactive (list (slime-compiler-notes))) (with-temp-message "Preparing compiler note tree..." - (slime-with-popup-buffer ("*SLIME Compiler-Notes*" + (slime-with-popup-buffer ((slime-buffer-name :notes) :mode 'slime-compiler-notes-mode) (when (null notes) (insert "[no notes]")) --- /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2009/01/04 20:53:06 1.2 +++ /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2010/05/05 16:00:44 1.3 @@ -115,7 +115,7 @@ (slime-rcurry (lambda (result channel) (destructuring-bind (remote thread-id package prompt) result - (pop-to-buffer (generate-new-buffer "*slime-listener*")) + (pop-to-buffer (generate-new-buffer (slime-buffer-name :listener))) (slime-mrepl-mode) (setq slime-current-thread thread-id) (setq slime-buffer-connection (slime-connection)) --- /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/04/18 01:35:10 1.31 +++ /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/05 16:00:44 1.32 @@ -1,4 +1,4 @@ -;;; swank-presentations.el --- imitat LispM' presentations +;;; swank-presentations.el --- imitate LispM' presentations ;;; ;;; Authors: Alan Ruttenberg ;;; Matthias Koeppe @@ -485,7 +485,7 @@ (defun slime-describe-presentation (presentation) (slime-eval-describe `(swank::describe-to-string - (swank::lookup-presented-object ',(slime-presentation-id presentation))))) + (swank:lookup-presented-object ',(slime-presentation-id presentation))))) (defun slime-describe-presentation-at-mouse (event) (interactive "@e") @@ -502,7 +502,7 @@ (slime-eval-describe `(swank::swank-pprint (cl:list - (swank::lookup-presented-object ',(slime-presentation-id presentation)))))) + (swank:lookup-presented-object ',(slime-presentation-id presentation)))))) (defun slime-pretty-print-presentation-at-mouse (event) (interactive "@e") --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/01 06:12:30 1.41 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/05 16:00:44 1.42 @@ -1426,7 +1426,7 @@ (defun slime-redirect-trace-output () "Redirect the trace output to a separate Emacs buffer." (interactive) - (let ((buffer (get-buffer-create "*SLIME Trace Output*"))) + (let ((buffer (get-buffer-create (slime-buffer-name :trace)))) (with-current-buffer buffer (let ((marker (copy-marker (buffer-size))) (target (incf slime-last-output-target-id))) --- /project/slime/cvsroot/slime/contrib/slime-scratch.el 2008/10/11 17:13:18 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-scratch.el 2010/05/05 16:00:44 1.6 @@ -32,11 +32,11 @@ (defun slime-scratch-buffer () "Return the scratch buffer, create it if necessary." - (or (get-buffer "*slime-scratch*") + (or (get-buffer (slime-buffer-name :scratch)) (with-current-buffer (if slime-scratch-file (find-file slime-scratch-file) - (get-buffer-create "*slime-scratch*")) - (rename-buffer "*slime-scratch*") + (get-buffer-create (slime-buffer-name :scratch))) + (rename-buffer (slime-buffer-name :scratch)) (lisp-mode) (use-local-map slime-scratch-mode-map) (slime-mode t) @@ -50,4 +50,4 @@ "*slime-scratch* buffer." (slime-scratch-buffer))) -(provide 'slime-scratch) \ No newline at end of file +(provide 'slime-scratch) --- /project/slime/cvsroot/slime/contrib/slime-sprof.el 2010/04/17 18:10:20 1.8 +++ /project/slime/cvsroot/slime/contrib/slime-sprof.el 2010/05/05 16:00:44 1.9 @@ -44,7 +44,7 @@ ;; Reporting (defun slime-sprof-format (graph) - (with-current-buffer "*slime-sprof-browser*" + (with-current-buffer (slime-buffer-name :sprof) (let ((inhibit-read-only t)) (erase-buffer) (insert (format "%4s %-54s %6s %6s %6s\n" @@ -64,7 +64,7 @@ (defun slime-sprof-browser () (interactive) - (slime-with-popup-buffer ("*slime-sprof-browser*" + (slime-with-popup-buffer ((slime-buffer-name :sprof) :connection t :select t :mode 'slime-sprof-browser-mode) --- /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2009/08/15 08:35:04 1.8 +++ /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2010/05/05 16:00:44 1.9 @@ -24,7 +24,7 @@ "The typeout frame properties (passed to `make-frame').") (defun slime-typeout-buffer () - (with-current-buffer (get-buffer-create "*SLIME Typeout*") + (with-current-buffer (get-buffer-create (slime-buffer-name :typeout)) (setq buffer-read-only t) (current-buffer))) --- /project/slime/cvsroot/slime/contrib/slime-xref-browser.el 2009/02/27 17:37:14 1.3 +++ /project/slime/cvsroot/slime/contrib/slime-xref-browser.el 2010/05/05 16:00:44 1.4 @@ -26,7 +26,7 @@ "Read the name of a class and show its subclasses." (interactive (list (slime-read-symbol-name "Class Name: "))) (slime-call-with-browser-setup - "*slime class browser*" (slime-current-package) "Class Browser" + (slime-buffer-name :browser) (slime-current-package) "Class Browser" (lambda () (widget-create 'tree-widget :tag name :expander 'slime-expand-class-node @@ -96,7 +96,7 @@ '(":callers" ":callees" ":calls")) nil t ":")))) (slime-call-with-browser-setup - "*slime xref browser*" (slime-current-package) "Xref Browser" + (slime-buffer-name :xref) (slime-current-package) "Xref Browser" (lambda () (widget-create 'tree-widget :tag name :xref-type type :xref-dspec name :expander 'slime-expand-xrefs :has-echildren t)))) From sboukarev at common-lisp.net Wed May 5 18:10:18 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 May 2010 14:10:18 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv11895 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-dispatch-event): Fix typo in the previous commit. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/05 16:00:42 1.2084 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/05 18:10:17 1.2085 @@ -1,5 +1,9 @@ 2010-05-05 Stas Boukarev + * slime.el (slime-dispatch-event): Fix typo in the previous commit. + +2010-05-05 Stas Boukarev + * Make buffer names more consistent. Patch by Leo Liu. --- /project/slime/cvsroot/slime/slime.el 2010/05/05 16:00:43 1.1313 +++ /project/slime/cvsroot/slime/slime.el 2010/05/05 18:10:17 1.1314 @@ -2307,7 +2307,7 @@ ((:ping thread tag) (slime-send `(:emacs-pong ,thread ,tag))) ((:reader-error packet condition) - (slime-with-popup-buffer (slime-buffer-name :error) + (slime-with-popup-buffer ((slime-buffer-name :error)) (princ (format "Invalid protocol message:\n%s\n\n%S" condition packet)) (goto-char (point-min))) From heller at common-lisp.net Thu May 6 06:18:32 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 06 May 2010 02:18:32 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv4328 Modified Files: ChangeLog swank-clisp.lisp swank-cmucl.lisp swank-scl.lisp Log Message: Remove some non-standard file variables. * swank-cmucl.lisp, swank-scl.lisp: Remove pbook vars. * swank-clisp.lisp: Remove indentation settings. Slime does it automatically. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/05 18:10:17 1.2085 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/06 06:18:32 1.2086 @@ -1,3 +1,11 @@ +2010-05-06 Helmut Eller + + Remove some non-standard file variables. + + * swank-cmucl.lisp, swank-scl.lisp: Remove pbook vars. + * swank-clisp.lisp: Remove indentation settings. Slime does it + automatically. + 2010-05-05 Stas Boukarev * slime.el (slime-dispatch-event): Fix typo in the previous commit. --- /project/slime/cvsroot/slime/swank-clisp.lisp 2010/03/02 12:38:06 1.93 +++ /project/slime/cvsroot/slime/swank-clisp.lisp 2010/05/06 06:18:32 1.94 @@ -848,8 +848,3 @@ ,@(if restart-function `((:init-function ,restart-function)))))) (apply #'ext:saveinitmem args))) - -;;; Local Variables: -;;; eval: (put 'compile-file-frobbing-notes 'lisp-indent-function 1) -;;; eval: (put 'dynamic-flet 'common-lisp-indent-function 1) -;;; End: --- /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/05/05 05:25:29 1.222 +++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/05/06 06:18:32 1.223 @@ -2486,10 +2486,3 @@ (call-program args :output t) (delete-file infile) outfile))) - -;; (save-image "/tmp/x.core") - -;; Local Variables: -;; pbook-heading-regexp: "^;;;\\(;+\\)" -;; pbook-commentary-regexp: "^;;;\\($\\|[^;]\\)" -;; End: --- /project/slime/cvsroot/slime/swank-scl.lisp 2010/03/02 12:38:07 1.36 +++ /project/slime/cvsroot/slime/swank-scl.lisp 2010/05/06 06:18:32 1.37 @@ -2028,8 +2028,3 @@ ;;; Not implemented in SCL. (defimplementation make-weak-key-hash-table (&rest args) (apply #'make-hash-table :weak-p t args)) - -;; Local Variables: -;; pbook-heading-regexp: "^;;;\\(;+\\)" -;; pbook-commentary-regexp: "^;;;\\($\\|[^;]\\)" -;; End: From sboukarev at common-lisp.net Fri May 7 08:27:20 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 07 May 2010 04:27:20 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv21072 Modified Files: ChangeLog slime-presentations.el slime-repl.el Log Message: * slime-presentations.el (slime-presentation-write): Reuse functions from slime-repl. This fixes spurious point jumps. * slime-repl.el (slime-repl-show-maximum-output): Don't search for a window of the buffer if the current window already displays it. (slime-with-output-end-mark): Removed, unused. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/05 13:55:18 1.375 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/07 08:27:20 1.376 @@ -1,3 +1,13 @@ +2010-05-07 Stas Boukarev + + * slime-presentations.el (slime-presentation-write): Reuse + functions from slime-repl. This fixes spurious point jumps. + + * slime-repl.el (slime-repl-show-maximum-output): + Don't search for a window of the buffer if the current window + already displays it. + (slime-with-output-end-mark): Removed, unused. + 2010-05-05 Stas Boukarev * slime-tramp.el (slime-tramp-to-lisp-filename): Check if slime is --- /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/05 16:00:44 1.32 +++ /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/07 08:27:20 1.33 @@ -752,42 +752,23 @@ t) (t nil))) +(defun slime-presentation-write-result (string) + (with-current-buffer (slime-output-buffer) + (let ((marker (slime-output-target-marker :repl-result))) + (goto-char marker) + (slime-propertize-region `(face slime-repl-result-face + rear-nonsticky (face)) + (insert string)) + ;; Move the input-start marker after the REPL result. + (set-marker marker (point))))) + (defun slime-presentation-write (string &optional target) (case target ((nil) ; Regular process output - (with-current-buffer (slime-output-buffer) - (slime-with-output-end-mark - (slime-propertize-region '(face slime-repl-output-face - rear-nonsticky (face)) - (insert string)) - (set-marker slime-output-end (point)) - (when (and (= (point) slime-repl-prompt-start-mark) - (not (bolp))) - (insert "\n") - (set-marker slime-output-end (1- (point)))) - (if (< slime-repl-input-start-mark (point)) - (set-marker slime-repl-input-start-mark - (point)))))) + (slime-repl-emit string)) (:repl-result - (with-current-buffer (slime-output-buffer) - (let ((marker (slime-output-target-marker target))) - (goto-char marker) - (slime-propertize-region `(face slime-repl-result-face - rear-nonsticky (face)) - (insert string)) - ;; Move the input-start marker after the REPL result. - (set-marker marker (point))))) - (t - (let* ((marker (slime-output-target-marker target)) - (buffer (and marker (marker-buffer marker)))) - (when buffer - (with-current-buffer buffer - (save-excursion - ;; Insert STRING at MARKER, then move MARKER behind - ;; the insertion. - (goto-char marker) - (insert-before-markers string) - (set-marker marker (point))))))))) + (slime-presentation-write-result string)) + (t (slime-emit-to-target string target)))) (defun slime-presentation-current-input (&optional until-point-p) "Return the current input as string. --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/05 16:00:44 1.42 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/07 08:27:20 1.43 @@ -160,27 +160,6 @@ (display-buffer (current-buffer) t)) (slime-repl-show-maximum-output))) -(defmacro slime-with-output-end-mark (&rest body) - "Execute BODY at `slime-output-end'. - -If point is initially at `slime-output-end' and the buffer is visible -update window-point afterwards. If point is initially not at -`slime-output-end, execute body inside a `save-excursion' block." - `(let ((body.. (lambda () , at body)) - (updatep.. (and (eobp) (pos-visible-in-window-p)))) - (cond ((= (point) slime-output-end) - (let ((start.. (point))) - (funcall body..) - (set-marker slime-output-end (point)) - (when (= start.. slime-repl-input-start-mark) - (set-marker slime-repl-input-start-mark (point))))) - (t - (save-excursion - (goto-char slime-output-end) - (funcall body..)))) - (when updatep.. - (slime-repl-show-maximum-output)))) - (defun slime-output-filter (process string) (with-current-buffer (process-buffer process) (when (and (plusp (length string)) @@ -243,7 +222,7 @@ (case target ((nil) (slime-repl-emit string)) (:repl-result (slime-repl-emit-result string)) - (t (slime-emit-string string target)))) + (t (slime-emit-to-target string target)))) (defvar slime-repl-popup-on-output nil "Display the output buffer when some output is written. @@ -308,7 +287,7 @@ (t (gethash target slime-output-target-to-marker)))) -(defun slime-emit-string (string target) +(defun slime-emit-to-target (string target) "Insert STRING at target TARGET. See `slime-output-target-to-marker'." (let* ((marker (slime-output-target-marker target)) @@ -580,7 +559,9 @@ (defun slime-repl-show-maximum-output () "Put the end of the buffer at the bottom of the window." (when (eobp) - (let ((win (get-buffer-window (current-buffer)))) + (let ((win (if (eq (window-buffer) (current-buffer)) + (selected-window) + (get-buffer-window (current-buffer) t)))) (when win (with-selected-window win (set-window-point win (point-max)) From sboukarev at common-lisp.net Sat May 8 04:57:23 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 08 May 2010 00:57:23 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv5651 Modified Files: ChangeLog slime-presentations.el Log Message: * slime-presentations.el (slime-presentation-write-result): Do slime-repl-show-maximum-output at the end. This really solves jumping. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/07 08:27:20 1.376 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/08 04:57:23 1.377 @@ -1,3 +1,9 @@ +2010-05-08 Stas Boukarev + + * slime-presentations.el (slime-presentation-write-result): Do + slime-repl-show-maximum-output at the end. This really solves + jumping. + 2010-05-07 Stas Boukarev * slime-presentations.el (slime-presentation-write): Reuse --- /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/07 08:27:20 1.33 +++ /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/08 04:57:23 1.34 @@ -760,7 +760,8 @@ rear-nonsticky (face)) (insert string)) ;; Move the input-start marker after the REPL result. - (set-marker marker (point))))) + (set-marker marker (point))) + (slime-repl-show-maximum-output))) (defun slime-presentation-write (string &optional target) (case target From mevenson at common-lisp.net Mon May 10 05:27:55 2010 From: mevenson at common-lisp.net (CVS User mevenson) Date: Mon, 10 May 2010 01:27:55 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv28905 Modified Files: ChangeLog swank-loader.lisp Log Message: * swank-loader.lisp (*architecture-features*): Add Java platforms as features for ABCL. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/06 06:18:32 1.2086 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/10 05:27:55 1.2087 @@ -1,3 +1,8 @@ +2010-05-10 Mark Evenson + + * swank-loader.lisp (*architecture-features*): Add Java platforms + as features for ABCL. + 2010-05-06 Helmut Eller Remove some non-standard file variables. --- /project/slime/cvsroot/slime/swank-loader.lisp 2010/03/29 15:57:35 1.104 +++ /project/slime/cvsroot/slime/swank-loader.lisp 2010/05/10 05:27:55 1.105 @@ -57,7 +57,8 @@ (defparameter *architecture-features* '(:powerpc :ppc :x86 :x86-64 :amd64 :i686 :i586 :i486 :pc386 :iapx386 :sparc64 :sparc :hppa64 :hppa - :pentium3 :pentium4)) + :pentium3 :pentium4 + :java-1.4 :java-1.5 :java-1.6 :java-1.7)) (defun q (s) (read-from-string s)) From mevenson at common-lisp.net Mon May 10 05:29:43 2010 From: mevenson at common-lisp.net (CVS User mevenson) Date: Mon, 10 May 2010 01:29:43 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv29435 Modified Files: ChangeLog Log Message: Correct email address in ChangeLog. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/10 05:27:55 1.2087 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/10 05:29:43 1.2088 @@ -1,4 +1,4 @@ -2010-05-10 Mark Evenson +2010-05-10 Mark Evenson * swank-loader.lisp (*architecture-features*): Add Java platforms as features for ABCL. From sboukarev at common-lisp.net Tue May 11 12:48:17 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Tue, 11 May 2010 08:48:17 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv28556 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-inspect-definition): New function, inspects definition at point. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/10 05:29:43 1.2088 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/11 12:48:16 1.2089 @@ -1,3 +1,8 @@ +2010-05-11 Stas Boukarev + + * slime.el (slime-inspect-definition): New function, + inspects definition at point. + 2010-05-10 Mark Evenson * swank-loader.lisp (*architecture-features*): Add Java platforms --- /project/slime/cvsroot/slime/slime.el 2010/05/05 18:10:17 1.1314 +++ /project/slime/cvsroot/slime/slime.el 2010/05/11 12:48:17 1.1315 @@ -6529,6 +6529,31 @@ (slime-sexp-at-point)))) (slime-eval-async `(swank:init-inspector ,string) 'slime-open-inspector)) +(defun slime-inspect-definition () + "Inspect definition at point" + (interactive) + (let* ((toplevel (slime-parse-toplevel-form)) + (form + (if (symbolp toplevel) + (error "Not in a definition") + (destructure-case toplevel + (((:defun :defgeneric) symbol) + (format "#'%s" symbol)) + (((:defmacro :define-modify-macro) symbol) + (format "(macro-function '%s)" symbol)) + ((:define-compiler-macro symbol) + (format "(compiler-macro-function '%s)" symbol)) + ((:defmethod symbol &rest args) + (declare (ignore args)) + (format "#'%s" symbol)) + (((:defparameter :defvar :defconstant) symbol) + (format "'%s" symbol)) + ((:defclass symbol) + (format "(find-class '%s)" symbol)) + (t + (error "Not in a definition")))))) + (slime-eval-async `(swank:init-inspector ,form) 'slime-open-inspector))) + (define-derived-mode slime-inspector-mode fundamental-mode "Slime-Inspector" " From sboukarev at common-lisp.net Tue May 11 13:11:13 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Tue, 11 May 2010 09:11:13 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv18499 Modified Files: ChangeLog slime.el Log Message: (slime-parse-context): Add :defstruct and :defpackage. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/11 12:48:16 1.2089 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/11 13:11:13 1.2090 @@ -2,6 +2,7 @@ * slime.el (slime-inspect-definition): New function, inspects definition at point. + (slime-parse-context): Add :defstruct and :defpackage. 2010-05-10 Mark Evenson --- /project/slime/cvsroot/slime/slime.el 2010/05/11 12:48:17 1.1315 +++ /project/slime/cvsroot/slime/slime.el 2010/05/11 13:11:13 1.1316 @@ -4310,7 +4310,8 @@ (defparameter n.ame ...) -> (:defparameter name) (defconstant n.ame ...) -> (:defconstant name) (defclass n.ame ...) -> (:defclass name) - + (defstruct n.ame ...) -> (:defstruct name) + (defpackage n.ame ...) -> (:defpackage name) For other contexts we return the symbol at point." (let ((name (slime-symbol-at-point))) (if name @@ -4365,6 +4366,11 @@ ((slime-in-expression-p '(defparameter *)) `(:defparameter ,name)) ((slime-in-expression-p '(defconstant *)) `(:defconstant ,name)) ((slime-in-expression-p '(defclass *)) `(:defclass ,name)) + ((slime-in-expression-p '(defpackage *)) `(:defpackage ,name)) + ((slime-in-expression-p '(defstruct *)) + `(:defstruct ,(if (consp name) + (car name) + name))) (t name)))) @@ -6548,8 +6554,11 @@ (format "#'%s" symbol)) (((:defparameter :defvar :defconstant) symbol) (format "'%s" symbol)) - ((:defclass symbol) + (((:defclass :defstruct) symbol) (format "(find-class '%s)" symbol)) + ((:defpackage symbol) + (format "(or (find-package '%s) (error \"Package %s not found\"))" + symbol symbol)) (t (error "Not in a definition")))))) (slime-eval-async `(swank:init-inspector ,form) 'slime-open-inspector))) From trittweiler at common-lisp.net Thu May 13 04:59:11 2010 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Thu, 13 May 2010 00:59:11 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv16827 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (*after-init-hook*, simple-break) (coerce-to-condition, use-threads-p, current-thread-id): Moved around in swank.lisp. (with-temp-package): Deleted; not used anywhere. (ensure-list): Use in SWANK-REQUIRE. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/11 13:11:13 1.2090 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/13 04:59:11 1.2091 @@ -1,3 +1,11 @@ +2010-05-13 Tobias C. Rittweiler + + * swank.lisp (*after-init-hook*, simple-break) + (coerce-to-condition, use-threads-p, current-thread-id): Moved + around in swank.lisp. + (with-temp-package): Deleted; not used anywhere. + (ensure-list): Use in SWANK-REQUIRE. + 2010-05-11 Stas Boukarev * slime.el (slime-inspect-definition): New function, --- /project/slime/cvsroot/slime/swank.lisp 2010/04/24 04:44:38 1.713 +++ /project/slime/cvsroot/slime/swank.lisp 2010/05/13 04:59:11 1.714 @@ -415,6 +415,8 @@ (unless *log-output* (setq *log-output* (real-output-stream *error-output*)))) +(add-hook *after-init-hook* 'init-log-output) + (defun real-input-stream (stream) (typecase stream (synonym-stream @@ -559,15 +561,6 @@ (when *interrupt-queued-handler* (funcall *interrupt-queued-handler*))))))) -(defslimefun simple-break (&optional (datum "Interrupt from Emacs") &rest args) - (with-simple-restart (continue "Continue from break.") - (invoke-slime-debugger (coerce-to-condition datum args)))) - -(defun coerce-to-condition (datum args) - (etypecase datum - (string (make-condition 'simple-error :format-control datum - :format-arguments args)) - (symbol (apply #'make-condition datum args)))) (defmacro with-io-redirection ((connection) &body body) "Execute BODY I/O redirection to CONNECTION. " @@ -607,13 +600,6 @@ `(,getter ,',var)))) , at body)))) -(defmacro with-temp-package (var &body body) - "Execute BODY with VAR bound to a temporary package. -The package is deleted before returning." - `(let ((,var (make-package (gensym "TEMP-PACKAGE-")))) - (unwind-protect (progn , at body) - (delete-package ,var)))) - (defmacro do-symbols* ((var &optional (package '*package*) result-form) &body body) "Just like do-symbols, but makes sure a symbol is visited only once." (let ((seen-ht (gensym "SEEN-HT"))) @@ -623,12 +609,6 @@ (setf (gethash ,var ,seen-ht) t) (tagbody , at body)))))) -(defun use-threads-p () - (eq (connection.communication-style *emacs-connection*) :spawn)) - -(defun current-thread-id () - (thread-id (current-thread))) - (defmacro define-special (name doc) "Define a special variable NAME with doc string DOC. This is like defvar, but NAME will not be initialized." @@ -637,9 +617,17 @@ (setf (documentation ',name 'variable) ,doc))) -;;;;; Logging +;;;;; Misc -(add-hook *after-init-hook* 'init-log-output) +(defun use-threads-p () + (eq (connection.communication-style *emacs-connection*) :spawn)) + +(defun current-thread-id () + (thread-id (current-thread))) + +(declaim (inline ensure-list)) +(defun ensure-list (thing) + (if (listp thing) thing (list thing))) ;;;;; Symbols @@ -2706,6 +2694,16 @@ (defslimefun sldb-continue () (continue)) +(defun coerce-to-condition (datum args) + (etypecase datum + (string (make-condition 'simple-error :format-control datum + :format-arguments args)) + (symbol (apply #'make-condition datum args)))) + +(defslimefun simple-break (&optional (datum "Interrupt from Emacs") &rest args) + (with-simple-restart (continue "Continue from break.") + (invoke-slime-debugger (coerce-to-condition datum args)))) + (defun coerce-restart (restart-designator) (when (or (typep restart-designator 'restart) (typep restart-designator '(and symbol (not null)))) @@ -2924,7 +2922,7 @@ (defslimefun swank-require (modules &optional filename) "Load the module MODULE." - (dolist (module (if (listp modules) modules (list modules))) + (dolist (module (ensure-list modules)) (unless (member (string module) *modules* :test #'string=) (require module (if filename (filename-to-pathname filename) From trittweiler at common-lisp.net Thu May 13 04:59:12 2010 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Thu, 13 May 2010 00:59:12 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv16827/contrib Modified Files: swank-arglists.lisp Log Message: * swank.lisp (*after-init-hook*, simple-break) (coerce-to-condition, use-threads-p, current-thread-id): Moved around in swank.lisp. (with-temp-package): Deleted; not used anywhere. (ensure-list): Use in SWANK-REQUIRE. --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2010/04/05 14:48:55 1.65 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2010/05/13 04:59:11 1.66 @@ -30,10 +30,6 @@ (and (zerop i) (null list))))) (sequence (= (length seq) n)))) -(declaim (inline ensure-list)) -(defun ensure-list (thing) - (if (listp thing) thing (list thing))) - (declaim (inline memq)) (defun memq (item list) (member item list :test #'eq)) From sboukarev at common-lisp.net Thu May 13 12:36:02 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Thu, 13 May 2010 08:36:02 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv7521/contrib Modified Files: ChangeLog slime-asdf.el Log Message: * slime-asdf.el (slime-asdf-collect-notes): New variable. Collect and display notes produced by the compiler. Defaulted to T. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/08 04:57:23 1.377 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/13 12:36:00 1.378 @@ -1,3 +1,8 @@ +2010-05-13 Stas Boukarev + + * slime-asdf.el (slime-asdf-collect-notes): New variable. + Collect and display notes produced by the compiler. Defaulted to T. + 2010-05-08 Stas Boukarev * slime-presentations.el (slime-presentation-write-result): Do --- /project/slime/cvsroot/slime/contrib/slime-asdf.el 2010/03/13 03:08:04 1.29 +++ /project/slime/cvsroot/slime/contrib/slime-asdf.el 2010/05/13 12:36:00 1.30 @@ -72,6 +72,20 @@ (defun slime-who-depends-on-rpc (system) (slime-eval `(swank:who-depends-on ,system))) +(defcustom slime-asdf-collect-notes t + "Collect and display notes produced by the compiler. + +See also `slime-highlight-compiler-notes' and `slime-compilation-finished-hook'.") + +(defun slime-asdf-operation-finished-function (system) + (if slime-asdf-collect-notes + #'slime-compilation-finished + (lexical-let ((system system)) + (lambda (result) + (let (slime-highlight-compiler-notes + slime-compilation-finished-hook) + (slime-compilation-finished result)))))) + (defun slime-oos (system operation &rest keyword-args) "Operate On System." (slime-save-some-lisp-buffers) @@ -81,7 +95,7 @@ system) (slime-repl-shortcut-eval-async `(swank:operate-on-system-for-emacs ,system ',operation , at keyword-args) - #'slime-compilation-finished)) + (slime-asdf-operation-finished-function system))) ;;; Interactive functions @@ -214,7 +228,7 @@ (message "Performing ASDF LOAD-OP on system %S" system) (slime-repl-shortcut-eval-async `(swank:reload-system ,system) - #'slime-compilation-finished)) + (slime-asdf-operation-finished-function system))) (defun slime-who-depends-on (system-name) (interactive (list (slime-read-system-name))) From trittweiler at common-lisp.net Thu May 13 15:31:06 2010 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Thu, 13 May 2010 11:31:06 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv26251 Modified Files: ChangeLog slime.el Log Message: * slime.el (define-slime-contrib): New macro. * slime-autodoc.el, slime-c-p-c.el, slime-compiler-notes-tree.el, slime-enclosing-context.el, slime-fancy.el, slime-fuzzy.el, slime-hyperdoc.el, slime-mdot-fu.el, slime-mrepl.el, slime-parse.el, slime-presentations.el, slime-repl.el, slime-snapshot.el, slime-tramp.el, slime-xref-browser.el: Use newly added `define-slime-contrib' macro to specify slime and swank dependencies, and to specify what should happen on contrib load/unload. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/13 04:59:11 1.2091 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/13 15:31:06 1.2092 @@ -1,5 +1,9 @@ 2010-05-13 Tobias C. Rittweiler + * slime.el (define-slime-contrib): New macro. + +2010-05-13 Tobias C. Rittweiler + * swank.lisp (*after-init-hook*, simple-break) (coerce-to-condition, use-threads-p, current-thread-id): Moved around in swank.lisp. --- /project/slime/cvsroot/slime/slime.el 2010/05/11 13:11:13 1.1316 +++ /project/slime/cvsroot/slime/slime.el 2010/05/13 15:31:06 1.1317 @@ -7074,7 +7074,6 @@ (defvar slime-required-modules '()) (defun slime-require (module) - (assert (keywordp module)) (pushnew module slime-required-modules) (when (slime-connected-p) (slime-load-contribs))) @@ -7091,6 +7090,38 @@ (setf (slime-lisp-modules) (slime-eval `(swank:swank-require ',needed)))))) +(defmacro define-slime-contrib (name docstring &rest clauses) + (let ((slime-deps '()) + (swank-deps '()) + (load-forms '()) + (unload-forms '()) + (gnu-only-p nil)) + (dolist (clause clauses) + (destructure-case clause + ((:slime-dependencies . deps) (setq slime-deps deps)) + ((:swank-dependencies . deps) (setq swank-deps deps)) + ((:on-load . forms) (setq load-forms forms)) + ((:on-unload . forms) (setq unload-forms forms)) + ((:gnu-emacs-only flag) (setq gnu-only-p flag)) + ((:authors . authors)) + ((:license license)))) + `(progn + ,(when gnu-only-p + `(eval-and-compile + (assert (not (featurep 'xemacs)) () + ,(concat (symbol-name name) + " does not work with XEmacs.")))) + ,@(mapcar #'(lambda (d) `(require ',d)) slime-deps) + (defun ,(intern (concat (symbol-name name) "-init")) () + ,@(mapcar #'(lambda (d) `(slime-require ',d)) swank-deps) + , at load-forms) + (defun ,(intern (concat (symbol-name name) "-unload")) () + , at unload-forms) + (provide ',name)))) + +(put 'define-slime-contrib 'lisp-indent-function 1) +(put 'slime-indulge-pretty-colors 'define-slime-contrib t) + ;;;;; Pull-down menu From trittweiler at common-lisp.net Fri May 14 03:20:04 2010 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Thu, 13 May 2010 23:20:04 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv20552/contrib Modified Files: ChangeLog swank-fancy-inspector.lisp Log Message: Perform PATHNAME on file-streams safely. * swank-fancy-inspector.lisp (make-visit-file-thunk): Deleted. (make-pathname-ispec): New helper. (make-file-stream-ispec): New helper. (emacs-inspect file-stream): Use them. (emacs-inspect stream-error): Ditto. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/13 15:31:07 1.379 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/14 03:20:04 1.380 @@ -1,5 +1,15 @@ 2010-05-13 Tobias C. Rittweiler + Perform PATHNAME on file-streams safely. + + * swank-fancy-inspector.lisp (make-visit-file-thunk): Deleted. + (make-pathname-ispec): New helper. + (make-file-stream-ispec): New helper. + (emacs-inspect file-stream): Use them. + (emacs-inspect stream-error): Ditto. + +2010-05-13 Tobias C. Rittweiler + * slime-autodoc.el, slime-c-p-c.el, slime-compiler-notes-tree.el, slime-enclosing-context.el, slime-fancy.el, slime-fuzzy.el, slime-hyperdoc.el, slime-mdot-fu.el, slime-mrepl.el, --- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2010/04/19 00:42:29 1.26 +++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2010/05/14 03:20:04 1.27 @@ -819,42 +819,36 @@ (label-value-line "Digits" (float-digits f)) (label-value-line "Precision" (float-precision f))))))) -(defun make-visit-file-thunk (stream) - (let ((pathname (pathname stream)) - (position (file-position stream))) - (lambda () - (ed-in-emacs `(,pathname :charpos ,position))))) +(defun make-pathname-ispec (pathname position) + `("Pathname: " + (:value ,pathname) + (:newline) " " + ,@(when position + `((:action "[visit file and show current position]" + ,(lambda () (ed-in-emacs `(,pathname :charpos ,position))) + :refreshp nil) + (:newline))))) + +(defun make-file-stream-ispec (stream) + ;; SBCL's socket stream are file-stream but are not associated to + ;; any pathname. + (let ((pathname (ignore-errors (pathname stream)))) + (when pathname + (make-pathname-ispec pathname (and (open-stream-p stream) + (file-position stream)))))) (defmethod emacs-inspect ((stream file-stream)) (multiple-value-bind (content) (call-next-method) - (append - `("Pathname: " - (:value ,(pathname stream)) - (:newline) " " - ,@(when (open-stream-p stream) - `((:action "[visit file and show current position]" - ,(make-visit-file-thunk stream) - :refreshp nil) - (:newline)))) - content))) + (append (make-file-stream-ispec stream) content))) (defmethod emacs-inspect ((condition stream-error)) (multiple-value-bind (content) (call-next-method) (let ((stream (stream-error-stream condition))) - (if (typep stream 'file-stream) - (append - `("Pathname: " - (:value ,(pathname stream)) - (:newline) " " - ,@(when (open-stream-p stream) - `((:action "[visit file and show current position]" - ,(make-visit-file-thunk stream) - :refreshp nil) - (:newline)))) - content) - content)))) + (append (when (typep stream 'file-stream) + (make-file-stream-ispec stream)) + content)))) (defun common-seperated-spec (list &optional (callback (lambda (v) `(:value ,v)))) From trittweiler at common-lisp.net Fri May 14 14:34:22 2010 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Fri, 14 May 2010 10:34:22 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv24788/contrib Modified Files: ChangeLog slime-highlight-edits.el slime-hyperdoc.el slime-mrepl.el slime-snapshot.el Log Message: * slime-highlight-edits.el, slime-hyperdoc.el, slime-mrepl.el, slime-snapshot.el: Fix typo. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/14 03:20:04 1.380 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/14 14:34:22 1.381 @@ -1,3 +1,8 @@ +2010-05-14 Tobias C. Rittweiler + + * slime-highlight-edits.el, slime-hyperdoc.el, slime-mrepl.el, + slime-snapshot.el: Fix typo. + 2010-05-13 Tobias C. Rittweiler Perform PATHNAME on file-streams safely. --- /project/slime/cvsroot/slime/contrib/slime-highlight-edits.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-highlight-edits.el 2010/05/14 14:34:22 1.6 @@ -1,7 +1,7 @@ (define-slime-contrib slime-highlight-edits "Highlight edited, i.e. not yet compiled, code." - (:author "William Bland ") + (:authors "William Bland ") (:license "GPL") (:on-load (add-hook 'slime-mode-hook 'slime-activate-highlight-edits)) (:on-unload (remove-hook 'slime-mode-hook 'slime-activate-highlight-edits))) --- /project/slime/cvsroot/slime/contrib/slime-hyperdoc.el 2010/05/13 15:31:07 1.2 +++ /project/slime/cvsroot/slime/contrib/slime-hyperdoc.el 2010/05/14 14:34:22 1.3 @@ -3,7 +3,7 @@ (define-slime-contrib slime-hyperdoc "Extensible C-c C-d h." - (:author "Tobias C Rittweiler ") + (:authors "Tobias C Rittweiler ") (:license "GPL") (:slime-dependencies url-http browse-url) (:swank-dependencies swank-hyperdoc) --- /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2010/05/13 15:31:07 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2010/05/14 14:34:22 1.5 @@ -6,7 +6,7 @@ (define-slime-contrib slime-mrepl "Multiple REPLs." - (:author "Helmut Eller ") + (:authors "Helmut Eller ") (:license "GPL") (:slime-dependencies slime-repl)) --- /project/slime/cvsroot/slime/contrib/slime-snapshot.el 2010/05/13 15:31:07 1.3 +++ /project/slime/cvsroot/slime/contrib/slime-snapshot.el 2010/05/14 14:34:22 1.4 @@ -1,7 +1,7 @@ (define-slime-contrib slime-snapshot "Save&restore memory images without disconnecting" - (:author "Helmut Eller ") + (:authors "Helmut Eller ") (:license "Unknown") (:swank-dependencies swank-snapshot)) From sboukarev at common-lisp.net Sun May 16 04:15:18 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sun, 16 May 2010 00:15:18 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv2986 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-close-popup-window): Don't kill slime-popup-restore-data local variable in another buffer. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/13 15:31:06 1.2092 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/16 04:15:18 1.2093 @@ -1,3 +1,8 @@ +2010-05-16 Stas Boukarev + + * slime.el (slime-close-popup-window): Don't kill + slime-popup-restore-data local variable in another buffer. + 2010-05-13 Tobias C. Rittweiler * slime.el (define-slime-contrib): New macro. --- /project/slime/cvsroot/slime/slime.el 2010/05/13 15:31:06 1.1317 +++ /project/slime/cvsroot/slime/slime.el 2010/05/16 04:15:18 1.1318 @@ -944,6 +944,7 @@ (when slime-popup-restore-data (destructuring-bind (popup-window selected-window old-buffer) slime-popup-restore-data + (kill-local-variable 'slime-popup-restore-data) (bury-buffer) (when (eq popup-window (selected-window)) (cond ((and (not old-buffer) (not (one-window-p))) @@ -951,8 +952,7 @@ ((and old-buffer (buffer-live-p old-buffer)) (set-window-buffer popup-window old-buffer)))) (when (window-live-p selected-window) - (select-window selected-window))) - (kill-local-variable 'slime-popup-restore-data))) + (select-window selected-window))))) (defmacro slime-save-local-variables (vars &rest body) (let ((vals (make-symbol "vals"))) From sboukarev at common-lisp.net Sun May 16 06:11:45 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sun, 16 May 2010 02:11:45 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv16627 Modified Files: ChangeLog swank-arglists.lisp Log Message: * swank-arglists.lisp (decode-arglist): Handle (x . y) macro arglists. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/14 14:34:22 1.381 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/16 06:11:44 1.382 @@ -1,3 +1,7 @@ +2010-05-16 Stas Boukarev + + * swank-arglists.lisp (decode-arglist): Handle (x . y) macro arglists. + 2010-05-14 Tobias C. Rittweiler * slime-highlight-edits.el, slime-hyperdoc.el, slime-mrepl.el, --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2010/05/13 04:59:11 1.66 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2010/05/16 06:11:45 1.67 @@ -519,8 +519,9 @@ for arg = (if (consp arglist) (pop arglist) (progn - (setf mode '&rest) - arglist)) + (prog1 arglist + (setf mode '&rest + arglist nil)))) do (cond ((eql mode '&unknown-junk) ;; don't leave this mode -- we don't know how the arglist @@ -567,7 +568,7 @@ (push arg (arglist.known-junk result))) (&any (push arg (arglist.any-args result)))))) - until (atom arglist) + until (null arglist) finally (nreversef (arglist.required-args result)) finally (nreversef (arglist.optional-args result)) finally (nreversef (arglist.keyword-args result)) From sboukarev at common-lisp.net Tue May 18 09:12:47 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Tue, 18 May 2010 05:12:47 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv18408 Modified Files: ChangeLog slime.el swank.lisp Log Message: * slime.el (sldb-insert-condition): Don't create a mouse tooltip for long error message, tooltip shows the same text and doesn't add any value. (slime-definition-at-point): factor out of `slime-inspect-definition'. (slime-disassemble-definition): New, similar to `slime-inspect-definition'. * swank.lisp (disassemble-form): rename from disassemble-symbol, do the same as before but evaluate the argument. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/16 04:15:18 1.2093 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/18 09:12:46 1.2094 @@ -1,3 +1,15 @@ +2010-05-18 Stas Boukarev + + * slime.el (sldb-insert-condition): Don't create a mouse tooltip + for long error message, tooltip shows the same text and doesn't + add any value. + (slime-definition-at-point): factor out of `slime-inspect-definition'. + (slime-disassemble-definition): New, similar to `slime-inspect-definition'. + + * swank.lisp (disassemble-form): rename from disassemble-symbol, + do the same as before but evaluate the argument. + + 2010-05-16 Stas Boukarev * slime.el (slime-close-popup-window): Don't kill --- /project/slime/cvsroot/slime/slime.el 2010/05/16 04:15:18 1.1318 +++ /project/slime/cvsroot/slime/slime.el 2010/05/18 09:12:47 1.1319 @@ -4440,7 +4440,7 @@ (defun slime-disassemble-symbol (symbol-name) "Display the disassembly for SYMBOL-NAME." (interactive (list (slime-read-symbol-name "Disassemble: "))) - (slime-eval-describe `(swank:disassemble-symbol ,symbol-name))) + (slime-eval-describe `(swank:disassemble-form ,(concat "'" symbol-name)))) (defun slime-undefine-function (symbol-name) "Unbind the function slot of SYMBOL-NAME." @@ -5563,9 +5563,6 @@ CONDITION should be a list (MESSAGE TYPE EXTRAS). EXTRAS is currently used for the stepper." (destructuring-bind (message type extras) condition - (when (> (length message) 70) - (add-text-properties 0 (length message) (list 'help-echo message) - message)) (slime-insert-propertized '(sldb-default-action sldb-inspect-condition) (in-sldb-face topline message) "\n" @@ -6535,33 +6532,45 @@ (slime-sexp-at-point)))) (slime-eval-async `(swank:init-inspector ,string) 'slime-open-inspector)) +(defun slime-definition-at-point (&optional only-functional) + "Return object corresponding to the definition at point." + (let ((toplevel (slime-parse-toplevel-form))) + (if (or (symbolp toplevel) + (and only-functional + (not (member (car toplevel) + '(:defun :defgeneric :defmethod + :defmacro :define-compiler-macro))))) + (error "Not in a definition") + (destructure-case toplevel + (((:defun :defgeneric) symbol) + (format "#'%s" symbol)) + (((:defmacro :define-modify-macro) symbol) + (format "(macro-function '%s)" symbol)) + ((:define-compiler-macro symbol) + (format "(compiler-macro-function '%s)" symbol)) + ((:defmethod symbol &rest args) + (declare (ignore args)) + (format "#'%s" symbol)) + (((:defparameter :defvar :defconstant) symbol) + (format "'%s" symbol)) + (((:defclass :defstruct) symbol) + (format "(find-class '%s)" symbol)) + ((:defpackage symbol) + (format "(or (find-package '%s) (error \"Package %s not found\"))" + symbol symbol)) + (t + (error "Not in a definition")))))) + (defun slime-inspect-definition () "Inspect definition at point" (interactive) - (let* ((toplevel (slime-parse-toplevel-form)) - (form - (if (symbolp toplevel) - (error "Not in a definition") - (destructure-case toplevel - (((:defun :defgeneric) symbol) - (format "#'%s" symbol)) - (((:defmacro :define-modify-macro) symbol) - (format "(macro-function '%s)" symbol)) - ((:define-compiler-macro symbol) - (format "(compiler-macro-function '%s)" symbol)) - ((:defmethod symbol &rest args) - (declare (ignore args)) - (format "#'%s" symbol)) - (((:defparameter :defvar :defconstant) symbol) - (format "'%s" symbol)) - (((:defclass :defstruct) symbol) - (format "(find-class '%s)" symbol)) - ((:defpackage symbol) - (format "(or (find-package '%s) (error \"Package %s not found\"))" - symbol symbol)) - (t - (error "Not in a definition")))))) - (slime-eval-async `(swank:init-inspector ,form) 'slime-open-inspector))) + (slime-inspect (slime-definition-at-point))) + +(defun slime-disassemble-definition () + "Disassemble definition at point" + (interactive) + (slime-eval-describe `(swank:disassemble-form + ,(slime-definition-at-point t)))) (define-derived-mode slime-inspector-mode fundamental-mode "Slime-Inspector" --- /project/slime/cvsroot/slime/swank.lisp 2010/05/13 04:59:11 1.714 +++ /project/slime/cvsroot/slime/swank.lisp 2010/05/18 09:12:47 1.715 @@ -2993,11 +2993,11 @@ (defslimefun swank-format-string-expand (string) (apply-macro-expander #'format-string-expand string)) -(defslimefun disassemble-symbol (name) +(defslimefun disassemble-form (form) (with-buffer-syntax () (with-output-to-string (*standard-output*) (let ((*print-readably* nil)) - (disassemble (fdefinition (from-string name))))))) + (disassemble (eval (read-from-string form))))))) ;;;; Simple completion @@ -3948,4 +3948,4 @@ (defun init () (run-hook *after-init-hook*)) -;;; swank.lisp ends here \ No newline at end of file +;;; swank.lisp ends here From sboukarev at common-lisp.net Wed May 19 06:55:16 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 19 May 2010 02:55:16 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv4283 Modified Files: ChangeLog slime-repl.el Log Message: * slime-repl.el (slime-list-repl-short-cuts): Don't scroll to the bottom, don't error if a shortcut has no documentation. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/16 06:11:44 1.382 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/19 06:55:15 1.383 @@ -1,3 +1,8 @@ +2010-05-19 Stas Boukarev + + * slime-repl.el (slime-list-repl-short-cuts): Don't scroll to the + bottom, don't error if a shortcut has no documentation. + 2010-05-16 Stas Boukarev * swank-arglists.lisp (decode-arglist): Handle (x . y) macro arglists. --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/13 15:31:07 1.44 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/19 06:55:15 1.45 @@ -1253,24 +1253,25 @@ (slime-repl-add-to-input-history (prin1-to-string sexp))) (slime-eval-async sexp cont package)) - (defun slime-list-repl-short-cuts () (interactive) - (slime-with-popup-buffer ("*slime-repl-help*") + (slime-with-popup-buffer ((slime-buffer-name :repl-help)) (let ((table (sort* (copy-list slime-repl-shortcut-table) #'string< :key (lambda (x) (car (slime-repl-shortcut.names x)))))) - (dolist (shortcut table) - (let ((names (slime-repl-shortcut.names shortcut))) - (insert (pop names)) ;; first print the "full" name - (when names - ;; we also have aliases - (insert " (aka ") - (while (cdr names) - (insert (pop names) ", ")) - (insert (car names) ")")) - (insert "\n " (slime-repl-shortcut.one-liner shortcut) - "\n")))))) + (save-excursion + (dolist (shortcut table) + (let ((names (slime-repl-shortcut.names shortcut))) + (insert (pop names)) ;; first print the "full" name + (when names + ;; we also have aliases + (insert " (aka ") + (while (cdr names) + (insert (pop names) ", ")) + (insert (car names) ")")) + (when (slime-repl-shortcut.one-liner shortcut) + (insert "\n " (slime-repl-shortcut.one-liner shortcut))) + (insert "\n"))))))) (defun slime-save-some-lisp-buffers () (if slime-repl-only-save-lisp-buffers From alendvai at common-lisp.net Wed May 26 12:19:23 2010 From: alendvai at common-lisp.net (CVS User alendvai) Date: Wed, 26 May 2010 08:19:23 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv25651 Modified Files: swank-source-file-cache.lisp Log Message: read-file: properly deal with formats where (not (eql byte-lenght character-length)) --- /project/slime/cvsroot/slime/swank-source-file-cache.lisp 2009/05/09 19:26:00 1.10 +++ /project/slime/cvsroot/slime/swank-source-file-cache.lisp 2010/05/26 12:19:23 1.11 @@ -81,9 +81,9 @@ :external-format (or (guess-external-format filename) (find-external-format "latin-1") :default)) - (let ((string (make-string (file-length s)))) - (read-sequence string s) - string))) + (let* ((string (make-string (file-length s))) + (length (read-sequence string s))) + (subseq string 0 length)))) ;;;; Snippets From heller at common-lisp.net Thu May 27 14:47:39 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:47:39 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv5861 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-compile-file): Only send non-nil keyword args. (slime-hack-quotes): New function. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/18 09:12:46 1.2094 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:39 1.2095 @@ -1,3 +1,8 @@ +2010-05-26 Helmut Eller + + * slime.el (slime-compile-file): Only send non-nil keyword args. + (slime-hack-quotes): New function. + 2010-05-18 Stas Boukarev * slime.el (sldb-insert-condition): Don't create a mouse tooltip --- /project/slime/cvsroot/slime/slime.el 2010/05/18 09:12:47 1.1319 +++ /project/slime/cvsroot/slime/slime.el 2010/05/27 14:47:39 1.1320 @@ -2402,7 +2402,6 @@ (put 'slime-define-channel-method 'lisp-indent-function 3) (put 'slime-indulge-pretty-colors 'slime-define-channel-method t) - (defun slime-send-to-remote-channel (channel-id msg) (slime-dispatch-event `(:emacs-channel-send ,channel-id ,msg))) @@ -2586,12 +2585,17 @@ (run-hook-with-args 'slime-before-compile-functions (point-min) (point-max)) (let ((file (slime-to-lisp-filename (buffer-file-name))) (options (slime-simplify-plist `(, at slime-compile-file-options - :policy ',policy)))) + :policy ,policy)))) (slime-eval-async - `(swank:compile-file-for-emacs ,file ,(if load t nil) . ,options) + `(swank:compile-file-for-emacs ,file ,(if load t nil) + . ,(slime-hack-quotes options)) #'slime-compilation-finished) (message "Compiling %s..." file))) +(defun slime-hack-quotes (arglist) + ;; eval is the wrong primitive, we rally want funcall + (loop for arg in arglist collect `(quote ,arg))) + (defun slime-simplify-plist (plist) (loop for (key val) on plist by #'cddr append (cond ((null val) '()) @@ -2604,7 +2608,6 @@ debug settings (`C-u'). With negative prefix argument it is compiled for speed (`M--'). If a numeric argument is passed set debug or speed settings to it depending on its sign." - (interactive "P") (let ((slime-compilation-policy (slime-compute-policy raw-prefix-arg))) (if (use-region-p) From heller at common-lisp.net Thu May 27 14:47:48 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:47:48 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv5890 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-defun-if-undefined): Renamed from slime-DEFUN-if-undefined. No need to yell. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:39 1.2095 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:48 1.2096 @@ -1,5 +1,10 @@ 2010-05-26 Helmut Eller + * slime.el (slime-defun-if-undefined): Renamed from + slime-DEFUN-if-undefined. No need to yell. + +2010-05-26 Helmut Eller + * slime.el (slime-compile-file): Only send non-nil keyword args. (slime-hack-quotes): New function. --- /project/slime/cvsroot/slime/slime.el 2010/05/27 14:47:39 1.1320 +++ /project/slime/cvsroot/slime/slime.el 2010/05/27 14:47:48 1.1321 @@ -2593,7 +2593,7 @@ (message "Compiling %s..." file))) (defun slime-hack-quotes (arglist) - ;; eval is the wrong primitive, we rally want funcall + ;; eval is the wrong primitive, we really want funcall (loop for arg in arglist collect `(quote ,arg))) (defun slime-simplify-plist (plist) @@ -8826,24 +8826,23 @@ (assert (stringp result)) result))) -(defmacro slime-DEFUN-if-undefined (name &rest rest) +(defmacro slime-defun-if-undefined (name &rest rest) ;; We can't decide at compile time whether NAME is properly ;; bound. So we delay the decision to runtime to ensure some ;; definition `(unless (fboundp ',name) (defun ,name , at rest))) -(put 'slime-DEFUN-if-undefined 'lisp-indent-function 2) -(put 'slime-indulge-pretty-colors 'slime-DEFUN-if-undefined t) +(put 'slime-defun-if-undefined 'lisp-indent-function 2) +(put 'slime-indulge-pretty-colors 'slime-defun-if-undefined t) ;; FIXME: defining macros here is probably too late for the compiler -(defmacro slime-DEFMACRO-if-undefined (name &rest rest) +(defmacro slime-defmacro-if-undefined (name &rest rest) `(unless (fboundp ',name) (defmacro ,name , at rest))) -(put 'slime-DEFMACRO-if-undefined 'lisp-indent-function 2) -(put 'slime-indulge-pretty-colors 'slime-DEFMACRO-if-undefined t) - +(put 'slime-defmacro-if-undefined 'lisp-indent-function 2) +(put 'slime-indulge-pretty-colors 'slime-defmacro-if-undefined t) (defvar slime-accept-process-output-supports-floats (ignore-errors (accept-process-output nil 0.0) t)) @@ -8883,9 +8882,9 @@ (apply #'run-hooks hooks))) (if (featurep 'xemacs) - (slime-DEFUN-if-undefined line-number-at-pos (&optional pos) + (slime-defun-if-undefined line-number-at-pos (&optional pos) (line-number pos)) - (slime-DEFUN-if-undefined line-number-at-pos (&optional pos) + (slime-defun-if-undefined line-number-at-pos (&optional pos) (save-excursion (when pos (goto-char pos)) (1+ (count-lines 1 (point-at-bol)))))) @@ -8893,16 +8892,16 @@ (defun slime-local-variable-p (var &optional buffer) (local-variable-p var (or buffer (current-buffer)))) ; XEmacs -(slime-DEFUN-if-undefined region-active-p () +(slime-defun-if-undefined region-active-p () (and transient-mark-mode mark-active)) (if (featurep 'xemacs) - (slime-DEFUN-if-undefined use-region-p () + (slime-defun-if-undefined use-region-p () (region-active-p)) - (slime-DEFUN-if-undefined use-region-p () + (slime-defun-if-undefined use-region-p () (and transient-mark-mode mark-active))) -(slime-DEFUN-if-undefined next-single-char-property-change +(slime-defun-if-undefined next-single-char-property-change (position prop &optional object limit) (let ((limit (typecase limit (null nil) @@ -8922,7 +8921,7 @@ (get-char-property pos prop object))) return pos)))))) -(slime-DEFUN-if-undefined previous-single-char-property-change +(slime-defun-if-undefined previous-single-char-property-change (position prop &optional object limit) (let ((limit (typecase limit (null nil) @@ -8945,27 +8944,27 @@ (get-char-property (1- pos) prop object))) return pos)))))))) -(slime-DEFUN-if-undefined next-char-property-change (position &optional limit) +(slime-defun-if-undefined next-char-property-change (position &optional limit) (let ((tmp (next-overlay-change position))) (when tmp (setq tmp (min tmp limit))) (next-property-change position nil tmp))) -(slime-DEFUN-if-undefined previous-char-property-change +(slime-defun-if-undefined previous-char-property-change (position &optional limit) (let ((tmp (previous-overlay-change position))) (when tmp (setq tmp (max tmp limit))) (previous-property-change position nil tmp))) -(slime-DEFUN-if-undefined substring-no-properties (string &optional start end) +(slime-defun-if-undefined substring-no-properties (string &optional start end) (let* ((start (or start 0)) (end (or end (length string))) (string (substring string start end))) (set-text-properties 0 (- end start) nil string) string)) -(slime-DEFUN-if-undefined match-string-no-properties (num &optional string) +(slime-defun-if-undefined match-string-no-properties (num &optional string) (if (match-beginning num) (if string (substring-no-properties string (match-beginning num) @@ -8973,7 +8972,7 @@ (buffer-substring-no-properties (match-beginning num) (match-end num))))) -(slime-DEFUN-if-undefined set-window-text-height (window height) +(slime-defun-if-undefined set-window-text-height (window height) (let ((delta (- height (window-text-height window)))) (unless (zerop delta) (let ((window-min-height 1)) @@ -8983,10 +8982,10 @@ (enlarge-window delta)) (enlarge-window delta)))))) -(slime-DEFUN-if-undefined window-text-height (&optional window) +(slime-defun-if-undefined window-text-height (&optional window) (1- (window-height window))) -(slime-DEFUN-if-undefined subst-char-in-string (fromchar tochar string +(slime-defun-if-undefined subst-char-in-string (fromchar tochar string &optional inplace) "Replace FROMCHAR with TOCHAR in STRING each time it occurs. Unless optional argument INPLACE is non-nil, return a new string." @@ -8998,7 +8997,7 @@ (aset newstr i tochar))) newstr)) -(slime-DEFUN-if-undefined count-screen-lines +(slime-defun-if-undefined count-screen-lines (&optional beg end count-final-newline window) (unless beg (setq beg (point-min))) @@ -9018,19 +9017,19 @@ ;; XXX make this xemacs compatible (1+ (vertical-motion (buffer-size) window)))))) -(slime-DEFUN-if-undefined seconds-to-time (seconds) +(slime-defun-if-undefined seconds-to-time (seconds) "Convert SECONDS (a floating point number) to a time value." (list (floor seconds 65536) (floor (mod seconds 65536)) (floor (* (- seconds (ffloor seconds)) 1000000)))) -(slime-DEFUN-if-undefined time-less-p (t1 t2) +(slime-defun-if-undefined time-less-p (t1 t2) "Say whether time value T1 is less than time value T2." (or (< (car t1) (car t2)) (and (= (car t1) (car t2)) (< (nth 1 t1) (nth 1 t2))))) -(slime-DEFUN-if-undefined time-add (t1 t2) +(slime-defun-if-undefined time-add (t1 t2) "Add two time values. One should represent a time difference." (let ((high (car t1)) (low (if (consp (cdr t1)) (nth 1 t1) (cdr t1))) @@ -9057,17 +9056,17 @@ (list high low micro))) -(slime-DEFUN-if-undefined line-beginning-position (&optional n) +(slime-defun-if-undefined line-beginning-position (&optional n) (save-excursion (beginning-of-line n) (point))) -(slime-DEFUN-if-undefined line-end-position (&optional n) +(slime-defun-if-undefined line-end-position (&optional n) (save-excursion (end-of-line n) (point))) -(slime-DEFUN-if-undefined check-parens () +(slime-defun-if-undefined check-parens () "Verify that parentheses in the current buffer are balanced. If they are not, position point at the first syntax error found." (interactive) @@ -9100,7 +9099,7 @@ (error "After quote")) (t (error "Shouldn't happen: parsing state: %S" state)))))) -(slime-DEFUN-if-undefined read-directory-name (prompt +(slime-defun-if-undefined read-directory-name (prompt &optional dir default-dirname mustmatch initial) (unless dir @@ -9115,18 +9114,18 @@ (t (error "Not a directory: %s" file))))) -(slime-DEFUN-if-undefined check-coding-system (coding-system) +(slime-defun-if-undefined check-coding-system (coding-system) (or (eq coding-system 'binary) (error "No such coding system: %S" coding-system))) -(slime-DEFUN-if-undefined process-coding-system (process) +(slime-defun-if-undefined process-coding-system (process) '(binary . binary)) -(slime-DEFUN-if-undefined set-process-coding-system +(slime-defun-if-undefined set-process-coding-system (process &optional decoding encoding)) ;; For Emacs 21 -(slime-DEFUN-if-undefined display-warning +(slime-defun-if-undefined display-warning (type message &optional level buffer-name) (with-output-to-temp-buffer "*Warnings*" (princ (format "Warning (%s %s): %s" type level message)))) @@ -9143,7 +9142,7 @@ (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))) "The directory for writing temporary files.")) -(slime-DEFMACRO-if-undefined with-temp-message (message &rest body) +(slime-defmacro-if-undefined with-temp-message (message &rest body) (let ((current-message (make-symbol "current-message")) (temp-message (make-symbol "with-temp-message"))) `(let ((,temp-message ,message) @@ -9157,7 +9156,7 @@ (and ,temp-message ,current-message (message "%s" ,current-message)))))) -(slime-DEFMACRO-if-undefined with-selected-window (window &rest body) +(slime-defmacro-if-undefined with-selected-window (window &rest body) `(save-selected-window (select-window ,window) , at body)) From heller at common-lisp.net Thu May 27 14:47:56 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:47:56 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv5927 Modified Files: ChangeLog swank-cmucl.lisp Log Message: * swank-cmucl.lisp (parse-gdb-line-info): Try working dir first. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:48 1.2096 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:55 1.2097 @@ -1,5 +1,9 @@ 2010-05-26 Helmut Eller + * swank-cmucl.lisp (parse-gdb-line-info): Try working dir first. + +2010-05-26 Helmut Eller + * slime.el (slime-defun-if-undefined): Renamed from slime-DEFUN-if-undefined. No need to yell. --- /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/05/06 06:18:32 1.223 +++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2010/05/27 14:47:56 1.224 @@ -1941,13 +1941,12 @@ (cond ((equal w1 "Line") (let ((line (read-word))) (assert (equal (read-word) "of")) - (let ((file (read-word))) - (make-location (list :file - (unix-truename - (merge-pathnames - (read-from-string file) - (format nil "~a/lisp/" - (unix-truename "target:"))))) + (let* ((file (read-from-string (read-word))) + (pathname + (or (probe-file file) + (probe-file (format nil "target:lisp/~a" file)) + file))) + (make-location (list :file (unix-truename pathname)) (list :line (parse-integer line)))))) (t `(:error ,string)))))) From heller at common-lisp.net Thu May 27 14:48:03 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:48:03 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv5965 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (swank-error): Unrename from swank-protocol-error. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:47:55 1.2097 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:03 1.2098 @@ -1,5 +1,9 @@ 2010-05-26 Helmut Eller + * swank.lisp (swank-error): Unrename from swank-protocol-error. + +2010-05-26 Helmut Eller + * swank-cmucl.lisp (parse-gdb-line-info): Try working dir first. 2010-05-26 Helmut Eller --- /project/slime/cvsroot/slime/swank.lisp 2010/05/18 09:12:47 1.715 +++ /project/slime/cvsroot/slime/swank.lisp 2010/05/27 14:48:03 1.716 @@ -354,42 +354,42 @@ (call-with-debugging-environment (lambda () (backtrace 0 nil))))) -(define-condition swank-protocol-error (error) - ((condition :initarg :condition :reader swank-protocol-error.condition)) - (:report (lambda (condition stream) - (princ (swank-protocol-error.condition condition) stream)))) +(define-condition swank-error (error) + ((backtrace :initarg :backtrace :reader swank-error.backtrace) + (condition :initarg :condition :reader swank-error.condition)) + (:report (lambda (c s) (princ (swank-error.condition c) s))) + (:documentation "Condition which carries a backtrace.")) -(defun make-swank-protocol-error (condition) - (make-condition 'swank-protocol-error :condition condition)) +(defun make-swank-error (condition &optional (backtrace (safe-backtrace))) + (make-condition 'swank-error :condition condition :backtrace backtrace)) (defvar *debug-on-swank-protocol-error* nil "When non-nil invoke the system debugger on errors that were signalled during decoding/encoding the wire protocol. Do not set this to T unless you want to debug swank internals.") -(defmacro with-swank-protocol-error-handler ((connection) &body body) - (let ((var (gensym)) - (backtrace (gensym))) - `(let ((,var ,connection) - (,backtrace)) +(defmacro with-swank-error-handler ((connection) &body body) + "Close the connection on internal `swank-error's." + (let ((conn (gensym))) + `(let ((,conn ,connection)) (handler-case - (handler-bind ((swank-protocol-error + (handler-bind ((swank-error (lambda (condition) - (setf ,backtrace (safe-backtrace)) (when *debug-on-swank-protocol-error* (invoke-default-debugger condition))))) - (progn , at body)) - (swank-protocol-error (condition) - (close-connection ,var - (swank-protocol-error.condition condition) - ,backtrace)))))) + (progn . ,body)) + (swank-error (condition) + (close-connection ,conn + (swank-error.condition condition) + (swank-error.backtrace condition))))))) (defmacro with-panic-handler ((connection) &body body) - (let ((var (gensym))) - `(let ((,var ,connection)) + "Close the connection on unhandled `serious-condition's." + (let ((conn (gensym))) + `(let ((,conn ,connection)) (handler-bind ((serious-condition (lambda (condition) - (close-connection ,var condition (safe-backtrace))))) + (close-connection ,conn condition (safe-backtrace))))) . ,body)))) (add-hook *new-connection-hook* 'notify-backend-of-connection) @@ -577,7 +577,7 @@ (let ((*emacs-connection* connection) (*pending-slime-interrupts* '())) (without-slime-interrupts - (with-swank-protocol-error-handler (*emacs-connection*) + (with-swank-error-handler (*emacs-connection*) (with-io-redirection (*emacs-connection*) (call-with-debugger-hook #'swank-debugger-hook function))))))) @@ -1006,7 +1006,7 @@ "Read an S-expression from STREAM using the SLIME protocol." (log-event "decode-message~%") (without-slime-interrupts - (handler-bind ((error (lambda (c) (error (make-swank-protocol-error c))))) + (handler-bind ((error (lambda (c) (error (make-swank-error c))))) (handler-case (read-message stream *swank-io-package*) (swank-reader-error (c) `(:reader-error ,(swank-reader-error.packet c) @@ -1016,11 +1016,12 @@ "Write an S-expression to STREAM using the SLIME protocol." (log-event "encode-message~%") (without-slime-interrupts - (handler-bind ((error (lambda (c) (error (make-swank-protocol-error c))))) + (handler-bind ((error (lambda (c) (error (make-swank-error c))))) (write-message message *swank-io-package* stream)))) ;;;;; Event Processing + ;; By default, this restart will be named "abort" because many people ;; press "a" instead of "q" in the debugger. (define-special *sldb-quit-restart* @@ -1124,14 +1125,11 @@ (defun read-loop (connection) (let ((input-stream (connection.socket-io connection)) (control-thread (connection.control-thread connection))) - (with-swank-protocol-error-handler (connection) + (with-swank-error-handler (connection) (loop (send control-thread (decode-message input-stream)))))) (defun dispatch-loop (connection) (let ((*emacs-connection* connection)) - ;; FIXME: Why do we use WITH-PANIC-HANDLER here, and why is it not - ;; appropriate here to use WITH-SWANK-PROTOCOL-ERROR-HANDLER? - ;; I think this should be documented. (with-panic-handler (connection) (loop (dispatch-event (receive)))))) @@ -2492,6 +2490,7 @@ (debug-in-emacs condition)))))) (define-condition invoke-default-debugger () ()) + (defun swank-debugger-hook (condition hook) "Debugger function for binding *DEBUGGER-HOOK*." (declare (ignore hook)) From heller at common-lisp.net Thu May 27 14:48:12 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:48:12 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv6002 Modified Files: ChangeLog swank.lisp Log Message: Clean up some of the confusion regarding *sldb-quit-restart*. * swank.lisp (top-level-restart-p, *toplevel-restart-available*) (coerce-restart): Deleted. (with-top-level-restart, simple-repl): Simplify. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:03 1.2098 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:12 1.2099 @@ -1,3 +1,11 @@ +2010-05-27 Helmut Eller + + Clean up some of the confusion regarding *sldb-quit-restart*. + + * swank.lisp (top-level-restart-p, *toplevel-restart-available*) + (coerce-restart): Deleted. + (with-top-level-restart, simple-repl): Simplify. + 2010-05-26 Helmut Eller * swank.lisp (swank-error): Unrename from swank-protocol-error. --- /project/slime/cvsroot/slime/swank.lisp 2010/05/27 14:48:03 1.716 +++ /project/slime/cvsroot/slime/swank.lisp 2010/05/27 14:48:12 1.717 @@ -1032,12 +1032,7 @@ (defmacro with-top-level-restart ((connection k) &body body) `(with-connection (,connection) (restart-case - ;; We explicitly rebind (and do not look at user's - ;; customization), so sldb-quit will always be our restart - ;; for rex requests. - (let ((*sldb-quit-restart* (find-restart 'abort)) - (*toplevel-restart-available* t)) - (declare (special *toplevel-restart-available*)) + (let ((*sldb-quit-restart* (find-restart 'abort))) , at body) (abort (&optional v) :report "Return to SLIME's top level." @@ -1045,22 +1040,10 @@ (force-user-output) ,k)))) -(defun top-level-restart-p () - ;; FIXME: this could probably be done better; previously this used - ;; *SLDB-QUIT-RESTART* but we cannot use that anymore because it's - ;; exported now, and might hence be bound globally. - ;; - ;; The caveat is that for slime rex requests, we do not want to use - ;; the global value of *sldb-quit-restart* because that might be - ;; bound to terminate-thread, and hence `q' in the debugger would - ;; kill the repl thread. - (boundp '*toplevel-restart-available*)) - (defun handle-requests (connection &optional timeout) "Read and process :emacs-rex requests. The processing is done in the extent of the toplevel restart." - (cond ((top-level-restart-p) - (assert (boundp '*sldb-quit-restart*)) + (cond ((boundp '*sldb-quit-restart*) (assert *emacs-connection*) (process-requests timeout)) (t @@ -1392,41 +1375,30 @@ (call-with-user-break-handler (lambda () (invoke-or-queue-interrupt - #'(lambda () (dispatch-interrupt-event connection)))) + (lambda () (dispatch-interrupt-event connection)))) (lambda () - (with-simple-restart (close-connection "Close SLIME connection") - ;;(handle-requests connection) + (with-simple-restart (close-connection "Close SLIME connection.") (let* ((stdin (real-input-stream *standard-input*)) (*standard-input* (make-repl-input-stream connection stdin))) - (simple-repl)))))) + (tagbody toplevel + (with-top-level-restart (connection (go toplevel)) + (simple-repl)))))))) (close-connection connection nil (safe-backtrace)))) (defun simple-repl () - (flet ((read-eval-print () - (format t "~a> " (package-string-for-prompt *package*)) - (force-output) - (let ((form (read))) - (let ((- form) - (values (multiple-value-list (eval form)))) - (setq *** ** ** * * (car values) - /// // // / / values - +++ ++ ++ + + form) - (cond ((null values) (format t "; No values~&")) - (t (mapc (lambda (v) (format t "~s~&" v)) values))))))) - (loop - (restart-case - (handler-case (read-eval-print) - (end-of-file () (return))) - (abort (&optional c) - :report "Return to inferior-lisp's top-level." - :test (lambda (c) - (declare (ignore c)) - ;; Do not show this restart if a more appropriate - ;; top-level restart is available (e.g. for REXs and - ;; hence the slime-repl.) - (not (top-level-restart-p))) - (declare (ignore c))))))) + (loop + (format t "~a> " (package-string-for-prompt *package*)) + (force-output) + (let ((form (handler-case (read) + (end-of-file () (return))))) + (let ((- form) + (values (multiple-value-list (eval form)))) + (setq *** ** ** * * (car values) + /// // // / / values + +++ ++ ++ + + form) + (cond ((null values) (format t "; No values~&")) + (t (mapc (lambda (v) (format t "~s~&" v)) values))))))) (defun make-repl-input-stream (connection stdin) (make-input-stream @@ -1438,22 +1410,21 @@ (if (open-stream-p stdin) :stdin-open :stdin-closed)) (loop - (with-top-level-restart (connection nil) - (let* ((socket (connection.socket-io connection)) - (inputs (list socket stdin)) - (ready (wait-for-input inputs))) - (cond ((eq ready :interrupt) - (check-slime-interrupts)) - ((member socket ready) - ;; A Slime request from Emacs is pending; make sure to - ;; redirect IO to the REPL buffer. - (with-io-redirection (connection) - (handle-requests connection t))) - ((member stdin ready) - ;; User typed something into the *inferior-lisp* buffer, - ;; so do not redirect. - (return (read-non-blocking stdin))) - (t (assert (null ready)))))))))) + (let* ((socket (connection.socket-io connection)) + (inputs (list socket stdin)) + (ready (wait-for-input inputs))) + (cond ((eq ready :interrupt) + (check-slime-interrupts)) + ((member socket ready) + ;; A Slime request from Emacs is pending; make sure to + ;; redirect IO to the REPL buffer. + (with-io-redirection (connection) + (handle-requests connection t))) + ((member stdin ready) + ;; User typed something into the *inferior-lisp* buffer, + ;; so do not redirect. + (return (read-non-blocking stdin))) + (t (assert (null ready))))))))) (defun read-non-blocking (stream) (with-output-to-string (str) @@ -2407,7 +2378,7 @@ ((cons (or string pathname) *) `(:filename ,(canonicalize-filename (car what)) ,@(cdr what))) ((or symbol cons) - `(:function-name ,(prin1-to-string-for-emacs what)))))) + `(:function-name ,(prin1-to-string what)))))) (cond (*emacs-connection* (send-oob-to-emacs `(:ed ,target))) ((default-connection) (with-connection ((default-connection)) @@ -2703,18 +2674,13 @@ (with-simple-restart (continue "Continue from break.") (invoke-slime-debugger (coerce-to-condition datum args)))) -(defun coerce-restart (restart-designator) - (when (or (typep restart-designator 'restart) - (typep restart-designator '(and symbol (not null)))) - (find-restart restart-designator))) - (defslimefun throw-to-toplevel () "Invoke the ABORT-REQUEST restart abort an RPC from Emacs. If we are not evaluating an RPC then ABORT instead." - (let ((restart (and (boundp '*sldb-quit-restart*) - (coerce-restart *sldb-quit-restart*)))) + (assert (boundp '*sldb-quit-restart*)) ; bound by debug-in-emacs + (let ((restart (find-restart *sldb-quit-restart*))) (cond (restart (invoke-restart restart)) - (t "No toplevel restart active")))) + (t (format nil "Restart not active [~s]" *sldb-quit-restart*))))) (defslimefun invoke-nth-restart-for-emacs (sldb-level n) "Invoke the Nth available restart. From heller at common-lisp.net Thu May 27 14:48:19 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 10:48:19 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv6040 Modified Files: ChangeLog swank-ccl.lisp Log Message: * swank-ccl.lisp (socket-fd): Implement backend function. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:12 1.2099 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:19 1.2100 @@ -1,5 +1,9 @@ 2010-05-27 Helmut Eller + * swank-ccl.lisp (socket-fd): Implement backend function. + +2010-05-27 Helmut Eller + Clean up some of the confusion regarding *sldb-quit-restart*. * swank.lisp (top-level-restart-p, *toplevel-restart-available*) --- /project/slime/cvsroot/slime/swank-ccl.lisp 2010/03/10 00:02:53 1.19 +++ /project/slime/cvsroot/slime/swank-ccl.lisp 2010/05/27 14:48:19 1.20 @@ -115,6 +115,9 @@ (car (rassoc-if (lambda (x) (member coding-system x :test #'equal)) *external-format-to-coding-system*))) +(defimplementation socket-fd (stream) + (ccl::ioblock-device (ccl::stream-ioblock stream t))) + ;;; Unix signals (defimplementation getpid () From heller at common-lisp.net Thu May 27 15:00:58 2010 From: heller at common-lisp.net (CVS User heller) Date: Thu, 27 May 2010 11:00:58 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv10517 Modified Files: ChangeLog slime.el Log Message: * slime.el ([test] interactive-eval): Fix test. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 14:48:19 1.2100 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/27 15:00:58 1.2101 @@ -1,5 +1,9 @@ 2010-05-27 Helmut Eller + * slime.el ([test] interactive-eval): Fix test. + +2010-05-27 Helmut Eller + * swank-ccl.lisp (socket-fd): Implement backend function. 2010-05-27 Helmut Eller --- /project/slime/cvsroot/slime/slime.el 2010/05/27 14:47:48 1.1321 +++ /project/slime/cvsroot/slime/slime.el 2010/05/27 15:00:58 1.1322 @@ -8145,7 +8145,7 @@ (unless noninteractive (let ((message (current-message))) (slime-check "Minibuffer contains: \"3\"" - (equal "=> 3 (#x3, #o3, #b11)" message))))))) + (equal "=> 3 (2 bits, #x3, #o3, #b11)" message))))))) (def-slime-test interrupt-bubbling-idiot () From heller at common-lisp.net Fri May 28 07:03:54 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 03:03:54 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv23249/contrib Modified Files: ChangeLog swank-kawa.scm Log Message: * swank-kawa.scm (wrap-compilation): Set Compilation.explict flag. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/19 06:55:15 1.383 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 07:03:54 1.384 @@ -1,3 +1,7 @@ +2010-05-28 Helmut Eller + + * swank-kawa.scm (wrap-compilation): Set Compilation.explict flag. + 2010-05-19 Stas Boukarev * slime-repl.el (slime-list-repl-short-cuts): Don't scroll to the --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/08/15 08:35:08 1.19 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2010/05/28 07:03:54 1.20 @@ -655,9 +655,10 @@ (messages ())) (try-catch (let ((c (as (f messages)))) + (set (@ explicit c) #t) (! compile-to-archive c (! get-module c) jar)) (ex - (log "error during compilation: ~a\n" ex) + (log "error during compilation: ~a\n~a" ex (! getStackTrace ex)) (! error messages (as #\f) (to-str (exception-message ex)) #!null))) (log "compilation done.\n") @@ -2165,5 +2166,5 @@ ;; Local Variables: ;; mode: goo -;; compile-command:"kawa -e '(compile-file \"swank-kawa.scm\"\"swank-kawa\")'" +;; compile-command:"kawa -e '(compile-file \"swank-kawa.scm\"\"swank-kawa.zip\")'" ;; End: \ No newline at end of file From heller at common-lisp.net Fri May 28 07:10:56 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 03:10:56 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv23463/contrib Modified Files: ChangeLog swank-kawa.scm Log Message: * swank-kawa.scm (list-file): Add cast to resolve overloaded parse method. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 07:03:54 1.384 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 07:10:56 1.385 @@ -1,6 +1,7 @@ 2010-05-28 Helmut Eller * swank-kawa.scm (wrap-compilation): Set Compilation.explict flag. + (list-file): Add cast to resolve overloaded parse method. 2010-05-19 Stas Boukarev --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2010/05/28 07:03:54 1.20 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2010/05/28 07:10:56 1.21 @@ -1966,7 +1966,7 @@ (with (port (call-with-input-file filename)) (let* ((lang (gnu.expr.Language:getDefaultLanguage)) (messages ()) - (comp (! parse lang port messages 0))) + (comp (! parse lang (as port) messages 0))) (! get-module comp)))) (df list-decls (file) From heller at common-lisp.net Fri May 28 10:49:36 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 06:49:36 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv17656/contrib Modified Files: ChangeLog swank-kawa.scm Log Message: * swank-kawa.scm (disassemble-form): Update for change from 2010-05-18. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 07:10:56 1.385 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 10:49:35 1.386 @@ -2,6 +2,7 @@ * swank-kawa.scm (wrap-compilation): Set Compilation.explict flag. (list-file): Add cast to resolve overloaded parse method. + (disassemble-form): Update for change from 2010-05-18. 2010-05-19 Stas Boukarev --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2010/05/28 07:10:56 1.21 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2010/05/28 10:49:35 1.22 @@ -969,11 +969,13 @@ ;;;; Disassemble -(defslimefun disassemble-symbol (env name) - (let ((f (eval (read-from-string name) env))) - (typecase f - ( - (disassemble (module-method>meth-ref f)))))) +(defslimefun disassemble-form (env form) + (mcase (read-from-string form) + (('quote name) + (let ((f (eval name env))) + (typecase f + ( + (disassemble (module-method>meth-ref f)))))))) (df disassemble ((mr ) => ) (with-sink #f (fun (out) (disassemble-meth-ref mr out)))) From heller at common-lisp.net Fri May 28 10:49:45 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 06:49:45 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv17679 Modified Files: ChangeLog slime.el Log Message: Move wacky parsing code to contrib. * slime.el (slime-extract-context, slime-parse-context) (slime-in-expression-p, slime-pattern-path) (slime-beginning-of-list, slime-end-of-list) (slime-parse-toplevel-form, slime-arglist-specializers) (slime-definition-at-point, slime-current-parser-state): Moved to contrib/slime-parse.el (slime-inspect-definition, slime-disassemble-definition): Moved to contrib/slime-fancy-inspector.el --- /project/slime/cvsroot/slime/ChangeLog 2010/05/27 15:00:58 1.2101 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/28 10:49:44 1.2102 @@ -1,3 +1,16 @@ +2010-05-28 Helmut Eller + + Move wacky parsing code to contrib. + + * slime.el (slime-extract-context, slime-parse-context) + (slime-in-expression-p, slime-pattern-path) + (slime-beginning-of-list, slime-end-of-list) + (slime-parse-toplevel-form, slime-arglist-specializers) + (slime-definition-at-point, slime-current-parser-state): Moved to + contrib/slime-parse.el + (slime-inspect-definition, slime-disassemble-definition): Moved to + contrib/slime-fancy-inspector.el + 2010-05-27 Helmut Eller * slime.el ([test] interactive-eval): Fix test. --- /project/slime/cvsroot/slime/slime.el 2010/05/27 15:00:58 1.1322 +++ /project/slime/cvsroot/slime/slime.el 2010/05/28 10:49:44 1.1323 @@ -4236,208 +4236,12 @@ (interactive) (slime-eval `(swank:untrace-all))) -(defun slime-toggle-trace-fdefinition (&optional using-context-p) +(defun slime-toggle-trace-fdefinition (spec) "Toggle trace." - (interactive "P") - (let* ((spec (if using-context-p - (slime-extract-context) - (slime-symbol-at-point))) - (spec (slime-trace-query spec))) - (message "%s" (slime-eval `(swank:swank-toggle-trace ,spec))))) - - -;; FIXME: move this to contrib - -(defun slime-trace-query (spec) - "Ask the user which function to trace; SPEC is the default. -The result is a string." - (cond ((null spec) - (slime-read-from-minibuffer "(Un)trace: ")) - ((stringp spec) - (slime-read-from-minibuffer "(Un)trace: " spec)) - ((symbolp spec) ; `slime-extract-context' can return symbols. - (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) - (t - (destructure-case spec - ((setf n) - (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) - ((:defun n) - (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string n))) - ((:defgeneric n) - (let* ((name (prin1-to-string n)) - (answer (slime-read-from-minibuffer "(Un)trace: " name))) - (cond ((and (string= name answer) - (y-or-n-p (concat "(Un)trace also all " - "methods implementing " - name "? "))) - (prin1-to-string `(:defgeneric ,n))) - (t - answer)))) - ((:defmethod &rest _) - (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) - ((:call caller callee) - (let* ((callerstr (prin1-to-string caller)) - (calleestr (prin1-to-string callee)) - (answer (slime-read-from-minibuffer "(Un)trace: " - calleestr))) - (cond ((and (string= calleestr answer) - (y-or-n-p (concat "(Un)trace only when " calleestr - " is called by " callerstr "? "))) - (prin1-to-string `(:call ,caller ,callee))) - (t - answer)))) - (((:labels :flet) &rest _) - (slime-read-from-minibuffer "(Un)trace local function: " - (prin1-to-string spec))) - (t (error "Don't know how to trace the spec %S" spec)))))) - -(defun slime-extract-context () - "Parse the context for the symbol at point. -Nil is returned if there's no symbol at point. Otherwise we detect -the following cases (the . shows the point position): - - (defun n.ame (...) ...) -> (:defun name) - (defun (setf n.ame) (...) ...) -> (:defun (setf name)) - (defmethod n.ame (...) ...) -> (:defmethod name (...)) - (defun ... (...) (labels ((n.ame (...) -> (:labels (:defun ...) name) - (defun ... (...) (flet ((n.ame (...) -> (:flet (:defun ...) name) - (defun ... (...) ... (n.ame ...) ...) -> (:call (:defun ...) name) - (defun ... (...) ... (setf (n.ame ...) -> (:call (:defun ...) (setf name)) - - (defmacro n.ame (...) ...) -> (:defmacro name) - (defsetf n.ame (...) ...) -> (:defsetf name) - (define-setf-expander n.ame (...) ...) -> (:define-setf-expander name) - (define-modify-macro n.ame (...) ...) -> (:define-modify-macro name) - (define-compiler-macro n.ame (...) ...) -> (:define-compiler-macro name) - (defvar n.ame (...) ...) -> (:defvar name) - (defparameter n.ame ...) -> (:defparameter name) - (defconstant n.ame ...) -> (:defconstant name) - (defclass n.ame ...) -> (:defclass name) - (defstruct n.ame ...) -> (:defstruct name) - (defpackage n.ame ...) -> (:defpackage name) -For other contexts we return the symbol at point." - (let ((name (slime-symbol-at-point))) - (if name - (let ((symbol (read name))) - (or (progn ;;ignore-errors - (slime-parse-context symbol)) - symbol))))) - -(defun slime-parse-context (name) - (save-excursion - (cond ((slime-in-expression-p '(defun *)) `(:defun ,name)) - ((slime-in-expression-p '(defmacro *)) `(:defmacro ,name)) - ((slime-in-expression-p '(defgeneric *)) `(:defgeneric ,name)) - ((slime-in-expression-p '(setf *)) - ;;a setf-definition, but which? - (backward-up-list 1) - (slime-parse-context `(setf ,name))) - ((slime-in-expression-p '(defmethod *)) - (unless (looking-at "\\s ") - (forward-sexp 1)) ; skip over the methodname - (let (qualifiers arglist) - (loop for e = (read (current-buffer)) - until (listp e) do (push e qualifiers) - finally (setq arglist e)) - `(:defmethod ,name , at qualifiers - ,(slime-arglist-specializers arglist)))) - ((and (symbolp name) - (slime-in-expression-p `(,name))) - ;; looks like a regular call - (let ((toplevel (ignore-errors (slime-parse-toplevel-form)))) - (cond ((slime-in-expression-p `(setf (*))) ;a setf-call - (if toplevel - `(:call ,toplevel (setf ,name)) - `(setf ,name))) - ((not toplevel) - name) - ((slime-in-expression-p `(labels ((*)))) - `(:labels ,toplevel ,name)) - ((slime-in-expression-p `(flet ((*)))) - `(:flet ,toplevel ,name)) - (t - `(:call ,toplevel ,name))))) - ((slime-in-expression-p '(define-compiler-macro *)) - `(:define-compiler-macro ,name)) - ((slime-in-expression-p '(define-modify-macro *)) - `(:define-modify-macro ,name)) - ((slime-in-expression-p '(define-setf-expander *)) - `(:define-setf-expander ,name)) - ((slime-in-expression-p '(defsetf *)) - `(:defsetf ,name)) - ((slime-in-expression-p '(defvar *)) `(:defvar ,name)) - ((slime-in-expression-p '(defparameter *)) `(:defparameter ,name)) - ((slime-in-expression-p '(defconstant *)) `(:defconstant ,name)) - ((slime-in-expression-p '(defclass *)) `(:defclass ,name)) - ((slime-in-expression-p '(defpackage *)) `(:defpackage ,name)) - ((slime-in-expression-p '(defstruct *)) - `(:defstruct ,(if (consp name) - (car name) - name))) - (t - name)))) - - -(defun slime-in-expression-p (pattern) - "A helper function to determine the current context. -The pattern can have the form: - pattern ::= () ;matches always - | (*) ;matches inside a list - | ( ) ;matches if the first element in - ; the current list is and - ; if matches. - | (()) ;matches if we are in a nested list." - (save-excursion - (let ((path (reverse (slime-pattern-path pattern)))) - (loop for p in path - always (ignore-errors - (etypecase p - (symbol (slime-beginning-of-list) - (eq (read (current-buffer)) p)) - (number (backward-up-list p) - t))))))) - -(defun slime-pattern-path (pattern) - ;; Compute the path to the * in the pattern to make matching - ;; easier. The path is a list of symbols and numbers. A number - ;; means "(down-list )" and a symbol "(look-at )") - (if (null pattern) - '() - (etypecase (car pattern) - ((member *) '()) - (symbol (cons (car pattern) (slime-pattern-path (cdr pattern)))) - (cons (cons 1 (slime-pattern-path (car pattern))))))) - -(defun slime-beginning-of-list (&optional up) - "Move backward to the beginning of the current expression. -Point is placed before the first expression in the list." - (backward-up-list (or up 1)) - (down-list 1) - (skip-syntax-forward " ")) - -(defun slime-end-of-list (&optional up) - (backward-up-list (or up 1)) - (forward-list 1) - (down-list -1)) + (interactive (list (slime-read-from-minibuffer + "(Un)trace: " (slime-symbol-at-point)))) + (message "%s" (slime-eval `(swank:swank-toggle-trace ,spec)))) -(defun slime-parse-toplevel-form () - (ignore-errors ; (foo) - (save-excursion - (goto-char (car (slime-region-for-defun-at-point))) - (down-list 1) - (forward-sexp 1) - (slime-parse-context (read (current-buffer)))))) - -(defun slime-arglist-specializers (arglist) - (cond ((or (null arglist) - (member (first arglist) '(&optional &key &rest &aux))) - (list)) - ((consp (first arglist)) - (cons (second (first arglist)) - (slime-arglist-specializers (rest arglist)))) - (t - (cons 't - (slime-arglist-specializers (rest arglist)))))) (defun slime-disassemble-symbol (symbol-name) @@ -6535,46 +6339,6 @@ (slime-sexp-at-point)))) (slime-eval-async `(swank:init-inspector ,string) 'slime-open-inspector)) -(defun slime-definition-at-point (&optional only-functional) - "Return object corresponding to the definition at point." - (let ((toplevel (slime-parse-toplevel-form))) - (if (or (symbolp toplevel) - (and only-functional - (not (member (car toplevel) - '(:defun :defgeneric :defmethod - :defmacro :define-compiler-macro))))) - (error "Not in a definition") - (destructure-case toplevel - (((:defun :defgeneric) symbol) - (format "#'%s" symbol)) - (((:defmacro :define-modify-macro) symbol) - (format "(macro-function '%s)" symbol)) - ((:define-compiler-macro symbol) - (format "(compiler-macro-function '%s)" symbol)) - ((:defmethod symbol &rest args) - (declare (ignore args)) - (format "#'%s" symbol)) - (((:defparameter :defvar :defconstant) symbol) - (format "'%s" symbol)) - (((:defclass :defstruct) symbol) - (format "(find-class '%s)" symbol)) - ((:defpackage symbol) - (format "(or (find-package '%s) (error \"Package %s not found\"))" - symbol symbol)) - (t - (error "Not in a definition")))))) - -(defun slime-inspect-definition () - "Inspect definition at point" - (interactive) - (slime-inspect (slime-definition-at-point))) - -(defun slime-disassemble-definition () - "Disassemble definition at point" - (interactive) - (slime-eval-describe `(swank:disassemble-form - ,(slime-definition-at-point t)))) - (define-derived-mode slime-inspector-mode fundamental-mode "Slime-Inspector" " @@ -8550,18 +8314,6 @@ until (= (point) (point-max)) maximizing column))) -(defun slime-inside-string-p () - (nth 3 (slime-current-parser-state))) - -(defun slime-inside-comment-p () - (nth 4 (slime-current-parser-state))) - -(defun slime-inside-string-or-comment-p () - (let ((state (slime-current-parser-state))) - (or (nth 3 state) (nth 4 state)))) - - - ;;;;; CL symbols vs. Elisp symbols. (defun slime-cl-symbol-name (symbol) @@ -8774,21 +8526,6 @@ (and (not (featurep 'xemacs)) (= emacs-major-version 21))) -;; FIXME: not used here; move it away -(if (and (featurep 'emacs) (>= emacs-major-version 22)) - ;; N.B. The 2nd, and 6th return value cannot be relied upon. - (defsubst slime-current-parser-state () - ;; `syntax-ppss' does not save match data as it invokes - ;; `beginning-of-defun' implicitly which does not save match - ;; data. This issue has been reported to the Emacs maintainer on - ;; Feb27. - (syntax-ppss)) - (defsubst slime-current-parser-state () - (let ((original-pos (point))) - (save-excursion - (beginning-of-defun) - (parse-partial-sexp (point) original-pos))))) - ;;; `getf', `get', `symbol-plist' do not work on malformed plists ;;; on Emacs21. On later versions they do. (when (slime-emacs-21-p) @@ -8800,7 +8537,6 @@ when (eq prop property) return (car val) finally (return default)))) - (defun slime-split-string (string &optional separators omit-nulls) "This is like `split-string' in Emacs22, but also works in 21." (let ((splits (split-string string separators))) @@ -9222,8 +8958,6 @@ slime-symbol-constituent-at slime-beginning-of-symbol slime-end-of-symbol - ;; Used implicitly during fontification: - slime-current-parser-state slime-eval-feature-expression slime-forward-sexp slime-forward-cruft From heller at common-lisp.net Fri May 28 10:49:45 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 06:49:45 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv17679/contrib Modified Files: slime-fancy-inspector.el slime-parse.el Log Message: Move wacky parsing code to contrib. * slime.el (slime-extract-context, slime-parse-context) (slime-in-expression-p, slime-pattern-path) (slime-beginning-of-list, slime-end-of-list) (slime-parse-toplevel-form, slime-arglist-specializers) (slime-definition-at-point, slime-current-parser-state): Moved to contrib/slime-parse.el (slime-inspect-definition, slime-disassemble-definition): Moved to contrib/slime-fancy-inspector.el --- /project/slime/cvsroot/slime/contrib/slime-fancy-inspector.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-fancy-inspector.el 2010/05/28 10:49:45 1.6 @@ -4,3 +4,15 @@ (:authors "Marco Baringer and others") (:license "GPL") (:swank-dependencies swank-fancy-inspector)) + + +(defun slime-inspect-definition () + "Inspect definition at point" + (interactive) + (slime-inspect (slime-definition-at-point))) + +(defun slime-disassemble-definition () + "Disassemble definition at point" + (interactive) + (slime-eval-describe `(swank:disassemble-form + ,(slime-definition-at-point t)))) --- /project/slime/cvsroot/slime/contrib/slime-parse.el 2010/05/13 15:31:07 1.35 +++ /project/slime/cvsroot/slime/contrib/slime-parse.el 2010/05/28 10:49:45 1.36 @@ -149,4 +149,250 @@ (unless skip-trailing-test-p (insert ")") (backward-char) (slime-check-buffer-form result-form)) - )) \ No newline at end of file + )) + +(defun slime-trace-query (spec) + "Ask the user which function to trace; SPEC is the default. +The result is a string." + (cond ((null spec) + (slime-read-from-minibuffer "(Un)trace: ")) + ((stringp spec) + (slime-read-from-minibuffer "(Un)trace: " spec)) + ((symbolp spec) ; `slime-extract-context' can return symbols. + (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) + (t + (destructure-case spec + ((setf n) + (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) + ((:defun n) + (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string n))) + ((:defgeneric n) + (let* ((name (prin1-to-string n)) + (answer (slime-read-from-minibuffer "(Un)trace: " name))) + (cond ((and (string= name answer) + (y-or-n-p (concat "(Un)trace also all " + "methods implementing " + name "? "))) + (prin1-to-string `(:defgeneric ,n))) + (t + answer)))) + ((:defmethod &rest _) + (slime-read-from-minibuffer "(Un)trace: " (prin1-to-string spec))) + ((:call caller callee) + (let* ((callerstr (prin1-to-string caller)) + (calleestr (prin1-to-string callee)) + (answer (slime-read-from-minibuffer "(Un)trace: " + calleestr))) + (cond ((and (string= calleestr answer) + (y-or-n-p (concat "(Un)trace only when " calleestr + " is called by " callerstr "? "))) + (prin1-to-string `(:call ,caller ,callee))) + (t + answer)))) + (((:labels :flet) &rest _) + (slime-read-from-minibuffer "(Un)trace local function: " + (prin1-to-string spec))) + (t (error "Don't know how to trace the spec %S" spec)))))) + +(defun slime-extract-context () + "Parse the context for the symbol at point. +Nil is returned if there's no symbol at point. Otherwise we detect +the following cases (the . shows the point position): + + (defun n.ame (...) ...) -> (:defun name) + (defun (setf n.ame) (...) ...) -> (:defun (setf name)) + (defmethod n.ame (...) ...) -> (:defmethod name (...)) + (defun ... (...) (labels ((n.ame (...) -> (:labels (:defun ...) name) + (defun ... (...) (flet ((n.ame (...) -> (:flet (:defun ...) name) + (defun ... (...) ... (n.ame ...) ...) -> (:call (:defun ...) name) + (defun ... (...) ... (setf (n.ame ...) -> (:call (:defun ...) (setf name)) + + (defmacro n.ame (...) ...) -> (:defmacro name) + (defsetf n.ame (...) ...) -> (:defsetf name) + (define-setf-expander n.ame (...) ...) -> (:define-setf-expander name) + (define-modify-macro n.ame (...) ...) -> (:define-modify-macro name) + (define-compiler-macro n.ame (...) ...) -> (:define-compiler-macro name) + (defvar n.ame (...) ...) -> (:defvar name) + (defparameter n.ame ...) -> (:defparameter name) + (defconstant n.ame ...) -> (:defconstant name) + (defclass n.ame ...) -> (:defclass name) + (defstruct n.ame ...) -> (:defstruct name) + (defpackage n.ame ...) -> (:defpackage name) +For other contexts we return the symbol at point." + (let ((name (slime-symbol-at-point))) + (if name + (let ((symbol (read name))) + (or (progn ;;ignore-errors + (slime-parse-context symbol)) + symbol))))) + +(defun slime-parse-context (name) + (save-excursion + (cond ((slime-in-expression-p '(defun *)) `(:defun ,name)) + ((slime-in-expression-p '(defmacro *)) `(:defmacro ,name)) + ((slime-in-expression-p '(defgeneric *)) `(:defgeneric ,name)) + ((slime-in-expression-p '(setf *)) + ;;a setf-definition, but which? + (backward-up-list 1) + (slime-parse-context `(setf ,name))) + ((slime-in-expression-p '(defmethod *)) + (unless (looking-at "\\s ") + (forward-sexp 1)) ; skip over the methodname + (let (qualifiers arglist) + (loop for e = (read (current-buffer)) + until (listp e) do (push e qualifiers) + finally (setq arglist e)) + `(:defmethod ,name , at qualifiers + ,(slime-arglist-specializers arglist)))) + ((and (symbolp name) + (slime-in-expression-p `(,name))) + ;; looks like a regular call + (let ((toplevel (ignore-errors (slime-parse-toplevel-form)))) + (cond ((slime-in-expression-p `(setf (*))) ;a setf-call + (if toplevel + `(:call ,toplevel (setf ,name)) + `(setf ,name))) + ((not toplevel) + name) + ((slime-in-expression-p `(labels ((*)))) + `(:labels ,toplevel ,name)) + ((slime-in-expression-p `(flet ((*)))) + `(:flet ,toplevel ,name)) + (t + `(:call ,toplevel ,name))))) + ((slime-in-expression-p '(define-compiler-macro *)) + `(:define-compiler-macro ,name)) + ((slime-in-expression-p '(define-modify-macro *)) + `(:define-modify-macro ,name)) + ((slime-in-expression-p '(define-setf-expander *)) + `(:define-setf-expander ,name)) + ((slime-in-expression-p '(defsetf *)) + `(:defsetf ,name)) + ((slime-in-expression-p '(defvar *)) `(:defvar ,name)) + ((slime-in-expression-p '(defparameter *)) `(:defparameter ,name)) + ((slime-in-expression-p '(defconstant *)) `(:defconstant ,name)) + ((slime-in-expression-p '(defclass *)) `(:defclass ,name)) + ((slime-in-expression-p '(defpackage *)) `(:defpackage ,name)) + ((slime-in-expression-p '(defstruct *)) + `(:defstruct ,(if (consp name) + (car name) + name))) + (t + name)))) + + +(defun slime-in-expression-p (pattern) + "A helper function to determine the current context. +The pattern can have the form: + pattern ::= () ;matches always + | (*) ;matches inside a list + | ( ) ;matches if the first element in + ; the current list is and + ; if matches. + | (()) ;matches if we are in a nested list." + (save-excursion + (let ((path (reverse (slime-pattern-path pattern)))) + (loop for p in path + always (ignore-errors + (etypecase p + (symbol (slime-beginning-of-list) + (eq (read (current-buffer)) p)) + (number (backward-up-list p) + t))))))) + +(defun slime-pattern-path (pattern) + ;; Compute the path to the * in the pattern to make matching + ;; easier. The path is a list of symbols and numbers. A number + ;; means "(down-list )" and a symbol "(look-at )") + (if (null pattern) + '() + (etypecase (car pattern) + ((member *) '()) + (symbol (cons (car pattern) (slime-pattern-path (cdr pattern)))) + (cons (cons 1 (slime-pattern-path (car pattern))))))) + +(defun slime-beginning-of-list (&optional up) + "Move backward to the beginning of the current expression. +Point is placed before the first expression in the list." + (backward-up-list (or up 1)) + (down-list 1) + (skip-syntax-forward " ")) + +(defun slime-end-of-list (&optional up) + (backward-up-list (or up 1)) + (forward-list 1) + (down-list -1)) + +(defun slime-parse-toplevel-form () + (ignore-errors ; (foo) + (save-excursion + (goto-char (car (slime-region-for-defun-at-point))) + (down-list 1) + (forward-sexp 1) + (slime-parse-context (read (current-buffer)))))) + +(defun slime-arglist-specializers (arglist) + (cond ((or (null arglist) + (member (first arglist) '(&optional &key &rest &aux))) + (list)) + ((consp (first arglist)) + (cons (second (first arglist)) + (slime-arglist-specializers (rest arglist)))) + (t + (cons 't + (slime-arglist-specializers (rest arglist)))))) + +(defun slime-definition-at-point (&optional only-functional) + "Return object corresponding to the definition at point." + (let ((toplevel (slime-parse-toplevel-form))) + (if (or (symbolp toplevel) + (and only-functional + (not (member (car toplevel) + '(:defun :defgeneric :defmethod + :defmacro :define-compiler-macro))))) + (error "Not in a definition") + (destructure-case toplevel + (((:defun :defgeneric) symbol) + (format "#'%s" symbol)) + (((:defmacro :define-modify-macro) symbol) + (format "(macro-function '%s)" symbol)) + ((:define-compiler-macro symbol) + (format "(compiler-macro-function '%s)" symbol)) + ((:defmethod symbol &rest args) + (declare (ignore args)) + (format "#'%s" symbol)) + (((:defparameter :defvar :defconstant) symbol) + (format "'%s" symbol)) + (((:defclass :defstruct) symbol) + (format "(find-class '%s)" symbol)) + ((:defpackage symbol) + (format "(or (find-package '%s) (error \"Package %s not found\"))" + symbol symbol)) + (t + (error "Not in a definition")))))) + +;; FIXME: not used here; move it away +(if (and (featurep 'emacs) (>= emacs-major-version 22)) + ;; N.B. The 2nd, and 6th return value cannot be relied upon. + (defsubst slime-current-parser-state () + ;; `syntax-ppss' does not save match data as it invokes + ;; `beginning-of-defun' implicitly which does not save match + ;; data. This issue has been reported to the Emacs maintainer on + ;; Feb27. + (syntax-ppss)) + (defsubst slime-current-parser-state () + (let ((original-pos (point))) + (save-excursion + (beginning-of-defun) + (parse-partial-sexp (point) original-pos))))) + +(defun slime-inside-string-p () + (nth 3 (slime-current-parser-state))) + +(defun slime-inside-comment-p () + (nth 4 (slime-current-parser-state))) + +(defun slime-inside-string-or-comment-p () + (let ((state (slime-current-parser-state))) + (or (nth 3 state) (nth 4 state)))) + From heller at common-lisp.net Fri May 28 13:37:40 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 09:37:40 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv2882 Modified Files: ChangeLog slime.el Log Message: Move some var-defs before first use. * slime.el (slime-show-xref-buffer, slime-read-connection) (slime-thread-index-to-id): --- /project/slime/cvsroot/slime/ChangeLog 2010/05/28 10:49:44 1.2102 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/28 13:37:40 1.2103 @@ -1,5 +1,12 @@ 2010-05-28 Helmut Eller + Move some var-defs before first use. + + * slime.el (slime-show-xref-buffer, slime-read-connection) + (slime-thread-index-to-id): + +2010-05-28 Helmut Eller + Move wacky parsing code to contrib. * slime.el (slime-extract-context, slime-parse-context) --- /project/slime/cvsroot/slime/slime.el 2010/05/28 10:49:44 1.1323 +++ /project/slime/cvsroot/slime/slime.el 2010/05/28 13:37:40 1.1324 @@ -771,19 +771,6 @@ `(swank:list-all-package-names t))) nil t initial-value))) -(defun slime-read-connection (prompt &optional initial-value) - "Read a connection from the minibuffer. Returns the net -process, or nil." - (assert (memq initial-value slime-net-processes)) - (flet ((connection-identifier (p) - (format "%s (pid %d)" (slime-connection-name p) (slime-pid p)))) - (let ((candidates (mapcar #'(lambda (p) - (cons (connection-identifier p) p)) - slime-net-processes))) - (cdr (assoc (completing-read prompt candidates - nil t (connection-identifier initial-value)) - candidates))))) - ;; Interface (defun slime-read-symbol-name (prompt &optional query) "Either read a symbol name or choose the one at point. @@ -4602,14 +4589,6 @@ (:error (message "%s" (cadr loc))) ((nil)))) -(defun slime-show-xref-buffer (xrefs type symbol package) - (slime-with-xref-buffer (type symbol package) - (slime-insert-xrefs xrefs) - (setq slime-next-location-function 'slime-goto-next-xref) - (setq slime-previous-location-function 'slime-goto-previous-xref) - (setq slime-xref-last-buffer (current-buffer)) - (goto-char (point-min)))) - (defvar slime-next-location-function nil "Function to call for going to the next location.") @@ -4620,6 +4599,14 @@ "The most recent XREF results buffer. This is used by `slime-goto-next-xref'") +(defun slime-show-xref-buffer (xrefs type symbol package) + (slime-with-xref-buffer (type symbol package) + (slime-insert-xrefs xrefs) + (setq slime-next-location-function 'slime-goto-next-xref) + (setq slime-previous-location-function 'slime-goto-previous-xref) + (setq slime-xref-last-buffer (current-buffer)) + (goto-char (point-min)))) + (defun slime-show-xrefs (xrefs type symbol package) "Show the results of an XREF query." (if (null xrefs) @@ -5961,6 +5948,18 @@ (insert cmd) (comint-send-input))))) +(defun slime-read-connection (prompt &optional initial-value) + "Read a connection from the minibuffer. Returns the net +process, or nil." + (assert (memq initial-value slime-net-processes)) + (flet ((connection-identifier (p) + (format "%s (pid %d)" (slime-connection-name p) (slime-pid p)))) + (let ((candidates (mapcar #'(lambda (p) + (cons (connection-identifier p) p)) + slime-net-processes))) + (cdr (assoc (completing-read prompt candidates + nil t (connection-identifier initial-value)) + candidates))))) (defun sldb-step () "Step to next basic-block boundary." @@ -6073,6 +6072,8 @@ (mapc 'process-line list-of-lines) lengths))) +(defvar slime-thread-index-to-id nil) + (defun slime-quit-threads-buffer (&optional _) (when slime-threads-buffer-timer (cancel-timer slime-threads-buffer-timer) @@ -6087,8 +6088,6 @@ (slime-eval-async '(swank:list-threads) 'slime-display-threads))) -(defvar slime-thread-index-to-id nil) - (defun slime-move-point (position) "Move point in the current buffer and in the window the buffer is displayed." (let ((window (get-buffer-window (current-buffer) t))) From heller at common-lisp.net Fri May 28 13:37:51 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 09:37:51 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv2911 Modified Files: ChangeLog slime.el Log Message: * slime.el (define-slime-contrib): Use destructuring-bind. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/28 13:37:40 1.2103 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/28 13:37:50 1.2104 @@ -1,5 +1,9 @@ 2010-05-28 Helmut Eller + * slime.el (define-slime-contrib): Use destructuring-bind. + +2010-05-28 Helmut Eller + Move some var-defs before first use. * slime.el (slime-show-xref-buffer, slime-read-connection) --- /project/slime/cvsroot/slime/slime.el 2010/05/28 13:37:40 1.1324 +++ /project/slime/cvsroot/slime/slime.el 2010/05/28 13:37:51 1.1325 @@ -6866,26 +6866,20 @@ (slime-eval `(swank:swank-require ',needed)))))) (defmacro define-slime-contrib (name docstring &rest clauses) - (let ((slime-deps '()) - (swank-deps '()) - (load-forms '()) - (unload-forms '()) - (gnu-only-p nil)) - (dolist (clause clauses) - (destructure-case clause - ((:slime-dependencies . deps) (setq slime-deps deps)) - ((:swank-dependencies . deps) (setq swank-deps deps)) - ((:on-load . forms) (setq load-forms forms)) - ((:on-unload . forms) (setq unload-forms forms)) - ((:gnu-emacs-only flag) (setq gnu-only-p flag)) - ((:authors . authors)) - ((:license license)))) + (destructuring-bind (&key slime-dependencies + swank-dependencies + on-load + on-unload + gnu-emacs-only + authors + license) + (loop for (key . value) in clauses append `(,key ,value)) `(progn ,(when gnu-only-p - `(eval-and-compile - (assert (not (featurep 'xemacs)) () - ,(concat (symbol-name name) - " does not work with XEmacs.")))) + `(eval-and-compile + (assert (not (featurep 'xemacs)) () + ,(concat (symbol-name name) + " does not work with XEmacs.")))) ,@(mapcar #'(lambda (d) `(require ',d)) slime-deps) (defun ,(intern (concat (symbol-name name) "-init")) () ,@(mapcar #'(lambda (d) `(slime-require ',d)) swank-deps) From heller at common-lisp.net Fri May 28 13:55:30 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 09:55:30 -0400 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv7516 Modified Files: ChangeLog slime.el Log Message: Fix last change. * slime.el (define-slime-contrib): Fix names. Remove provide; makes no sense to call provide before file is completely loaded. --- /project/slime/cvsroot/slime/ChangeLog 2010/05/28 13:37:50 1.2104 +++ /project/slime/cvsroot/slime/ChangeLog 2010/05/28 13:55:30 1.2105 @@ -1,5 +1,13 @@ 2010-05-28 Helmut Eller + Fix last change. + + * slime.el (define-slime-contrib): Fix names. + Remove provide; makes no sense to call provide before file is + completely loaded. + +2010-05-28 Helmut Eller + * slime.el (define-slime-contrib): Use destructuring-bind. 2010-05-28 Helmut Eller --- /project/slime/cvsroot/slime/slime.el 2010/05/28 13:37:51 1.1325 +++ /project/slime/cvsroot/slime/slime.el 2010/05/28 13:55:30 1.1326 @@ -6875,18 +6875,17 @@ license) (loop for (key . value) in clauses append `(,key ,value)) `(progn - ,(when gnu-only-p + ,(when gnu-emacs-only `(eval-and-compile (assert (not (featurep 'xemacs)) () ,(concat (symbol-name name) " does not work with XEmacs.")))) - ,@(mapcar #'(lambda (d) `(require ',d)) slime-deps) + ,@(mapcar (lambda (d) `(require ',d)) slime-dependencies) (defun ,(intern (concat (symbol-name name) "-init")) () - ,@(mapcar #'(lambda (d) `(slime-require ',d)) swank-deps) - , at load-forms) + ,@(mapcar (lambda (d) `(slime-require ',d)) swank-dependencies) + , at on-load) (defun ,(intern (concat (symbol-name name) "-unload")) () - , at unload-forms) - (provide ',name)))) + , at on-unload)))) (put 'define-slime-contrib 'lisp-indent-function 1) (put 'slime-indulge-pretty-colors 'define-slime-contrib t) From heller at common-lisp.net Fri May 28 14:15:30 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 10:15:30 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv12957/contrib Modified Files: ChangeLog slime-c-p-c.el slime-fancy-inspector.el slime-fancy.el slime-fontifying-fu.el slime-fuzzy.el slime-package-fu.el slime-parse.el slime-presentations.el slime-references.el slime-repl.el slime-scratch.el Log Message: Call provide at the end of the file. * slime-c-p-c.el slime-fancy-inspector.el slime-fancy.el slime-fontifying-fu.el slime-fuzzy.el slime-package-fu.el slime-parse.el slime-presentations.el slime-references.el slime-repl.el slime-scratch.el: --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 10:49:35 1.386 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 14:15:30 1.387 @@ -1,5 +1,13 @@ 2010-05-28 Helmut Eller + * slime-c-p-c.el slime-fancy-inspector.el slime-fancy.el + slime-fontifying-fu.el slime-fuzzy.el slime-package-fu.el + slime-parse.el slime-presentations.el slime-references.el + slime-repl.el slime-scratch.el: Call provide at the end of the + file. + +2010-05-28 Helmut Eller + * swank-kawa.scm (wrap-compilation): Set Compilation.explict flag. (list-file): Add cast to resolve overloaded parse method. (disassemble-form): Update for change from 2010-05-18. --- /project/slime/cvsroot/slime/contrib/slime-c-p-c.el 2010/05/13 15:31:07 1.24 +++ /project/slime/cvsroot/slime/contrib/slime-c-p-c.el 2010/05/28 14:15:30 1.25 @@ -230,3 +230,6 @@ wished-completion (buffer-string) 'equal)) + +(provide 'slime-c-p-c) + --- /project/slime/cvsroot/slime/contrib/slime-fancy-inspector.el 2010/05/28 10:49:45 1.6 +++ /project/slime/cvsroot/slime/contrib/slime-fancy-inspector.el 2010/05/28 14:15:30 1.7 @@ -16,3 +16,5 @@ (interactive) (slime-eval-describe `(swank:disassemble-form ,(slime-definition-at-point t)))) + +(provide 'slime-fancy-inspector) \ No newline at end of file --- /project/slime/cvsroot/slime/contrib/slime-fancy.el 2010/05/13 15:31:07 1.12 +++ /project/slime/cvsroot/slime/contrib/slime-fancy.el 2010/05/28 14:15:30 1.13 @@ -26,4 +26,6 @@ (slime-scratch-init) (slime-references-init) (slime-package-fu-init) - (slime-fontifying-fu-init))) \ No newline at end of file + (slime-fontifying-fu-init))) + +(provide 'slime-fancy) --- /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el 2010/05/13 15:31:07 1.18 +++ /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el 2010/05/28 14:15:30 1.19 @@ -349,3 +349,4 @@ (slime-autodoc-mode -1)))) (setq lisp-mode-hook hook)))) +(provide 'slime-fontifying-fu) --- /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2010/05/13 15:31:07 1.19 +++ /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2010/05/28 14:15:30 1.20 @@ -581,3 +581,4 @@ configuration was changed, we nullify our saved configuration." (setq slime-fuzzy-saved-window-configuration nil)) +(provide 'slime-fuzzy) \ No newline at end of file --- /project/slime/cvsroot/slime/contrib/slime-package-fu.el 2010/05/13 15:31:07 1.9 +++ /project/slime/cvsroot/slime/contrib/slime-package-fu.el 2010/05/28 14:15:30 1.10 @@ -207,3 +207,5 @@ (message "Symbol `%s' now exported from `%s'" symbol package) (message "Symbol `%s' already exported from `%s'" symbol package)) (slime-export-symbol symbol package))))) + +(provide 'slime-package-fu) --- /project/slime/cvsroot/slime/contrib/slime-parse.el 2010/05/28 10:49:45 1.36 +++ /project/slime/cvsroot/slime/contrib/slime-parse.el 2010/05/28 14:15:30 1.37 @@ -396,3 +396,4 @@ (let ((state (slime-current-parser-state))) (or (nth 3 state) (nth 4 state)))) +(provide 'slime-parse) --- /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/13 15:31:07 1.35 +++ /project/slime/cvsroot/slime/contrib/slime-presentations.el 2010/05/28 14:15:30 1.36 @@ -841,3 +841,4 @@ (in-sldb-face local-value value) `(:frame-var ,slime-current-thread ,(car frame) ,index) t)) +(provide 'slime-presentations) \ No newline at end of file --- /project/slime/cvsroot/slime/contrib/slime-references.el 2010/05/13 15:31:07 1.6 +++ /project/slime/cvsroot/slime/contrib/slime-references.el 2010/05/28 14:15:30 1.7 @@ -140,3 +140,4 @@ ((:references references) (slime-insert-references references) t) (t nil))) +(provide 'slime-references) \ No newline at end of file --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/19 06:55:15 1.45 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2010/05/28 14:15:30 1.46 @@ -1905,4 +1905,4 @@ #\\X SWANK> " (buffer-string))))) - +(provide 'slime-repl) --- /project/slime/cvsroot/slime/contrib/slime-scratch.el 2010/05/13 15:31:07 1.7 +++ /project/slime/cvsroot/slime/contrib/slime-scratch.el 2010/05/28 14:15:30 1.8 @@ -40,3 +40,5 @@ (slime-define-keys slime-scratch-mode-map ("\C-j" 'slime-eval-print-last-expression)) + +(provide 'slime-scratch) From heller at common-lisp.net Fri May 28 19:13:17 2010 From: heller at common-lisp.net (CVS User heller) Date: Fri, 28 May 2010 15:13:17 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv25307/contrib Modified Files: ChangeLog slime-asdf.el slime-banner.el slime-clipboard.el slime-compiler-notes-tree.el slime-enclosing-context.el slime-highlight-edits.el slime-hyperdoc.el slime-indentation.el slime-mdot-fu.el slime-motd.el slime-mrepl.el slime-presentation-streams.el slime-sbcl-exts.el slime-snapshot.el slime-sprof.el slime-tramp.el slime-typeout-frame.el slime-xref-browser.el Log Message: Call provide at the end of the file. * slime-asdf.el slime-banner.el slime-clipboard.el slime-compiler-notes-tree.el slime-enclosing-context.el slime-highlight-edits.el slime-hyperdoc.el slime-indentation.el slime-mdot-fu.el slime-motd.el slime-mrepl.el slime-presentation-streams.el slime-sbcl-exts.el slime-snapshot.el slime-sprof.el slime-tramp.el slime-typeout-frame.el slime-xref-browser.el: --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 14:15:30 1.387 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 19:13:17 1.388 @@ -1,5 +1,17 @@ 2010-05-28 Helmut Eller + Call provide at the end of the file. + + * slime-asdf.el slime-banner.el slime-clipboard.el + slime-compiler-notes-tree.el slime-enclosing-context.el + slime-highlight-edits.el slime-hyperdoc.el slime-indentation.el + slime-mdot-fu.el slime-motd.el slime-mrepl.el + slime-presentation-streams.el slime-sbcl-exts.el slime-snapshot.el + slime-sprof.el slime-tramp.el slime-typeout-frame.el + slime-xref-browser.el: + +2010-05-28 Helmut Eller + * slime-c-p-c.el slime-fancy-inspector.el slime-fancy.el slime-fontifying-fu.el slime-fuzzy.el slime-package-fu.el slime-parse.el slime-presentations.el slime-references.el --- /project/slime/cvsroot/slime/contrib/slime-asdf.el 2010/05/13 15:31:07 1.31 +++ /project/slime/cvsroot/slime/contrib/slime-asdf.el 2010/05/28 19:13:17 1.32 @@ -297,4 +297,4 @@ (:handler 'slime-reload-system) (:one-liner "Recompile and load an ASDF system.")) - +(provide 'slime-asdf) --- /project/slime/cvsroot/slime/contrib/slime-banner.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-banner.el 2010/05/28 19:13:17 1.6 @@ -30,3 +30,5 @@ (if slime-startup-animation (animate-string welcome 0 0) (insert welcome))))) + +(provide 'slime-banner) --- /project/slime/cvsroot/slime/contrib/slime-clipboard.el 2010/05/13 15:31:07 1.7 +++ /project/slime/cvsroot/slime/contrib/slime-clipboard.el 2010/05/28 19:13:17 1.8 @@ -162,4 +162,4 @@ `(:sldb ,(sldb-frame-number-at-point) ,(sldb-var-number-at-point)))) - +(provide 'slime-clipboard) --- /project/slime/cvsroot/slime/contrib/slime-compiler-notes-tree.el 2010/05/13 15:31:07 1.6 +++ /project/slime/cvsroot/slime/contrib/slime-compiler-notes-tree.el 2010/05/28 19:13:17 1.7 @@ -179,3 +179,4 @@ (delete-char 1) (goto-char start-mark))) +(provide 'slime-compiler-notes-tree) --- /project/slime/cvsroot/slime/contrib/slime-enclosing-context.el 2010/05/13 15:31:07 1.8 +++ /project/slime/cvsroot/slime/contrib/slime-enclosing-context.el 2010/05/28 19:13:17 1.9 @@ -143,3 +143,5 @@ always (and (member name fn-names) (member arglist fn-arglists))))) ))) + +(provide 'slime-enclosing-context) --- /project/slime/cvsroot/slime/contrib/slime-highlight-edits.el 2010/05/14 14:34:22 1.6 +++ /project/slime/cvsroot/slime/contrib/slime-highlight-edits.el 2010/05/28 19:13:17 1.7 @@ -76,3 +76,4 @@ (skip-chars-forward " \n\t\r" end) (<= end (point)))) +(provide 'slime-highlight-edits) --- /project/slime/cvsroot/slime/contrib/slime-hyperdoc.el 2010/05/14 14:34:22 1.3 +++ /project/slime/cvsroot/slime/contrib/slime-hyperdoc.el 2010/05/28 19:13:17 1.4 @@ -40,3 +40,5 @@ (if (memq :hyperdoc (slime-lisp-features)) (slime-hyperdoc-lookup-rpc symbol-name) (slime-hyperspec-lookup symbol-name))) + +(provide 'slime-hyperdoc) --- /project/slime/cvsroot/slime/contrib/slime-indentation.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-indentation.el 2010/05/28 19:13:17 1.6 @@ -1163,3 +1163,5 @@ ;; Define STIL constructs, this should be discarded with the ;; introduction of mode-specific indentation methods. ;; + +(provide 'slime-indentation) --- /project/slime/cvsroot/slime/contrib/slime-mdot-fu.el 2010/05/13 15:31:07 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-mdot-fu.el 2010/05/28 19:13:17 1.5 @@ -67,5 +67,4 @@ (slime-check "Check that we are at the local definition." (looking-at (regexp-quote target-regexp)))))) - - +(provide 'slime-mdot-fu) --- /project/slime/cvsroot/slime/contrib/slime-motd.el 2010/05/13 15:31:07 1.3 +++ /project/slime/cvsroot/slime/contrib/slime-motd.el 2010/05/28 19:13:17 1.4 @@ -28,3 +28,4 @@ (when motd (slime-repl-insert-result (list :values motd)))))) +(provide 'slime-motd) --- /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2010/05/14 14:34:22 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-mrepl.el 2010/05/28 19:13:17 1.6 @@ -128,3 +128,4 @@ (slime-repl-show-maximum-output))) channel)))) +(provide 'slime-mrepl) --- /project/slime/cvsroot/slime/contrib/slime-presentation-streams.el 2010/05/13 15:31:07 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-presentation-streams.el 2010/05/28 19:13:17 1.5 @@ -8,3 +8,4 @@ (:license "GPL") (:swank-dependencies swank-presentation-streams)) +(provide 'slime-presentation-streams) --- /project/slime/cvsroot/slime/contrib/slime-sbcl-exts.el 2010/05/13 15:31:07 1.6 +++ /project/slime/cvsroot/slime/contrib/slime-sbcl-exts.el 2010/05/28 19:13:17 1.7 @@ -28,3 +28,5 @@ (interactive (list (slime-read-sbcl-bug "Bug number (#nnnnnn): "))) (browse-url (format "http://bugs.launchpad.net/sbcl/+bug/%s" (substring bug 1)))) + +(provide 'slime-sbcl-exts) --- /project/slime/cvsroot/slime/contrib/slime-snapshot.el 2010/05/14 14:34:22 1.4 +++ /project/slime/cvsroot/slime/contrib/slime-snapshot.el 2010/05/28 19:13:17 1.5 @@ -19,3 +19,5 @@ ,(expand-file-name filename)) nil t nil) (slime-connection))) + +(provide 'slime-snapshot) --- /project/slime/cvsroot/slime/contrib/slime-sprof.el 2010/05/13 15:31:07 1.10 +++ /project/slime/cvsroot/slime/contrib/slime-sprof.el 2010/05/28 19:13:17 1.11 @@ -208,3 +208,5 @@ (ding)) (t (slime-show-source-location source-location)))))))) + +(provide 'slime-sprof) --- /project/slime/cvsroot/slime/contrib/slime-tramp.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-tramp.el 2010/05/28 19:13:17 1.6 @@ -103,3 +103,5 @@ (defun slime-tramp-from-lisp-filename (filename) (funcall (second (slime-find-filename-translators (slime-machine-instance))) filename)) + +(provide 'slime-tramp) --- /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2010/05/13 15:31:07 1.10 +++ /project/slime/cvsroot/slime/contrib/slime-typeout-frame.el 2010/05/28 19:13:17 1.11 @@ -95,4 +95,4 @@ (t (list 75 nil)))) - +(provide 'slime-typeout-frame) --- /project/slime/cvsroot/slime/contrib/slime-xref-browser.el 2010/05/13 15:31:07 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-xref-browser.el 2010/05/28 19:13:17 1.6 @@ -94,3 +94,4 @@ (widget-create 'tree-widget :tag name :xref-type type :xref-dspec name :expander 'slime-expand-xrefs :has-echildren t)))) +(provide 'slime-xref-browser) From sboukarev at common-lisp.net Sat May 29 05:40:18 2010 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 29 May 2010 01:40:18 -0400 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv3731 Modified Files: ChangeLog swank-fancy-inspector.lisp Log Message: * swank-fancy-inspector.lisp (emacs-inspect): Add [finalize] button for not finalized classes. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/28 19:13:17 1.388 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2010/05/29 05:40:18 1.389 @@ -1,3 +1,8 @@ +2010-05-29 Stas Boukarev + + * swank-fancy-inspector.lisp (emacs-inspect): Add [finalize] + button for not finalized classes. + 2010-05-28 Helmut Eller Call provide at the end of the file. --- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2010/05/14 03:20:04 1.27 +++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2010/05/29 05:40:18 1.28 @@ -450,7 +450,9 @@ (lambda (slot) `(:value ,slot ,(inspector-princ (swank-mop:slot-definition-name slot))))) - '("#")) + `("# " + (:action "[finalize]" + ,(lambda () (swank-mop:finalize-inheritance class))))) (:newline) ,@(let ((doc (documentation class t))) (when doc