From sboukarev at common-lisp.net Sat Oct 1 01:35:42 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 30 Sep 2011 18:35:42 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv23830 Modified Files: ChangeLog swank-asdf.lisp Log Message: * swank-asdf.lisp (xref-doit): Guard against using on things other than symbols and strings. slime-edit-uses may call it on (setf function), and it'll pop into the debugger. Report by Bart Botta. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/09/12 16:23:59 1.492 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 01:35:42 1.493 @@ -1,3 +1,10 @@ +2011-10-01 Stas Boukarev + + * swank-asdf.lisp (xref-doit): Guard against using on things + other than symbols and strings. slime-edit-uses may call it on + (setf function), and it'll pop into the debugger. + Report by Bart Botta. + 2011-09-12 Christophe Rhodes * slime-media.el (slime-dispatch-media-event): allow swank to --- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2010/07/04 15:55:29 1.30 +++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2011/10/01 01:35:42 1.31 @@ -38,15 +38,16 @@ result))) (defmethod xref-doit ((type (eql :depends-on)) thing) - (loop for dependency in (who-depends-on thing) - for asd-file = (asdf:system-definition-pathname dependency) - when asd-file + (when (typep thing '(or string symbol)) + (loop for dependency in (who-depends-on thing) + for asd-file = (asdf:system-definition-pathname dependency) + when asd-file collect (list dependency (swank-backend::make-location `(:file ,(namestring asd-file)) `(:position 1) `(:snippet ,(format nil "(defsystem :~A" dependency) - :align t))))) + :align t)))))) (defslimefun operate-on-system-for-emacs (system-name operation &rest keywords) From sboukarev at common-lisp.net Sat Oct 1 02:32:59 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 30 Sep 2011 19:32:59 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv32664 Modified Files: ChangeLog slime-fuzzy.el Log Message: * slime-fuzzy.el (slime-fuzzy-done): Fix completion in the minibuffer. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 01:35:42 1.493 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 02:32:58 1.494 @@ -1,5 +1,9 @@ 2011-10-01 Stas Boukarev + * slime-fuzzy.el (slime-fuzzy-done): Fix completion in the minibuffer. + +2011-10-01 Stas Boukarev + * swank-asdf.lisp (xref-doit): Guard against using on things other than symbols and strings. slime-edit-uses may call it on (setf function), and it'll pop into the debugger. --- /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2010/10/15 16:16:11 1.22 +++ /project/slime/cvsroot/slime/contrib/slime-fuzzy.el 2011/10/01 02:32:58 1.23 @@ -328,6 +328,11 @@ (setq slime-fuzzy-text text) (goto-char slime-fuzzy-end))))) +(defun slime-minibuffer-p (buffer) + (if (featurep 'xemacs) + (eq buffer (window-buffer (minibuffer-window))) + (minibufferp buffer))) + (defun slime-fuzzy-choices-buffer (completions interrupted-p start end) "Creates (if neccessary), populates, and pops up the *Fuzzy Completions* buffer with the completions from `completions' and @@ -361,10 +366,7 @@ (setq buffer-quit-function 'slime-fuzzy-abort)) ; M-Esc Esc (when slime-fuzzy-completion-in-place ;; switch back to the original buffer - (if (if (featurep 'xemacs) - (eq (window-buffer (minibuffer-window)) - slime-fuzzy-target-buffer) - (minibufferp slime-fuzzy-target-buffer)) + (if (slime-minibuffer-p slime-fuzzy-target-buffer) (select-window (minibuffer-window)) (switch-to-buffer-other-window slime-fuzzy-target-buffer))))) @@ -555,7 +557,9 @@ ;; completions buffer and let something else fill it in. (pop-to-buffer (slime-get-fuzzy-buffer)) (bury-buffer)) - (pop-to-buffer slime-fuzzy-target-buffer) + (if (slime-minibuffer-p slime-fuzzy-target-buffer) + (select-window (minibuffer-window)) + (pop-to-buffer slime-fuzzy-target-buffer)) (goto-char slime-fuzzy-end) (setq slime-fuzzy-target-buffer nil) (remove-hook 'window-configuration-change-hook From sboukarev at common-lisp.net Sat Oct 1 19:45:54 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Sat, 01 Oct 2011 12:45:54 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv24584 Modified Files: ChangeLog slime-repl.el Log Message: * slime-repl.el (slime-repl-set-package): Don't redisplay the prompt if it doesn't change. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 02:32:58 1.494 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 19:45:54 1.495 @@ -1,5 +1,10 @@ 2011-10-01 Stas Boukarev + * slime-repl.el (slime-repl-set-package): Don't redisplay the + prompt if it doesn't change. + +2011-10-01 Stas Boukarev + * slime-fuzzy.el (slime-fuzzy-done): Fix completion in the minibuffer. 2011-10-01 Stas Boukarev --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/08/30 15:34:10 1.54 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/10/01 19:45:54 1.55 @@ -899,13 +899,15 @@ (p (and (not (equal p (slime-lisp-package))) p))) (slime-read-package-name "Package: " p)))) (with-current-buffer (slime-output-buffer) - (let ((previouse-point (- (point) slime-repl-input-start-mark))) + (let ((previouse-point (- (point) slime-repl-input-start-mark)) + (previous-prompt (slime-lisp-package-prompt-string))) (destructuring-bind (name prompt-string) (slime-repl-shortcut-eval `(swank:set-package ,package)) (setf (slime-lisp-package) name) - (setf (slime-lisp-package-prompt-string) prompt-string) (setf slime-buffer-package name) - (slime-repl-insert-prompt) + (unless (equal previous-prompt prompt-string) + (setf (slime-lisp-package-prompt-string) prompt-string) + (slime-repl-insert-prompt)) (when (plusp previouse-point) (goto-char (+ previouse-point slime-repl-input-start-mark))))))) From sboukarev at common-lisp.net Wed Oct 5 11:21:40 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 04:21:40 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv32742 Modified Files: ChangeLog Log Message: * swank-asdf.lisp (asdf-system-directory): preserve pathname-device and use NAMESTRING for final conversion, so both device and directory are passed to SLIME. It is required e.g. on MS Windows with implementations using PATHNAME-DEVICE for drive letters (SBCL); intended to be portable and useful on every platform where DEVICE is important. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/01 19:45:54 1.495 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 11:21:40 1.496 @@ -1,3 +1,12 @@ +2011-10-05 Anton Kovalenko + + * swank-asdf.lisp (asdf-system-directory): preserve + pathname-device and use NAMESTRING for final conversion, so both + device and directory are passed to SLIME. It is required e.g. on + MS Windows with implementations using PATHNAME-DEVICE for drive + letters (SBCL); intended to be portable and useful on every + platform where DEVICE is important. + 2011-10-01 Stas Boukarev * slime-repl.el (slime-repl-set-package): Don't redisplay the From sboukarev at common-lisp.net Wed Oct 5 11:22:21 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 04:22:21 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv331 Modified Files: swank-asdf.lisp Log Message: * swank-asdf.lisp (asdf-system-directory): preserve pathname-device and use NAMESTRING for final conversion, so both device and directory are passed to SLIME. It is required e.g. on MS Windows with implementations using PATHNAME-DEVICE for drive letters (SBCL); intended to be portable and useful on every platform where DEVICE is important. --- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2011/10/01 01:35:42 1.31 +++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp 2011/10/05 11:22:21 1.32 @@ -141,9 +141,12 @@ t)) (defslimefun asdf-system-directory (name) - (cl:directory-namestring - (cl:truename - (asdf:system-definition-pathname (asdf:find-system name))))) + (let ((truename + (truename + (asdf:system-definition-pathname (asdf:find-system name))))) + (namestring + (make-pathname :device (pathname-device truename) + :directory (pathname-directory truename))))) (defun system-contains-file-p (module pathname pathname-name) (some #'(lambda (component) From sboukarev at common-lisp.net Wed Oct 5 11:58:00 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 04:58:00 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv4209 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (clear-repl-variables): New functions, clears *, /, and + variables. * contrib/slime-repl.el (slime-clear-repl-variables): New function, clears *, /, and + variables. (slime-repl-clear-buffer-hook): Add `slime-clear-repl-variables' to it, now C-c M-o clears variables, allowing bound objects to be GCed. --- /project/slime/cvsroot/slime/ChangeLog 2011/09/28 16:49:53 1.2217 +++ /project/slime/cvsroot/slime/ChangeLog 2011/10/05 11:58:00 1.2218 @@ -1,3 +1,8 @@ +2011-10-05 Stas Boukarev + + * swank.lisp (clear-repl-variables): New functions, clears *, /, + and + variables. + 2011-09-28 Stas Boukarev * slime.el: Remove (require 'hideshow), it's not used anymore. --- /project/slime/cvsroot/slime/swank.lisp 2011/08/17 15:40:47 1.752 +++ /project/slime/cvsroot/slime/swank.lisp 2011/10/05 11:58:00 1.753 @@ -2260,6 +2260,11 @@ (funcall *send-repl-results-function* values)))))) nil) +(defslimefun clear-repl-variables () + (let ((variables '(*** ** * /// // / +++ ++ +))) + (loop for variable in variables + do (setf (symbol-value variable) nil)))) + (defun track-package (fun) (let ((p *package*)) (unwind-protect (funcall fun) From sboukarev at common-lisp.net Wed Oct 5 11:58:00 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 04:58:00 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv4209/contrib Modified Files: ChangeLog slime-repl.el Log Message: * swank.lisp (clear-repl-variables): New functions, clears *, /, and + variables. * contrib/slime-repl.el (slime-clear-repl-variables): New function, clears *, /, and + variables. (slime-repl-clear-buffer-hook): Add `slime-clear-repl-variables' to it, now C-c M-o clears variables, allowing bound objects to be GCed. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 11:21:40 1.496 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 11:58:00 1.497 @@ -1,3 +1,10 @@ +2011-10-05 Stas Boukarev + + * slime-repl.el (slime-clear-repl-variables): New function, clears *, /, + and + variables. + (slime-repl-clear-buffer-hook): Add `slime-clear-repl-variables' + to it, now C-c M-o clears variables, allowing bound objects to be GCed. + 2011-10-05 Anton Kovalenko * swank-asdf.lisp (asdf-system-directory): preserve --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/10/01 19:45:54 1.55 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/10/05 11:58:00 1.56 @@ -863,8 +863,14 @@ (goto-char slime-repl-input-start-mark) (line-beginning-position))) +(defun slime-clear-repl-variables () + (interactive) + (slime-eval-async `(swank:clear-repl-variables))) + (defvar slime-repl-clear-buffer-hook) +(add-hook 'slime-repl-clear-buffer-hook 'slime-clear-repl-variables) + (defun slime-repl-clear-buffer () "Delete the output generated by the Lisp process." (interactive) From sboukarev at common-lisp.net Wed Oct 5 13:54:19 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 06:54:19 -0700 Subject: [slime-cvs] CVS slime/doc Message-ID: Update of /project/slime/cvsroot/slime/doc In directory tiger.common-lisp.net:/tmp/cvs-serv22026 Modified Files: .cvsignore Log Message: doc/.cvsignore: Add slime.html and html. --- /project/slime/cvsroot/slime/doc/.cvsignore 2006/07/24 14:13:23 1.1 +++ /project/slime/cvsroot/slime/doc/.cvsignore 2011/10/05 13:54:19 1.2 @@ -13,3 +13,5 @@ slime.toc slime.tp slime.vr +slime.html +html From sboukarev at common-lisp.net Wed Oct 5 14:17:59 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Wed, 05 Oct 2011 07:17:59 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv25592 Modified Files: ChangeLog slime-autodoc.el swank-arglists.lisp Log Message: * slime-autodoc.el (slime-autodoc): Don't cache variable values. (slime-autodoc-global-at-point): Remove, unused. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 11:58:00 1.497 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 14:17:59 1.498 @@ -1,5 +1,10 @@ 2011-10-05 Stas Boukarev + * slime-autodoc.el (slime-autodoc): Don't cache variable values. + (slime-autodoc-global-at-point): Remove, unused. + +2011-10-05 Stas Boukarev + * slime-repl.el (slime-clear-repl-variables): New function, clears *, /, and + variables. (slime-repl-clear-buffer-hook): Add `slime-clear-repl-variables' --- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2010/09/18 20:47:29 1.47 +++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2011/10/05 14:17:59 1.48 @@ -58,7 +58,7 @@ (let ((name (etypecase name (string name) (symbol (symbol-name name))))) - (slime-eval `(swank:autodoc '(,name ,slime-cursor-marker))))) + (car (slime-eval `(swank:autodoc '(,name ,slime-cursor-marker)))))) ;;;; Autodocs (automatic context-sensitive help) @@ -73,24 +73,6 @@ :print-right-margin ,(window-width (minibuffer-window))))))) -(defun slime-autodoc-global-at-point () - "Return the global variable name at point, if any." - (when-let (name (slime-symbol-at-point)) - (and (slime-global-variable-name-p name) name))) - -(defcustom slime-global-variable-name-regexp "^\\(.*:\\)?\\([*+]\\).+\\2$" - "Regexp used to check if a symbol name is a global variable. - -Default value assumes +this+ or *that* naming conventions." - :type 'regexp - :group 'slime) - -(defun slime-global-variable-name-p (name) - "Is NAME a global variable? -Globals are recognised purely by *this-naming-convention*." - (and (< (length name) 80) ; avoid overflows in regexp matcher - (string-match slime-global-variable-name-regexp name))) - ;;;; Autodoc cache @@ -174,12 +156,14 @@ (lexical-let ((cache-key cache-key) (multilinep multilinep)) (lambda (doc) - (unless (eq doc :not-available) - (slime-store-into-autodoc-cache cache-key doc) - ;; Now that we've got our information, - ;; get it to the user ASAP. - (eldoc-message - (slime-format-autodoc doc multilinep)))))) + (destructuring-bind (doc cache-p) doc + (unless (eq doc :not-available) + (when cache-p + (slime-store-into-autodoc-cache cache-key doc)) + ;; Now that we've got our information, + ;; get it to the user ASAP. + (eldoc-message + (slime-format-autodoc doc multilinep))))))) nil)))))))) (defvar slime-autodoc-cache-car nil) @@ -243,7 +227,7 @@ (defun slime-autodoc-to-string () "Retrieve and return autodoc for form at point." - (let ((autodoc (slime-eval (second (slime-make-autodoc-rpc-form))))) + (let ((autodoc (car (slime-eval (second (slime-make-autodoc-rpc-form)))))) (if (eq autodoc :not-available) :not-available (slime-canonicalize-whitespace autodoc)))) --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2010/09/18 09:34:06 1.70 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2011/10/05 14:17:59 1.71 @@ -1085,9 +1085,12 @@ ;;; considered. (defslimefun autodoc (raw-form &key print-right-margin) - "Return a string representing the arglist for the deepest subform in + "Return a list of two elements. +First, a string representing the arglist for the deepest subform in RAW-FORM that does have an arglist. The highlighted parameter is -wrapped in ===> X <===." +wrapped in ===> X <===. + +Second, a boolean value telling whether the returned string can be cached." (handler-bind ((serious-condition #'(lambda (c) (unless (debug-on-swank-error) @@ -1098,16 +1101,18 @@ (multiple-value-bind (form arglist obj-at-cursor form-path) (find-subform-with-arglist (parse-raw-form raw-form)) (cond ((boundp-and-interesting obj-at-cursor) - (print-variable-to-string obj-at-cursor)) + (list (print-variable-to-string obj-at-cursor) nil)) (t - (with-available-arglist (arglist) arglist - (decoded-arglist-to-string - arglist - :print-right-margin print-right-margin - :operator (car form) - :highlight (form-path-to-arglist-path form-path - form - arglist))))))))) + (list + (with-available-arglist (arglist) arglist + (decoded-arglist-to-string + arglist + :print-right-margin print-right-margin + :operator (car form) + :highlight (form-path-to-arglist-path form-path + form + arglist))) + t))))))) (defun boundp-and-interesting (symbol) (and symbol From sboukarev at common-lisp.net Fri Oct 7 12:50:20 2011 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 07 Oct 2011 05:50:20 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv29894 Modified Files: ChangeLog slime-repl.el Log Message: * slime-repl.el (slime-repl-clear-output): Fix clearing output when there's something entered after the prompt. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/05 14:17:59 1.498 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/07 12:50:20 1.499 @@ -1,3 +1,8 @@ +2011-10-07 Stas Boukarev + + * slime-repl.el (slime-repl-clear-output): Fix clearing output + when there's something entered after the prompt. + 2011-10-05 Stas Boukarev * slime-autodoc.el (slime-autodoc): Don't cache variable values. --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/10/05 11:58:00 1.56 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2011/10/07 12:50:20 1.57 @@ -885,11 +885,13 @@ (defun slime-repl-clear-output () "Delete the output inserted since the last input." (interactive) - (let ((start (save-excursion - (slime-repl-previous-prompt) - (ignore-errors (forward-sexp)) - (forward-line) - (point))) + (let ((start (save-excursion + (when (>= (point) slime-repl-input-start-mark) + (goto-char slime-repl-input-start-mark)) + (slime-repl-previous-prompt) + (ignore-errors (forward-sexp)) + (forward-line) + (point))) (end (1- (slime-repl-input-line-beginning-position)))) (when (< start end) (let ((inhibit-read-only t)) From heller at common-lisp.net Thu Oct 13 09:24:03 2011 From: heller at common-lisp.net (CVS User heller) Date: Thu, 13 Oct 2011 02:24:03 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv14281 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (all-completions): Remove mixed case syms e.g |Foo|. "fo" is not a prefix of "|Foo|" and it would be problematic later. --- /project/slime/cvsroot/slime/ChangeLog 2011/10/05 11:58:00 1.2218 +++ /project/slime/cvsroot/slime/ChangeLog 2011/10/13 09:24:02 1.2219 @@ -1,3 +1,8 @@ +2011-10-13 Helmut Eller + + * swank.lisp (all-completions): Remove mixed case syms e.g |Foo|. + "fo" is not a prefix of "|Foo|" and it would be problematic later. + 2011-10-05 Stas Boukarev * swank.lisp (clear-repl-variables): New functions, clears *, /, --- /project/slime/cvsroot/slime/swank.lisp 2011/10/05 11:58:00 1.753 +++ /project/slime/cvsroot/slime/swank.lisp 2011/10/13 09:24:03 1.754 @@ -3050,8 +3050,12 @@ ((not pname) (guess-buffer-package package)) (t (guess-package pname)))) (test (lambda (sym) (prefix-match-p name (symbol-name sym)))) - (syms (and pkg (matching-symbols pkg extern test)))) - (format-completion-set (mapcar #'unparse-symbol syms) intern pname)))) + (syms (and pkg (matching-symbols pkg extern test))) + (strings (loop for sym in syms + for str = (unparse-symbol sym) + when (prefix-match-p name str) ; remove |Foo| + collect str))) + (format-completion-set strings intern pname)))) (defun matching-symbols (package external test) (let ((test (if external From heller at common-lisp.net Wed Oct 19 09:47:57 2011 From: heller at common-lisp.net (CVS User heller) Date: Wed, 19 Oct 2011 02:47:57 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv27546 Modified Files: ChangeLog swank-allegro.lisp Log Message: * swank-allegro.lisp (frob-allegro-field-def): Add missing type to ecase for inspector. Patch from Andrew Myers. --- /project/slime/cvsroot/slime/ChangeLog 2011/10/13 09:24:02 1.2219 +++ /project/slime/cvsroot/slime/ChangeLog 2011/10/19 09:47:57 1.2220 @@ -1,3 +1,8 @@ +2011-10-19 Andrew Myers + + * swank-allegro.lisp (frob-allegro-field-def): Add missing type to + ecase for inspector. + 2011-10-13 Helmut Eller * swank.lisp (all-completions): Remove mixed case syms e.g |Foo|. --- /project/slime/cvsroot/slime/swank-allegro.lisp 2011/08/17 15:40:47 1.144 +++ /project/slime/cvsroot/slime/swank-allegro.lisp 2011/10/19 09:47:57 1.145 @@ -720,8 +720,8 @@ (with-struct (inspect::field-def- name type access) def (ecase type ((:unsigned-word :unsigned-byte :unsigned-natural - :unsigned-long :unsigned-half-long - :unsigned-3byte) + :unsigned-long :unsigned-half-long + :unsigned-3byte :unsigned-long32) (label-value-line name (inspect::component-ref-v object access type))) ((:lisp :value :func) (label-value-line name (inspect::component-ref object access))) From nsiivola at common-lisp.net Sat Oct 29 11:15:15 2011 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Sat, 29 Oct 2011 04:15:15 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv6630/contrib Modified Files: ChangeLog slime-cl-indent-test.txt slime-cl-indent.el Log Message: slime-indent: two patches from Tomohiro Matsuyama * slime-cl-indent.el (define-common-lisp-style): Fix handling of :documentation option, which accidentally threw out the docstring. (lisp-indent-lambda-list-keywords-regexp): Handle trailing &allow-other-keys correctly. * slime-cl-indent-test.txt: Tests 50-53. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/07 12:50:20 1.499 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/29 11:15:15 1.500 @@ -1,3 +1,14 @@ +2011-10-29 Nikodemus Siivola + + Two patches by Tomohiro Matsuyama . + + * slime-cl-indent.el (define-common-lisp-style): Fix handling + of :documentation option, which accidentally threw out the docstring. + (lisp-indent-lambda-list-keywords-regexp): Handle trailing + &allow-other-keys correctly. + + * slime-cl-indent-test.txt: Tests 50-53. + 2011-10-07 Stas Boukarev * slime-repl.el (slime-repl-clear-output): Fix clearing output --- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/07/27 16:45:37 1.10 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/10/29 11:15:15 1.11 @@ -532,3 +532,51 @@ (foo)) (t (foo) (bar))) + +;;; Test: 50 +;; +;; lisp-lambda-list-keyword-parameter-alignment: nil +;; lisp-lambda-list-keyword-alignment: nil + +(defun foo (x &optional opt1 + opt2 + &rest rest + &allow-other-keys) + (list opt1 opt2 + rest)) + +;;; Test: 51 +;; +;; lisp-lambda-list-keyword-parameter-alignment: t +;; lisp-lambda-list-keyword-alignment: nil + +(defun foo (x &optional opt1 + opt2 + &rest rest + &allow-other-keys) + (list opt1 opt2 + rest)) + +;;; Test: 52 +;; +;; lisp-lambda-list-keyword-parameter-alignment: nil +;; lisp-lambda-list-keyword-alignment: t + +(defun foo (x &optional opt1 + opt2 + &rest rest + &allow-other-keys) + (list opt1 opt2 + rest)) + +;;; Test: 53 +;; +;; lisp-lambda-list-keyword-parameter-alignment: t +;; lisp-lambda-list-keyword-alignment: t + +(defun foo (x &optional opt1 + opt2 + &rest rest + &allow-other-keys) + (list opt1 opt2 + rest)) --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/07/27 16:45:37 1.49 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/29 11:15:15 1.50 @@ -402,8 +402,8 @@ option should cope with that. " (when (consp documentation) - (setq documentation nil - options (cons documentation options))) + (setq options (cons documentation options) + documentation nil)) `(common-lisp-add-style ,name ',(cadr (assoc :inherit options)) ',(cdr (assoc :variables options)) @@ -928,7 +928,7 @@ (defvar lisp-indent-lambda-list-keywords-regexp "&\\(\ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\\|more\ -\\)\\([ \t]\\|$\\)" +\\)\\_>" "Regular expression matching lambda-list keywords.") (defun lisp-indent-lambda-list From nsiivola at common-lisp.net Mon Oct 31 09:44:59 2011 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Mon, 31 Oct 2011 02:44:59 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv10172/contrib Modified Files: ChangeLog slime-cl-indent.el Log Message: slime-indent: add !DEF-TYPE-TRANSLATOR indentation to "sbcl" style --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/29 11:15:15 1.500 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:44:59 1.501 @@ -1,3 +1,7 @@ +2011-10-31 Nikodemus Siivola + + * slime-cl-indent.el (style "sbcl"): Indentation for !DEF-TYPE-TRANSLATOR. + 2011-10-29 Nikodemus Siivola Two patches by Tomohiro Matsuyama . --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/29 11:15:15 1.50 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:44:59 1.51 @@ -481,7 +481,8 @@ (def!struct (as defstruct)) (def!type (as deftype)) (defmacro-mundanely (as defmacro)) - (define-source-transform (as defun)))) + (define-source-transform (as defun)) + (!def-type-translator (as defun)))) (defcustom common-lisp-style-default nil "Name of the Common Lisp indentation style to use in lisp-mode buffers if From nsiivola at common-lisp.net Mon Oct 31 09:45:45 2011 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Mon, 31 Oct 2011 02:45:45 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv11550/contrib Modified Files: ChangeLog slime-cl-indent-test.txt slime-cl-indent.el Log Message: slime-indent: improve indentation of comments in LOOPs --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:44:59 1.501 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:45:45 1.502 @@ -1,5 +1,21 @@ 2011-10-31 Nikodemus Siivola + Improve indentation of comments inside LOOP. + + * slime-cl-indent-test.txt: New tests 54-63. + + * slime-cl-indent.el (common-lisp-loop-type): Deal with comments + at the start of the loop, add simple/split type. + + * slime-cl-indent.el (lisp-indent-loop): Use + common-lisp-loop-part-indentation for simple loops regardless of + the value of lisp-loop-indent-subclauses. + + * slime-cl-indent.el (common-lisp-loop-part-indentation): Handle the + new simple/split type, improve comment indentation logic. + +2011-10-31 Nikodemus Siivola + * slime-cl-indent.el (style "sbcl"): Indentation for !DEF-TYPE-TRANSLATOR. 2011-10-29 Nikodemus Siivola --- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/10/29 11:15:15 1.11 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2011/10/31 09:45:45 1.12 @@ -580,3 +580,90 @@ &allow-other-keys) (list opt1 opt2 rest)) + +;;; Test: 54 +;; + +(loop (foo) + ;; comment + (bar) + (quux)) + +;;; Test: 55 +;; + +(loop ;; comment + (foo) + (bar)) + +;;; Test: 56 +;; + +(loop + (foo) + ;; comment + (bar)) + + +;;; Test: 57 +;; + +(loop + ;; comment + (foo) + (bar)) + +;;; Test: 58 +;; +;; lisp-loop-indent-subclauses: t + +(loop ;; comment at toplevel of the loop + with foo = t + do (foo foo) + (foo)) + +;;; Test: 59 +;; +;; lisp-loop-indent-subclauses: nil + +(loop ;; comment at toplevel of the loop + with foo = t + do (foo foo) + (foo)) + +;;; Test: 60 +;; +;; lisp-loop-indent-subclauses: t + +(loop + ;; comment at toplevel of the loop + with foo = t + do (foo foo)) + +;;; Test: 61 +;; +;; lisp-loop-indent-subclauses: nil + +(loop + ;; comment at toplevel of the loop + with foo = t + do (foo foo) + (foo)) + +;;; Test: 62 +;; +;; lisp-loop-indent-subclauses: t + +(loop with foo = t + do (foo foo) + ;; comment inside clause + (bar)) + +;;; Test: 63 +;; +;; lisp-loop-indent-subclauses: nil + +(loop with foo = t + do (foo foo) + ;; comment inside clause + (bar)) --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:44:59 1.51 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:45:45 1.52 @@ -578,39 +578,54 @@ (defun common-lisp-loop-type (loop-start) "Returns the type of the loop form at LOOP-START. -Possible types are SIMPLE, EXTENDED, and EXTENDED/SPLIT. -EXTENDED/SPLIT refers to extended loops whose body does -not start on the same line as the opening parenthesis of -the loop." - (condition-case () - (save-excursion - (goto-char loop-start) - (let ((line (line-number-at-pos))) - (forward-char 1) - (forward-sexp 2) - (backward-sexp 1) - (if (looking-at "\\sw") - (if (= line (line-number-at-pos)) - 'extended - 'extended/split) - 'simple))) - (error 'simple))) +Possible types are SIMPLE, SIMPLE/SPLIT, EXTENDED, and EXTENDED/SPLIT. */SPLIT +refers to extended loops whose body does not start on the same line as the +opening parenthesis of the loop." + (let (comment-split) + (condition-case () + (save-excursion + (goto-char loop-start) + (let ((line (line-number-at-pos)) + (maybe-split t)) + (forward-char 1) + (forward-sexp 1) + (save-excursion + (when (looking-at "\\s-*\\\n*;") + (search-forward ";") + (backward-char 1) + (if (= line (line-number-at-pos)) + (setq maybe-split nil) + (setq comment-split t)))) + (forward-sexp 1) + (backward-sexp 1) + (if (looking-at "\\sw") + (if (or (not maybe-split) (= line (line-number-at-pos))) + 'extended + 'extended/split) + (if (or (not maybe-split) (= line (line-number-at-pos))) + 'simple + 'simple/split)))) + (error + (if comment-split + 'simple/split + 'simple))))) -(defun common-lisp-loop-part-indentation (indent-point state) +(defun common-lisp-loop-part-indentation (indent-point state type) "Compute the indentation of loop form constituents." (let* ((loop-start (elt state 1)) - (type (common-lisp-loop-type loop-start)) (loop-indentation (save-excursion (goto-char loop-start) - (if (eq 'extended/split type) + (if (eq type 'extended/split) (- (current-column) 4) (current-column)))) (indent nil) - (re "\\(:?\\sw+\\|;\\|)\\|\n\\)")) + (re "\\(:?\\sw+\\|)\\|\n\\)")) (goto-char indent-point) (back-to-indentation) - (cond ((eq 'simple type) + (cond ((eq type 'simple/split) (+ loop-indentation lisp-simple-loop-indentation)) + ((eq type 'simple) + (+ loop-indentation 6)) ;; We are already in a body, with forms in it. ((and (not (looking-at re)) (save-excursion @@ -621,8 +636,8 @@ (looking-at common-lisp-indent-body-introducing-loop-macro-keyword)) t))) (list indent loop-start)) - ;; Keyword-style - ((or lisp-loop-indent-forms-like-keywords (looking-at re)) + ;; Keyword-style or comment outside body + ((or lisp-loop-indent-forms-like-keywords (looking-at re) (looking-at ";")) (list (+ loop-indentation 6) loop-start)) ;; Form-style (t @@ -1213,13 +1228,15 @@ (error (+ sexp-column lisp-body-indent))))) (defun lisp-indent-loop (path state indent-point sexp-column normal-indent) - (cond ((not (null (cdr path))) - normal-indent) - (lisp-loop-indent-subclauses - (list (common-lisp-indent-loop-macro-1 state indent-point) - (common-lisp-indent-parse-state-start state))) - (t - (common-lisp-loop-part-indentation indent-point state)))) + (if (cdr path) + normal-indent + (let* ((loop-start (elt state 1)) + (type (common-lisp-loop-type loop-start))) + (cond ((and lisp-loop-indent-subclauses (member type '(extended extended/split))) + (list (common-lisp-indent-loop-macro-1 state indent-point) + (common-lisp-indent-parse-state-start state))) + (t + (common-lisp-loop-part-indentation indent-point state type)))))) ;;;; LOOP indentation, the complex version -- handles subclause indentation From nsiivola at common-lisp.net Mon Oct 31 09:46:16 2011 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Mon, 31 Oct 2011 02:46:16 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv11762/contrib Modified Files: ChangeLog slime-cl-indent.el Log Message: slime-indent: make it possible to run only a specific test Useful for debugging. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:45:45 1.502 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:46:16 1.503 @@ -1,5 +1,10 @@ 2011-10-31 Nikodemus Siivola + * slime-cl-indent.el (common-lisp-run-indentation-tests): Make it + possible to run only a specific test. + +2011-10-31 Nikodemus Siivola + Improve indentation of comments inside LOOP. * slime-cl-indent-test.txt: New tests 54-63. --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:45:45 1.52 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:46:16 1.53 @@ -1620,7 +1620,7 @@ test (buffer-string)))))) -(defun common-lisp-run-indentation-tests () +(defun common-lisp-run-indentation-tests (run) (define-common-lisp-style "common-lisp-indent-test" ;; Used to specify a few complex indentation specs for testing. (:inherit "basic") @@ -1633,7 +1633,8 @@ (insert-file "slime-cl-indent-test.txt") (goto-char 0) (let ((test-mark ";;; Test: ") - (n 0)) + (n 0) + (test-to-run (or (eq t run) (format "%s" run)))) (while (not (eobp)) (if (looking-at test-mark) (let* ((name-start (progn (search-forward ": ") (point))) @@ -1660,13 +1661,18 @@ (let ((test-start (point))) (while (not (or (eobp) (looking-at test-mark))) (forward-line 1)) - (let ((test (buffer-substring-no-properties test-start (point)))) - (common-lisp-indent-test test-name bindings test) - (incf n)))) + (when (or (eq t run) (equal test-to-run test-name)) + (let ((test (buffer-substring-no-properties test-start (point)))) + (common-lisp-indent-test test-name bindings test) + (incf n))))) (forward-line 1))) (common-lisp-delete-style "common-lisp-indent-test") (message "%s tests OK." n)))) -;;; (common-lisp-run-indentation-tests) +;;; Run all tests: +;;; (common-lisp-run-indentation-tests t) +;;; +;;; Run specific test: +;;; (common-lisp-run-indentation-tests 17) ;;; cl-indent.el ends here