From nsiivola at common-lisp.net Wed Apr 4 12:04:42 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Wed, 04 Apr 2012 05:04: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-serv3344/contrib Modified Files: ChangeLog slime-cl-indent-test.txt slime-cl-indent.el Log Message: slime-indentation: identify initial-value-forms in lambda-lists ...and indent them as regular code, not as lambda-lists. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/03/30 10:40:21 1.539 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/04 12:04:42 1.540 @@ -1,3 +1,12 @@ +2012-04-04 Nikodemus Siivola + + * slime-cl-indent.el (common-lisp-lambda-list-initial-value-form-p): New function. + Identifies initial-value-forms from lambda-lists, allowing them to be indented + as regular code. + (lisp-indent-259): Use the previous when indenting using &lambda to punt to + normal indentation when approriate. + * slime-cl-indent-test.txt (Test 87): Test indentation of initial-value forms. + 2012-03-19 Stas Boukarev * swank-arglists.lisp (compute-enriched-decoded-arglist): Add --- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/03/30 10:40:21 1.19 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/04/04 12:04:42 1.20 @@ -910,3 +910,19 @@ (foo ( bar quux zor)) + +;;; Test: 87 +;; +;; lisp-lambda-list-keyword-parameter-alignment: t +;; lisp-lambda-list-keyword-alignment: t + +(defmacro foo ((foo &optional (opt1 (or (this) + (that))) + (opt2 (the-default) + opt2-p) + (opt3 + (the-default (foo) + (bar))) + &rest rest)) + (list foo opt1 opt2 + rest)) --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/03/30 10:40:21 1.63 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/04 12:04:42 1.64 @@ -950,6 +950,7 @@ (setq depth (1+ depth))) (error (setq depth lisp-indent-maximum-backtracking)))))) + (or calculated tentative-calculated ;; Fallback. ;; @@ -1088,9 +1089,45 @@ (+ col lisp-lambda-list-keyword-parameter-indentation)) next nil) - (setq indent col)))) + (progn + (setq indent col))))) (or indent (1+ sexp-column))))))))) +(defun common-lisp-lambda-list-initial-value-form-p (point) + (let ((state 'x) + (point (save-excursion + (goto-char point) + (back-to-indentation) + (point)))) + (save-excursion + (backward-sexp) + (down-list 1) + (while (and point (< (point) point)) + (cond ((or (looking-at "&key") (looking-at "&optional")) + (setq state 'key)) + ((looking-at lisp-indent-lambda-list-keywords-regexp) + (setq state 'x))) + (if (not (ignore-errors (forward-sexp) t)) + (setq point nil) + (ignore-errors + (forward-sexp) + (backward-sexp)) + (cond ((> (point) point) + (backward-sexp) + (when (eq state 'var) + (setq state 'x)) + (or (ignore-errors + (down-list 1) + (cond ((> (point) point) + (backward-up-list)) + ((eq 'key state) + (setq state 'var))) + t) + (setq point nil))) + ((eq state 'var) + (setq state 'form)))))) + (eq 'form state))) + ;; Blame the crufty control structure on dynamic scoping ;; -- not on me! (defun lisp-indent-259 @@ -1148,16 +1185,20 @@ normal-indent (list normal-indent containing-form-start)))) ((eq tem '&lambda) - (throw 'exit - (cond ((null p) - (list (+ sexp-column 4) containing-form-start)) - (t - ;; Indentation within a lambda-list. -- dvl - (list (lisp-indent-lambda-list - indent-point - sexp-column - containing-form-start) - containing-form-start))))) + (if (common-lisp-lambda-list-initial-value-form-p indent-point) + (throw 'exit (if (consp normal-indent) + normal-indent + (list normal-indent containing-form-start))) + (throw 'exit + (cond ((null p) + (list (+ sexp-column 4) containing-form-start)) + (t + ;; Indentation within a lambda-list. -- dvl + (list (lisp-indent-lambda-list + indent-point + sexp-column + containing-form-start) + containing-form-start)))))) ((integerp tem) (throw 'exit (if (null p) ;not in subforms From sboukarev at common-lisp.net Fri Apr 6 18:08:31 2012 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 06 Apr 2012 11:08:31 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv19546 Modified Files: ChangeLog swank-fancy-inspector.lisp Log Message: * swank-fancy-inspector.lisp (format-iso8601-time): Add 1 to the time-zone if DST value of decode-universal-time is T. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/04 12:04:42 1.540 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/06 18:08:30 1.541 @@ -1,3 +1,8 @@ +2012-04-06 Stas Boukarev + + * swank-fancy-inspector.lisp (format-iso8601-time): Add 1 to the + time-zone if DST value of decode-universal-time is T. + 2012-04-04 Nikodemus Siivola * slime-cl-indent.el (common-lisp-lambda-list-initial-value-form-p): New function. --- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2011/12/01 16:48:22 1.32 +++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2012/04/06 18:08:30 1.33 @@ -765,24 +765,26 @@ `("Value: " ,(princ-to-string n))) (defun format-iso8601-time (time-value &optional include-timezone-p) - "Formats a universal time TIME-VALUE in ISO 8601 format, with + "Formats a universal time TIME-VALUE in ISO 8601 format, with the time zone included if INCLUDE-TIMEZONE-P is non-NIL" - ;; Taken from http://www.pvv.ntnu.no/~nsaa/ISO8601.html - ;; Thanks, Nikolai Sandved and Thomas Russ! - (flet ((format-iso8601-timezone (zone) - (if (zerop zone) - "Z" - (multiple-value-bind (h m) (truncate (abs zone) 1.0) - ;; Tricky. Sign of time zone is reversed in ISO 8601 - ;; relative to Common Lisp convention! - (format nil "~:[+~;-~]~2,'0D:~2,'0D" - (> zone 0) h (round (* 60 m))))))) + ;; Taken from http://www.pvv.ntnu.no/~nsaa/ISO8601.html + ;; Thanks, Nikolai Sandved and Thomas Russ! + (flet ((format-iso8601-timezone (zone) + (if (zerop zone) + "Z" + (multiple-value-bind (h m) (truncate (abs zone) 1.0) + ;; Tricky. Sign of time zone is reversed in ISO 8601 + ;; relative to Common Lisp convention! + (format nil "~:[+~;-~]~2,'0D:~2,'0D" + (> zone 0) h (round (* 60 m))))))) (multiple-value-bind (second minute hour day month year dow dst zone) - (decode-universal-time time-value) - (declare (ignore dow dst)) + (decode-universal-time time-value) + (declare (ignore dow)) (format nil "~4,'0D-~2,'0D-~2,'0DT~2,'0D:~2,'0D:~2,'0D~:[~*~;~A~]" year month day hour minute second - include-timezone-p (format-iso8601-timezone zone))))) + include-timezone-p (format-iso8601-timezone (if dst + (+ zone 1) + zone)))))) (defmethod emacs-inspect ((i integer)) (append From sboukarev at common-lisp.net Fri Apr 6 20:04:34 2012 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Fri, 06 Apr 2012 13:04:34 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv2862 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (interrupt-worker-thread): Interrupt the REPL thread if there are no threads found. Send Emacs an error message if no threads are found at all. --- /project/slime/cvsroot/slime/ChangeLog 2012/03/30 09:45:00 1.2308 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/06 20:04:34 1.2309 @@ -1,3 +1,9 @@ +2012-04-06 Stas Boukarev + + * swank.lisp (interrupt-worker-thread): Interrupt the REPL thread if + there are no threads found. Send Emacs an error message if no + threads are found at all. + 2012-03-30 Nikodemus Siivola * swank-sbcl.lisp (lisp-source-location): When processing a STEP-FORM-CONDITION, --- /project/slime/cvsroot/slime/swank.lisp 2012/03/06 20:55:07 1.783 +++ /project/slime/cvsroot/slime/swank.lisp 2012/04/06 20:04:34 1.784 @@ -997,27 +997,29 @@ (etypecase id ((member t) (etypecase connection - (multithreaded-connection (car (mconn.active-threads connection))) + (multithreaded-connection (or (car (mconn.active-threads connection)) + (find-repl-thread connection))) (singlethreaded-connection (current-thread)))) ((member :repl-thread) (find-repl-thread connection)) - (fixnum + (fixnum (find-thread id)))) (defun interrupt-worker-thread (connection id) - (let ((thread (or (find-worker-thread connection id) - ;; FIXME: to something better here - (spawn (lambda ()) :name "ephemeral")))) + (let ((thread (find-worker-thread connection id))) (log-event "interrupt-worker-thread: ~a ~a~%" id thread) - (assert thread) - (etypecase connection - (multithreaded-connection - (interrupt-thread thread - (lambda () - ;; safely interrupt THREAD - (invoke-or-queue-interrupt #'simple-break)))) - (singlethreaded-connection - (simple-break))))) + (if thread + (etypecase connection + (multithreaded-connection + (interrupt-thread thread + (lambda () + ;; safely interrupt THREAD + (invoke-or-queue-interrupt #'simple-break)))) + (singlethreaded-connection + (simple-break))) + (let ((*send-counter* 0)) ;; shouldn't be necessary, but it is + (send-to-emacs (list :debug-condition (current-thread-id) + (format nil "Thread with id ~a not found" id))))))) (defun thread-for-evaluation (connection id) "Find or create a thread to evaluate the next request." From heller at common-lisp.net Sat Apr 7 06:14:48 2012 From: heller at common-lisp.net (CVS User heller) Date: Fri, 06 Apr 2012 23:14:48 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv18822 Modified Files: swank.lisp Log Message: *** empty log message *** --- /project/slime/cvsroot/slime/swank.lisp 2012/04/06 20:04:34 1.784 +++ /project/slime/cvsroot/slime/swank.lisp 2012/04/07 06:14:48 1.785 @@ -993,6 +993,7 @@ (sleep *auto-flush-interval*))) ;; FIXME: drop dependency on find-repl-thread +;; FIXME: and don't add and any more (defun find-worker-thread (connection id) (etypecase id ((member t) @@ -1005,6 +1006,8 @@ (fixnum (find-thread id)))) +;; FIXME: the else branch does look like it was written by someone who +;; doesn't know what he is doeing. (defun interrupt-worker-thread (connection id) (let ((thread (find-worker-thread connection id))) (log-event "interrupt-worker-thread: ~a ~a~%" id thread) From heller at common-lisp.net Sat Apr 7 08:10:30 2012 From: heller at common-lisp.net (CVS User heller) Date: Sat, 07 Apr 2012 01:10:30 -0700 Subject: [slime-cvs] CVS CVSROOT Message-ID: Update of /project/slime/cvsroot/CVSROOT In directory tiger.common-lisp.net:/tmp/cvs-serv15163 Modified Files: commitinfo Log Message: *** empty log message *** --- /project/slime/cvsroot/CVSROOT/commitinfo 2003/10/15 13:25:09 1.1 +++ /project/slime/cvsroot/CVSROOT/commitinfo 2012/04/07 08:10:30 1.2 @@ -13,3 +13,5 @@ # # If the name "ALL" appears as a regular expression it is always used # in addition to the first matching regex or "DEFAULT". + +DEFAULT /project/slime/bin/check-line-length.sh %{s} From heller at common-lisp.net Sat Apr 7 08:19:32 2012 From: heller at common-lisp.net (CVS User heller) Date: Sat, 07 Apr 2012 01:19:32 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv19541 Modified Files: ChangeLog slime.el swank.lisp Log Message: Fix long lines. * swank.lisp: * slime.el: * ChangeLog: --- /project/slime/cvsroot/slime/ChangeLog 2012/04/06 20:04:34 1.2309 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/07 08:19:32 1.2310 @@ -1,3 +1,11 @@ +2012-04-07 Helmut Eller + + Fix long lines. + + * swank.lisp: + * slime.el: + * ChangeLog: + 2012-04-06 Stas Boukarev * swank.lisp (interrupt-worker-thread): Interrupt the REPL thread if @@ -6,9 +14,10 @@ 2012-03-30 Nikodemus Siivola - * swank-sbcl.lisp (lisp-source-location): When processing a STEP-FORM-CONDITION, - don't show the initial form from expansion of STEP. (Currently SBCL doesn't - give the form at all, but when it does seeing it is distinctly useless.) + * swank-sbcl.lisp (lisp-source-location): When processing a + STEP-FORM-CONDITION, don't show the initial form from expansion of + STEP. (Currently SBCL doesn't give the form at all, but when it + does seeing it is distinctly useless.) 2012-03-26 Helmut Eller @@ -1072,13 +1081,13 @@ * swank-cmucl.lisp (codepoint-length): Implement codepoint-length to return the number of codepoints in cmucl's utf-16 strings. - * swank-backend.lisp (:swank-backend): Export codepoint-length. + * swank-backend.lisp (:swank-backend): Export codepoint-length. (codepoint-length): definterface codepoint-length. Default is to use LENGTH. * swank-rpc.lisp (write-message): Call swank-backend:codepoint-length to get the correct length for - emacs. + emacs. 2010-10-08 Christophe Rhodes @@ -2457,11 +2466,13 @@ 2010-01-20 Terje Norderhaug - * swank.lisp (with-swank-protocol-error-handler): Refactor using safe-backtrace. - * swank-rpc.lisp (make-swank-protocol-error): Delete call to swank:safe-backtrace - to eliminate dependency on swank.lisp module. - * swank-rpc.lisp (swank-protocol-error): Remove swank-protocol-error.backtrace - as the capture of a safe-backtrace is covered by with-swank-protocol-error-handler. + * swank.lisp (with-swank-protocol-error-handler): Refactor using + safe-backtrace. + * swank-rpc.lisp (make-swank-protocol-error): Delete call to + swank:safe-backtrace to eliminate dependency on swank.lisp module. + * swank-rpc.lisp (swank-protocol-error): Remove + swank-protocol-error.backtrace as the capture of a safe-backtrace + is covered by with-swank-protocol-error-handler. 2010-01-20 Stas Boukarev @@ -4626,8 +4637,8 @@ 2009-01-15 Martin Simmons * swank-lispworks.lisp: wrapper functions for swank-mop - slot-boundp-using-class, slot-value-using-class and - slot-makunbound-using-class to account for MOP differences. + slot-boundp-using-class, slot-value-using-class and + slot-makunbound-using-class to account for MOP differences. 2009-01-16 Helmut Eller @@ -6034,7 +6045,8 @@ 2008-08-25 Tobias C. Rittweiler - * slime.el (slime-compute-modeline-package): Used `when-let' before its definition. + * slime.el (slime-compute-modeline-package): Used `when-let' + before its definition. (slime-compute-modeline-string): Display "PKG:" before "CON:". 2008-08-22 Helmut Eller @@ -7000,7 +7012,7 @@ 2008-04-17 Travis Cross - + * swank.asd: Don't make a compile-op a no-op so that a swank-loader.fasl file gets generated and (require 'swank) can be called multiple times. @@ -7009,7 +7021,7 @@ C-c C-c with prefix args now uses the maximal debug level. Only implemented for SBCL. - + * slime.el (slime-compile-with-maximum-debug): New variable. (slime-compile-defun, slime-compile-region): Use it. @@ -7032,7 +7044,7 @@ 2008-03-26 Tobias C. Rittweiler - On SBCL, + On SBCL, (block outta (let ((*debugger-hook* #'(lambda (c hook) @@ -7042,7 +7054,7 @@ would just silently skip over the *DEBUGGER-HOOK*, and pop right into SLDB to handle the error. Fix that. - + * swank-sbcl (make-invoke-debugger-hook): New function; returns a hook for SB-EXT:*INVOKE-DEBUGGER-HOOK* that checks for the presence of *DEBUGGER-HOOK*, and calls that if available. @@ -7056,7 +7068,7 @@ turns into SLDB even when *DEBUGGER-HOOK* is locally bound. (def-slime-test locally-bound-debugger-hook): New test case; tests that a locally-bound *DEBUGGER-HOOK* is adhered, and not skipped. - + 2008-03-26 Helmut Eller By default, don't ask if SLIME should be started. @@ -7077,7 +7089,7 @@ 2008-03-24 Tobias C. Rittweiler - * HACKING: Updated due to broken links. + * HACKING: Updated due to broken links. Reported by Mirko Vukovic. 2008-03-24 Tobias C. Rittweiler @@ -7085,15 +7097,15 @@ * slime.el (slime-set-connection-info): Display SLIME and SWANK versions explicitly in Protocol Mismatch message. Adapted from idea and patch by Jeronimo Pellegrini. - + 2008-03-24 Tobias C. Rittweiler - * swank-source-path-parser.lisp + * swank-source-path-parser.lisp The source parser READs in files, and if such a file contains some nasty #. hackery that results in an error being signalled, M-. would fail on anything that's defined in those files. Fix that by using - a special #. reader function that invokes the original #. reader + a special #. reader function that invokes the original #. reader with an IGNORE-ERRORS wrapped around. (make-sharpdot-reader): New function. @@ -7121,7 +7133,7 @@ directly, since CL:FILE-POSITION may not return character but binary offsets on such streams; instead slurp file content into a buffer string, and operate on that. - + 2008-03-16 Tobias C. Rittweiler * swank.lisp (load-file-set-package): Removed; the function was @@ -7253,7 +7265,7 @@ and not |(defun read-from-emacs ...) - + * swank-sbcl.lisp (source-file-position): Don't 1+ the returned position; i.e. return a position usable as a CL /file position/ which start from 0, and not a position usable in Emacs where @@ -7352,7 +7364,7 @@ (slime-analyze-xrefs): Use it; display definitions defined interactively via C-c C-c as comming from # instead of foo.lisp. - + 2008-02-20 Helmut Eller Better factorization for M-. and xref commands. @@ -7589,7 +7601,7 @@ New hooks that allow the slime-presentations contrib to hook into the debugger and inspector. - + * slime.el (sldb-insert-frame-variable-value-function): New variable. (sldb-insert-frame-variable-value): New function, default value @@ -7602,7 +7614,7 @@ 2008-01-20 Matthias Koeppe * doc/slime.texi (Presentations): Improve documentation of - presentations. + presentations. 2008-01-19 Geo Carncross @@ -7621,20 +7633,20 @@ close the debugging machinery on swank side when the SLDB buffer is killed. (Notice that killing the SLDB buffer manually will not restore window configuration in contrast to typing `q'.) - + 2008-01-10 Tobias C. Rittweiler * slime.el (slime-delete-and-extract-region): New function. Portable version of `delete-and-extract-region' which returned NIL instead of "", as experienced by Matthias Koeppe. - + 2008-01-09 Matthias Koeppe * slime.el (slime-repl-mode-map): Bind C-c C-t to slime-toggle-trace-fdefinition (as in Lisp buffers) instead of slime-repl-clear-buffer. This binding is useful for untracing functions directly from the trace output. Move - slime-repl-clear-buffer to the keybinding C-c M-o. + slime-repl-clear-buffer to the keybinding C-c M-o. 2008-01-04 Juho Snellman @@ -7645,7 +7657,7 @@ (code-location-debug-source-name): Ensure that we always return a physical namestring, Emacs won't like a pathname or a logical namestring. - + 2008-01-02 Lu??s Oliveira Use sane default values for slime-repl-set-package. @@ -7654,24 +7666,24 @@ would have been inserted as a default (although the whole intent was to /change/ the current package in the first place), now nothing is inserted anymore. - + * slime.el (slime-pretty-current-package): rename it to slime-pretty-find-buffer-package and make it use slime-find-buffer-package instead of slime-current-package. (slime-repl-set-package, slime-set-package): use new function. - + 2008-01-02 Tobias C. Rittweiler * slime.el (slime-print-apropos): Simplified: Don't insert action properties anymore for the symbol; they were ignored anyway, - because `apropos-follow' (bound to RET in the resulting + because `apropos-follow' (bound to RET in the resulting *SLIME Apropos* buffer) looks for buttons only. 2008-01-02 Tobias C. Rittweiler * slime.el (slime-apropos): Update docstring: Apropos doesn't match on regular expressions anymore since 2007-11-24. - + 2007-12-22 Douglas Crosher * swank-scl.lisp (set-stream-timeout, make-socket-io-stream): update @@ -7691,7 +7703,7 @@ * slime.el (slime-insert-xref-location): New function. Tries to either insert the file name a function is defined in, or inserts - information about the buffer a function was interactively + information about the buffer a function was interactively `C-c C-c'd from. Idea from Knut Olav B??hmer. (slime-insert-xrefs): Use it. @@ -7833,9 +7845,9 @@ active; if [return] is bound to something, pressing enter is translated to this key binding henceforth, as was explained to me by Pierre Gaston, thanks! This can cause quite confusing behaviour - as Andreas Davour faced in his post - to comp.lang.lisp. - + as Andreas Davour faced in his post + to comp.lang.lisp. + 2007-11-06 Helmut Eller * slime.el (slime-events-buffer, slime-inspector-buffer): Disable @@ -7874,7 +7886,7 @@ string representation. * slime.el (slime-open-inspector): Adapted for new header layout. - + 2007-10-22 Tobias C. Rittweiler * swank.lisp (read-softly-from-string, unintern-in-home-package): @@ -7892,7 +7904,7 @@ 2007-10-22 Mark Evenson * swank-abcl.lisp (getpid): Implemented. - + 2007-10-22 R. Matthew Emerson * swank-openmcl.lisp (closure-closed-over-values): Use @@ -7998,9 +8010,9 @@ * slime.el (slime-maybe-warn-for-different-source-root): Catch returned NIL from `slime-file-name-merge-source-root' if the two - filenames don't share a common source root. + filenames don't share a common source root. Reported by Frank Goenninger. - + 2007-09-15 Tobias C. Rittweiler * slime.el (slime-split-string): New semi-portability function. @@ -8071,7 +8083,7 @@ 2007-09-10 Tobias C. Rittweiler * slime.el (slime-cl-symbol-name, slime-cl-symbol-package): - Ressurected, as they're still used in this file. + Ressurected, as they're still used in this file. Reported by Edward Cant. 2007-09-10 Tobias C. Rittweiler @@ -8097,14 +8109,14 @@ There's no guarantee that all possible cases are covered, but if you encounter such a warning, it's a strong indication that you should check twice before modifying. - + * slime.el (slime-file-name-merge-source-root): New function. (slime-highlight-differences-in-dirname): New function. (slime-maybe-warn-for-different-source-root): New function. (slime-warn-when-possibly-tricked-by-M-.): New variable (T by default.) (slime-goto-location-buffer): Where appropriate, call `slime-maybe-warn-for-different-source-root' - + 2007-09-08 Stelian Ionescu * slime.el (save-restriction-if-possible): Place macro definition @@ -8239,7 +8251,7 @@ the PPC-Darwin version. Changed to conditionalize on the presence of darwin instead of ppc so that slime works with both Darwin versions of CMUCL. - + 2007-08-31 Tobias C. Rittweiler * slime.el (slime-sexp-at-point): Explicitely set current syntax @@ -8271,9 +8283,9 @@ lost). Testcase: Type (dotimes (i 5) (format t "Number ~A~%" i) (sleep 1)) and then type ahead while the command is executing and output arrives. - + * slime.el (slime-repl-insert-prompt): Don't go to point-max but - to slime-repl-input-start-mark if there is one. + to slime-repl-input-start-mark if there is one. (slime-repl-write-string): Insert a :repl-result before the prompt, not at point-max. Update markers properly. @@ -8340,10 +8352,10 @@ Remove the ID argument from :write-string protocol messages. Everything, except for rigid-indentation tricks, can be achieved by using :write-string in conjunction with :presentation-start and - :presentation-end. - + :presentation-end. + * swank.lisp (present-in-emacs): Unused, removed. - + * swank.lisp (make-output-function-for-target): Remove id argument from :write-string. (send-repl-results-to-emacs): Don't call @@ -8362,7 +8374,7 @@ to end of symbol at point. (slime-make-form-spec-from-string): Fixes unexpected behaviour of `save-excursion'. - + 2007-08-27 Tobias C. Rittweiler * slime.el (slime-sexp-at-point): Fixes a few edge cases were @@ -8382,7 +8394,7 @@ against a possible endless recursion. * swank.lisp (parse-form-spec): Looses restriction for nesting. - + 2007-08-27 Helmut Eller * slime.el (slime-eval-feature-conditional): Fix typo. @@ -8406,7 +8418,7 @@ recent work on autodoc to a minimum. Also fixes this issue for `slime-complete-form' which always interned symbols even before my changes. - [3656 lines skipped] --- /project/slime/cvsroot/slime/slime.el 2012/03/26 15:36:50 1.1395 +++ /project/slime/cvsroot/slime/slime.el 2012/04/07 08:19:32 1.1396 @@ -406,8 +406,10 @@ \\[slime-remove-notes] - Remove compiler-note annotations in buffer. Finding definitions: -\\[slime-edit-definition] - Edit the definition of the function called at point. -\\[slime-pop-find-definition-stack] - Pop the definition stack to go back from a definition. +\\[slime-edit-definition] \ +- Edit the definition of the function called at point. +\\[slime-pop-find-definition-stack] \ +- Pop the definition stack to go back from a definition. Documentation commands: \\[slime-describe-symbol] - Describe symbol. @@ -417,7 +419,8 @@ Evaluation commands: \\[slime-eval-defun] - Evaluate top-level from containing point. \\[slime-eval-last-expression] - Evaluate sexp before point. -\\[slime-pprint-eval-last-expression] - Evaluate sexp before point, pretty-print result. +\\[slime-pprint-eval-last-expression] \ +- Evaluate sexp before point, pretty-print result. Full set of commands: \\{slime-mode-map}" @@ -2670,8 +2673,8 @@ (defun slime-compile-region (start end) "Compile the region." (interactive "r") - ;; Check connection before running hooks - ;; things like slime-flash-region don't make much sense if there's no connection + ;; Check connection before running hooks things like + ;; slime-flash-region don't make much sense if there's no connection (slime-connection) (slime-flash-region start end) (run-hook-with-args 'slime-before-compile-functions start end) @@ -3189,8 +3192,10 @@ ==> \"/usr/local/src/joe/hacked/sbcl/code/late-extensions.lisp\" " - (let ((target-dirs (slime-split-string (file-name-directory target-filename) "/" t)) - (buffer-dirs (slime-split-string (file-name-directory buffer-filename) "/" t))) + (let ((target-dirs (slime-split-string (file-name-directory target-filename) + "/" t)) + (buffer-dirs (slime-split-string (file-name-directory buffer-filename) + "/" t))) ;; Starting from the end, we look if one of the TARGET-DIRS exists ;; in BUFFER-FILENAME---if so, it and everything left from that dirname ;; is considered to be the source root directory of BUFFER-FILENAME. @@ -3203,12 +3208,17 @@ (let ((pos (position target-dir buffer-dirs* :test #'equal))) (if (not pos) ; TARGET-DIR not in BUFFER-FILENAME? (push target-dir target-suffix-dirs) - (let* ((target-suffix (concat-dirs target-suffix-dirs)) ; PUSH reversed for us! - (buffer-root (concat-dirs (reverse (nthcdr pos buffer-dirs*))))) + (let* ((target-suffix + ; PUSH reversed for us! + (concat-dirs target-suffix-dirs)) + (buffer-root + (concat-dirs + (reverse (nthcdr pos buffer-dirs*))))) (return (concat (slime-filesystem-toplevel-directory) buffer-root target-suffix - (file-name-nondirectory target-filename)))))))))) + (file-name-nondirectory + target-filename)))))))))) (defun slime-highlight-differences-in-dirname (base-dirname contrast-dirname) "Returns a copy of BASE-DIRNAME where all differences between @@ -3230,7 +3240,8 @@ (if (not pos) (insert-dir/propzd base-dir) (progn (insert-dir base-dir) - (setq contrast-dirs (nthcdr (1+ pos) contrast-dirs)))))) + (setq contrast-dirs + (nthcdr (1+ pos) contrast-dirs)))))) (buffer-substring (point-min) (point-max)))))) (defvar slime-warn-when-possibly-tricked-by-M-. t @@ -3255,7 +3266,8 @@ if you encounter such a warning, it's a strong indication that you should check twice before modifying.") -(defun slime-maybe-warn-for-different-source-root (target-filename buffer-filename) +(defun slime-maybe-warn-for-different-source-root (target-filename + buffer-filename) (let ((guessed-target (slime-file-name-merge-source-root target-filename buffer-filename))) (when (and guessed-target @@ -3269,7 +3281,8 @@ (defun slime-check-location-filename-sanity (filename) (when slime-warn-when-possibly-tricked-by-M-. - (flet ((file-truename-safe (filename) (and filename (file-truename filename)))) + (flet ((file-truename-safe (filename) (and filename + (file-truename filename)))) (let ((target-filename (file-truename-safe filename)) (buffer-filename (file-truename-safe (buffer-file-name)))) (when (and target-filename @@ -3368,14 +3381,17 @@ (name (regexp-quote name)) (qualifiers (mapconcat (lambda (el) (concat ".+?\\<" el "\\>")) qualifiers "")) - (specializers (mapconcat (lambda (el) - (if (eql (aref el 0) ?\() - (let ((spec (read el))) - (if (eq (car spec) 'EQL) - (concat ".*?\\n\\{0,1\\}.*?(EQL.*?'\\{0,1\\}" - (format "%s" (second spec)) ")") - (error "don't understand specializer: %s,%s" el (car spec)))) - (concat ".+?\n\\{0,1\\}.+?\\<" el "\\>"))) + (specializers (mapconcat + (lambda (el) + (if (eql (aref el 0) ?\() + (let ((spec (read el))) + (if (eq (car spec) 'EQL) + (concat + ".*?\\n\\{0,1\\}.*?(EQL.*?'\\{0,1\\}" + (format "%s" (second spec)) ")") + (error "don't understand specializer: %s,%s" + el (car spec)))) + (concat ".+?\n\\{0,1\\}.+?\\<" el "\\>"))) (remove "T" specializers) "")) (regexp (format "\\s *(def\\(\\s_\\|\\sw\\)*\\s +%s\\s +%s%s" name qualifiers specializers))) @@ -3422,7 +3438,7 @@ | (:line []) | (:function-name ) | (:source-path ) - | (:method . )" + | (:method . )" (destructure-case location ((:location buffer _position _hints) (slime-goto-location-buffer buffer) @@ -3687,7 +3703,8 @@ (error ;; Because this is called on the pre-command-hook, we mustn't let ;; errors propagate. - (message "Error in slime-complete-restore-window-configuration: %S" err)))) + (message "Error in slime-complete-restore-window-configuration: %S" + err)))) (defun slime-completion-window-active-p () "Is the completion window currently active?" @@ -3760,8 +3777,9 @@ (defun slime-maybe-complete-as-filename () "If point is at a string starting with \", complete it as filename. Return nil if point is not at filename." - (when (save-excursion (re-search-backward "\"[^ \t\n]+\\=" (max (point-min) - (- (point) 1000)) t)) + (when (save-excursion (re-search-backward "\"[^ \t\n]+\\=" + (max (point-min) + (- (point) 1000)) t)) (let ((comint-completion-addsuffix '("/" . "\""))) (comint-replace-by-expanded-filename) t))) @@ -6820,8 +6838,9 @@ ("g" 'slime-inspector-reinspect) ("v" 'slime-inspector-toggle-verbose) ("\C-i" 'slime-inspector-next-inspectable-object) - ([(shift tab)] 'slime-inspector-previous-inspectable-object) ; Emacs translates S-TAB - ([backtab] 'slime-inspector-previous-inspectable-object) ; to BACKTAB on X. + ([(shift tab)] + 'slime-inspector-previous-inspectable-object) ; Emacs translates S-TAB + ([backtab] 'slime-inspector-previous-inspectable-object) ; to BACKTAB on X. ("." 'slime-inspector-show-source) (">" 'slime-inspector-fetch-all)) @@ -6996,7 +7015,8 @@ (get symbol 'slime-indent)) (put symbol 'common-lisp-indent-function indent) (put symbol 'slime-indent indent))) - (run-hook-with-args 'slime-indentation-update-hooks symbol indent packages)))) + (run-hook-with-args 'slime-indentation-update-hooks + symbol indent packages)))) ;;;; Contrib modules @@ -7211,7 +7231,8 @@ (slime-compile-defun "Compile current top level form") (slime-interactive-eval "Prompt for form and eval it") (slime-compile-and-load-file "Compile and load current file") - (slime-sync-package-and-default-directory "Synch default package and directory with current buffer") + (slime-sync-package-and-default-directory + "Synch default package and directory with current buffer") (slime-next-note "Next compiler note") (slime-previous-note "Previous compiler note") (slime-remove-notes "Remove notes") @@ -7229,11 +7250,14 @@ (sldb-continue "Invoke CONTINUE restart (if available)") (sldb-show-source "Jump to frame's source code") (sldb-eval-in-frame "Evaluate in frame at point") - (sldb-inspect-in-frame "Evaluate in frame at point and inspect result"))) + (sldb-inspect-in-frame + "Evaluate in frame at point and inspect result"))) (:title "Within the Inspector" :map slime-inspector-mode-map - :bindings ((slime-inspector-next-inspectable-object "Jump to next inspectable object") - (slime-inspector-operate-on-point "Inspect object or execute action at point") + :bindings ((slime-inspector-next-inspectable-object + "Jump to next inspectable object") + (slime-inspector-operate-on-point + "Inspect object or execute action at point") (slime-inspector-reinspect "Reinspect current object") (slime-inspector-pop "Return to previous object") ;;(slime-inspector-copy-down "Send object at point to REPL") @@ -7541,8 +7565,10 @@ (name (first name)) (fails-for (cdr (assq :fails-for opts))) (style (cdr (assq :style opts)))) - ;; :style and :fails-for only options, given no more than one time? - (assert (null (remove* :style (remove* :fails-for opts :key #'car) + ;; :style and :fails-for only options, + ;; given no more than one time? + (assert (null (remove* :style + (remove* :fails-for opts :key #'car) :key #'car))) (values name fails-for style)))) (let ((fname (intern (format "slime-test-%s" name)))) @@ -7787,17 +7813,20 @@ (slime-buffer-narrowed-p)) (slime-with-popup-buffer (random-buffer-name) - (slime-check ("Checking that we're in Slime's temp buffer `%s'" random-buffer-name) + (slime-check ("Checking that we're in Slime's temp buffer `%s'" + random-buffer-name) (equal (buffer-name (current-buffer)) random-buffer-name))) (with-current-buffer random-buffer-name ;; Notice that we cannot quit the buffer within the the extent ;; of slime-with-output-to-temp-buffer. (slime-popup-buffer-quit t)) - (slime-check ("Checking that we've got back from `%s'" random-buffer-name) + (slime-check ("Checking that we've got back from `%s'" + random-buffer-name) (and (eq (current-buffer) tmpbuffer) (= (point) defun-pos))) - (slime-check "Checking that narrowing sustained after quitting Slime's temp buffer." + (slime-check "Checking that narrowing sustained \ +after quitting Slime's temp buffer." (slime-buffer-narrowed-p)) (let ((slime-buffer-package "SWANK") @@ -7902,9 +7931,11 @@ ("swank::compute-backtrace" "(swank::compute-backtrace start end)") ("swank::emacs-connected" "(swank::emacs-connected)") ("swank::compile-string-for-emacs" - "(swank::compile-string-for-emacs string buffer position filename policy)") + "(swank::compile-string-for-emacs \ +string buffer position filename policy)") ("swank::connection.socket-io" - "(swank::connection.socket-io \\(struct\\(ure\\)?\\|object\\|instance\\|x\\))") + "(swank::connection.socket-io \ +\\(struct\\(ure\\)?\\|object\\|instance\\|x\\))") ("cl:lisp-implementation-type" "(cl:lisp-implementation-type)") ("cl:class-name" "(cl:class-name \\(class\\|object\\|instance\\|structure\\))")) @@ -7915,7 +7946,8 @@ (lambda (pattern arglist) (and arglist (string-match pattern arglist)))))) -(def-slime-test (compile-defun (:fails-for "allegro" "lispworks" "clisp" "ccl")) +(def-slime-test (compile-defun (:fails-for "allegro" "lispworks" "clisp" + "ccl")) (program subform) "Compile PROGRAM containing errors. Confirm that SUBFORM is correctly located." @@ -8136,7 +8168,10 @@ (lexical-let ((done nil)) (let ((sldb-hook (lambda () (sldb-continue) (setq done t)))) (slime-interactive-eval - "(progn(cerror \"foo\" \"restart\")(cerror \"bar\" \"restart\")(+ 1 2))") + "(progn\ + (cerror \"foo\" \"restart\")\ + (cerror \"bar\" \"restart\")\ + (+ 1 2))") (while (not done) (slime-accept-process-output)) (slime-sync-to-top-level 5) (slime-check-top-level) @@ -8612,7 +8647,8 @@ s (format "%s::%s" (let* ((package (slime-current-package))) - ;; package is a string like ":cl-user" or "CL-USER", or "\"CL-USER\"". + ;; package is a string like ":cl-user" + ;; or "CL-USER", or "\"CL-USER\"". (if package (slime-pretty-package-name package) "CL-USER")) @@ -9226,7 +9262,8 @@ (2 font-lock-variable-name-face)))))) (unless (featurep 'xemacs) - (loop for (symbol flag) on (symbol-plist 'slime-indulge-pretty-colors) by 'cddr + (loop for (symbol flag) on (symbol-plist 'slime-indulge-pretty-colors) + by 'cddr when (eq flag 't) do (slime-indulge-pretty-colors symbol))) ;;;; Finishing up @@ -9269,6 +9306,8 @@ ;; outline-regexp: ";;;;+" ;; indent-tabs-mode: nil ;; coding: latin-1-unix -;; compile-command: "emacs -batch -L . -eval '(byte-compile-file \"slime.el\")' ; rm -v slime.elc" +;; compile-command: "emacs -batch -L . \ +;; -eval '(byte-compile-file \"slime.el\")' ; \ +;; rm -v slime.elc" ;; End: ;;; slime.el ends here --- /project/slime/cvsroot/slime/swank.lisp 2012/04/07 06:14:48 1.785 +++ /project/slime/cvsroot/slime/swank.lisp 2012/04/07 08:19:32 1.786 @@ -134,7 +134,9 @@ "A DEFUN for functions that Emacs can call by RPC." `(progn (defun ,name ,arglist , at rest) - ;; see + ;; see (eval-when (:compile-toplevel :load-toplevel :execute) (export ',name (symbol-package ',name))))) @@ -1022,7 +1024,8 @@ (simple-break))) (let ((*send-counter* 0)) ;; shouldn't be necessary, but it is (send-to-emacs (list :debug-condition (current-thread-id) - (format nil "Thread with id ~a not found" id))))))) + (format nil "Thread with id ~a not found" + id))))))) (defun thread-for-evaluation (connection id) "Find or create a thread to evaluate the next request." @@ -1942,7 +1945,8 @@ (when *auto-abbreviate-dotted-packages* (loop with package-name = (package-name package) with offset = nil - do (let ((last-dot-pos (position #\. package-name :end offset :from-end t))) + do (let ((last-dot-pos (position #\. package-name :end offset + :from-end t))) (unless last-dot-pos (return nil)) ;; If a dot chunk contains only numbers, that chunk most @@ -2279,10 +2283,12 @@ (with-simple-restart (continue "Continue from break.") (invoke-slime-debugger (coerce-to-condition datum args)))) +;; FIXME: (last (compute-restarts)) looks dubious. (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 (or (and *sldb-quit-restart* (find-restart *sldb-quit-restart*)) + (let ((restart (or (and *sldb-quit-restart* + (find-restart *sldb-quit-restart*)) (car (last (compute-restarts)))))) (cond (restart (invoke-restart restart)) (t (format nil "Restart not active [~s]" *sldb-quit-restart*))))) From heller at common-lisp.net Sat Apr 7 09:35:42 2012 From: heller at common-lisp.net (CVS User heller) Date: Sat, 07 Apr 2012 02:35:42 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv21105 Modified Files: ChangeLog swank-cmucl.lisp swank-lispworks.lisp Log Message: More long line fixes. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/07 08:19:32 1.2310 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/07 09:35:42 1.2311 @@ -5,6 +5,8 @@ * swank.lisp: * slime.el: * ChangeLog: + * swank-cmucl.lisp: + * swank-lispworks.lisp: 2012-04-06 Stas Boukarev @@ -554,7 +556,7 @@ * swank-backend.lisp (utf8-to-string, string-to-utf8): New. - * swank-sbcl.lisp (string-to-utf8, string-to-utf8): Implemented . + * swank-sbcl.lisp (string-to-utf8, string-to-utf8): Implemented. * swank-lispworks.lisp (string-to-utf8, string-to-utf8): Implemented. * swank-cmucl.lisp (string-to-utf8, string-to-utf8): Implemented. * swank-clisp.lisp (string-to-utf8, string-to-utf8): Implemented. @@ -1492,7 +1494,8 @@ 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'. + (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. @@ -1653,7 +1656,8 @@ since it doesn't need to use minor-mode-list to distinguish between minor and major modes. - * swank.lisp (list-threads): Delete the current thread from the listing. + * swank.lisp (list-threads): Delete the current thread from the + listing. 2010-04-15 Tobias C. Rittweiler @@ -1727,7 +1731,8 @@ 2010-04-05 Stas Boukarev - * slime.el: Some further adaptations to the new slime-with-popup-buffer. + * slime.el: Some further adaptations to the new + slime-with-popup-buffer. 2010-04-04 Stas Boukarev @@ -2163,7 +2168,8 @@ * swank-loader.lisp (ecl-version-string): In #+(or) (progn #+#.(cl:print cl:nil) 1) PRINT does run on SBCL, which - breaks #+#.(cl:if (cl:find-symbol "SYMBOL" :ext) ...) here, guard it with + breaks #+#.(cl:if (cl:find-symbol "SYMBOL" :ext) ...) here, + guard it with (find-package :ext) until further investigations. 2010-02-25 Tobias C. Rittweiler @@ -2833,11 +2839,12 @@ 2009-11-13 Stas Boukarev - * swank.lisp (classify-symbol): Check fbound before calling fdefinition, - ECL doesn't like (fdefinition nil). + * swank.lisp (classify-symbol): Check fbound before calling + fdefinition, ECL doesn't like (fdefinition nil). - * swank-ecl.lisp (swank-mop:compute-applicable-methods-using-classes): - Add a dummy function. ECL doesn't have it, but some contribs are using it. + * swank-ecl.lisp + (swank-mop:compute-applicable-methods-using-classes): Add a dummy + function. ECL doesn't have it, but some contribs are using it. Patch by Andy Hefner. 2009-11-13 Stas Boukarev @@ -3168,7 +3175,8 @@ 2009-10-06 Stas Boukarev - * swank-ccl.lisp (map-backtrace): Handle null end-frame-number argument. + * swank-ccl.lisp (map-backtrace): Handle null end-frame-number + argument. 2009-09-28 Stas Boukarev @@ -3344,8 +3352,8 @@ 2009-08-27 Stas Boukarev - * slime.el (slime-remove-old-overlays): delete notes at the very beginning - of the buffer too. Thanks to Nick Levine. + * slime.el (slime-remove-old-overlays): delete notes at the very + beginning of the buffer too. Thanks to Nick Levine. 2009-08-22 Helmut Eller @@ -3860,8 +3868,8 @@ 2009-05-24 Tobias C. Rittweiler - * slime.el (slime-goto-location-position): Only go to match-beginning if - search succeeded. + * slime.el (slime-goto-location-position): Only go to + match-beginning if search succeeded. Patch by Madhu. @@ -5378,8 +5386,8 @@ (slime-cheat-sheet-table): Add slime-inspector-toggle-verbose. * swank.lisp (*inspector-verbose*): New variable. ([defstruct] istate): New slot called verbose. - (istate>elisp): If the current istate is verbose, use untruncated result of - TO-STRING as the title. + (istate>elisp): If the current istate is verbose, use untruncated + result of TO-STRING as the title. (inspect-nth-part): Use the verbosity of the current istate. * doc/slime.texi: Document slime-inspector-toggle-verbose. @@ -8317,7 +8325,8 @@ using slime-output-target-marker. (slime-last-output-target-id, slime-output-target-to-marker) (slime-output-target-marker) - (slime-redirect-trace-output): Move back here from slime-presentations.el. + (slime-redirect-trace-output): Move back here from + slime-presentations.el. 2007-08-28 Tobias C. Rittweiler @@ -8717,7 +8726,8 @@ (parse-form-spec): New. Takes a ``raw form spec'' and returns a ``form spec'' for further processing in Swank. Docstring documents these two terms. - (split-form-spec): New. Return relevant information from a form spec. + (split-form-spec): New. Return relevant information from a form + spec. (parse-first-valid-form-spec): Replaces `find-valid-operator-name'. (find-valid-operator-name): Removed. (operator-designator-to-form): Removed. Obsoleted by `parse-form-spec'. @@ -10593,11 +10603,14 @@ 2006-10-20 Martin Simmons * swank-backend.lisp (initialize-multiprocessing): New API to - support lisps where initialize-multiprocessing may not return (lispworks). + support lisps where initialize-multiprocessing may not return + (lispworks). - * swank.lisp (start-server): initialize-multiprocessing's API has changed. + * swank.lisp (start-server): initialize-multiprocessing's API has + changed. - * swank-lispworks.lisp (initialize-multiprocessing): Update for new API. + * swank-lispworks.lisp (initialize-multiprocessing): Update for + new API. * swank-cmucl.lisp (initialize-multiprocessing): Update for new API. @@ -11800,8 +11813,8 @@ (slime-sexp-at-point-or-error): New function. Like slime-sexp-at-point but signals an error when slime-sexp-at-point would return nil. - * swank-openmcl.lisp (swank-mop:compute-applicable-methods-using-classes): - Implement. + * swank-openmcl.lisp + (swank-mop:compute-applicable-methods-using-classes): Implement. 2006-02-16 Matthias Koeppe @@ -12461,13 +12474,13 @@ 2005-09-14 Alan Ruttenberg - * slime.el (slime-menu-choices-for-presentation), (slime-presentation-menu) - Fix loss after refactoring. xemacs can't handle lambda forms in - the menu spec given to x-popup-menu, only symbols, so save the - actions in a hash table keyed by a gensym, give x-popup-menu the - gensym and then call the gensym. Haven't checked that it actually - works in xemacs because my xemacs is hosed in os x Tiger. Could - someone let me know... + * slime.el (slime-menu-choices-for-presentation), + (slime-presentation-menu) Fix loss after refactoring. xemacs can't + handle lambda forms in the menu spec given to x-popup-menu, only + symbols, so save the actions in a hash table keyed by a gensym, + give x-popup-menu the gensym and then call the gensym. Haven't + checked that it actually works in xemacs because my xemacs is + hosed in os x Tiger. Could someone let me know... * swank.lisp (inspect-factor-more-action) rename (inspect-show-more-action) Prompt before reading how many @@ -13326,8 +13339,8 @@ 2005-05-22 Alan Ruttenberg * present.lisp. (slime-stream-p) check if a stream is destined for - output in a slime listener. (checks *connections* looks into pretty-print - streams in openmcl and cmucl) + output in a slime listener. (checks *connections* looks int + o pretty-print streams in openmcl and cmucl) Don't present unless (slime-stream-p stream). Variable *enable-presenting-readable-objects* The only readable object @@ -15326,11 +15339,12 @@ nicely via intern) - changes to (find-definitions) (function-source-location), - addition of (maybe-method-location) (remove-filename-quoting). To support - editing definitions of methods. To fix bug with pathnames with - quoted characters (like "\\.swank.lisp"). To remove bogus source - recording of l1-boot-3 in functions that didn't have a source file - noted. + addition of (maybe-method-location) (remove-filename-quoting). + + To support editing definitions of methods. To fix bug with + pathnames with quoted characters (like "\\.swank.lisp"). To remove + bogus source recording of l1-boot-3 in functions that didn't have + a source file noted. - Implementation of xref functions: (xref-locations) uses xref implementation added to openmcl recently. Note that you have to @@ -19247,7 +19261,8 @@ acknowleged by Emacs. (install-global-debugger-hook): Install a SLIME-DEBUGGER-FUNCTION globally on *DEBUGGER-HOOK*. - (startup-multiprocessing-for-emacs): Called to initialize multiprocessing. + (startup-multiprocessing-for-emacs): Called to initialize + multiprocessing. (eval-string): Dynamically set the *PROCESSING-RPC* flag. (eval-string): Nasty hack with *DEBUGGER-HOOK-PASSBACK* to install debugger hook. Temporary, I swear! --- /project/slime/cvsroot/slime/swank-cmucl.lisp 2012/03/26 15:10:08 1.242 +++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2012/04/07 09:35:42 1.243 @@ -41,14 +41,16 @@ (error 'type-error :datum (read-char stream nil #\Null) :expected-type (stream-element-type stream) - :format-control "Trying to read characters from a binary stream.")) + :format-control + "Trying to read characters from a binary stream.")) ;; Let's go as low level as it seems reasonable. (let* ((numbytes (- end start)) (total-bytes 0)) ;; read-n-bytes may return fewer bytes than requested, so we need ;; to keep trying. (loop while (plusp numbytes) do - (let ((bytes-read (system:read-n-bytes stream s start numbytes nil))) + (let ((bytes-read (system:read-n-bytes stream s + start numbytes nil))) (when (zerop bytes-read) (return-from read-into-simple-string total-bytes)) (incf total-bytes bytes-read) --- /project/slime/cvsroot/slime/swank-lispworks.lisp 2012/03/26 15:10:32 1.150 +++ /project/slime/cvsroot/slime/swank-lispworks.lisp 2012/04/07 09:35:42 1.151 @@ -363,7 +363,8 @@ (eq (dbg::call-frame-function-name frame) 'invoke-debugger))) (nth-next-frame frame 1))) - ;; if we can't find a invoke-debugger frame, take any old frame at the top + ;; if we can't find a invoke-debugger frame, take any old frame + ;; at the top (dbg::debugger-stack-current-frame dbg::*debugger-stack*))) (defimplementation call-with-debugging-environment (fn) @@ -400,7 +401,8 @@ (list (cond ((symbolp arg) (intern (symbol-name arg) :keyword)) ((and (consp arg) (symbolp (car arg))) - (intern (symbol-name (car arg)) :keyword)) + (intern (symbol-name (car arg)) + :keyword)) (t (caar arg))))) (list (dbg::dbg-eval (cond ((symbolp arg) arg) @@ -765,7 +767,8 @@ #'(lambda (object) (when (and #+Harlequin-PC-Lisp (low:compiled-code-p object) #+Harlequin-Unix-Lisp (sys:callablep object) - #-(or Harlequin-PC-Lisp Harlequin-Unix-Lisp) (sys:compiled-code-p object) + #-(or Harlequin-PC-Lisp Harlequin-Unix-Lisp) + (sys:compiled-code-p object) (system::find-constant$funcallable name object)) (vector-push-extend object callers)))) ;; Delay dspec:object-dspec until after sweep-all-objects From heller at common-lisp.net Sat Apr 7 10:23:39 2012 From: heller at common-lisp.net (CVS User heller) Date: Sat, 07 Apr 2012 03:23:39 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv7394/contrib Modified Files: ChangeLog Log Message: Even more long line breaking. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/06 18:08:30 1.541 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/07 10:23:39 1.542 @@ -5,12 +5,14 @@ 2012-04-04 Nikodemus Siivola - * slime-cl-indent.el (common-lisp-lambda-list-initial-value-form-p): New function. - Identifies initial-value-forms from lambda-lists, allowing them to be indented - as regular code. - (lisp-indent-259): Use the previous when indenting using &lambda to punt to - normal indentation when approriate. - * slime-cl-indent-test.txt (Test 87): Test indentation of initial-value forms. + * slime-cl-indent.el + (common-lisp-lambda-list-initial-value-form-p): New function. + Identifies initial-value-forms from lambda-lists, allowing them to + be indented as regular code. + (lisp-indent-259): Use the previous when indenting using &lambda + to punt to normal indentation when approriate. + * slime-cl-indent-test.txt (Test 87): Test indentation of + initial-value forms. 2012-03-19 Stas Boukarev @@ -59,27 +61,29 @@ 2012-03-30 Nikodemus Siivola - * slime-cl-indent.el (common-lisp-indent-function-1): Fix indentation - of (and ;; Foo\n...). Previously following lines were indented by one, instead - of using normal indentation. + * slime-cl-indent.el (common-lisp-indent-function-1): Fix + indentation of (and ;; Foo\n...). Previously following lines were + indented by one, instead of using normal indentation. * slime-cl-indent-test.txt (tests 84-86): Tests. 2011-12-30 Nikodemus Siivola - * slime-cl-indent.el (common-lisp-looking-at-keyword): New function. Looks - past #+foo expressions. + * slime-cl-indent.el (common-lisp-looking-at-keyword): New + function. Looks past #+foo expressions. (common-lisp-backward-keyword-argument): New function. Semi-aware of #+foo expressions. (common-lisp-indent-function-1): 1. Use `common-lisp-indent-parse-state-start'. - 2. Move #+/- cleavernes outside the cond: it is always a default, and shouldn't - trump other indentation logic. Also make it use the column of the first feature - expression, not the last. + 2. Move #+/- cleavernes outside the cond: it is always a default, + and shouldn't trump other indentation logic. Also make it use the + column of the first feature expression, not the last. 3. Make keyword alignment somewhat feature-expression aware. - 4. Make heuristics not force remaining forms to be indented at the same line. - (common-lisp-indent-test): Leave one leading whitespace on comment lines - when messing up indentation. + 4. Make heuristics not force remaining forms to be indented + at the same line. + + (common-lisp-indent-test): Leave one leading whitespace on comment + lines when messing up indentation. * slime-cl-indent-test.txt (tests 77-83): Tests for feature-expression and keyword alignment interaction. @@ -120,8 +124,9 @@ * slime-cl-indent-test.txt (tests 72-76): New tests. - * slime-cl-indent.el (common-lisp-init-standard-indentation): New function, - wraps initialization of the common-lisp-indent-function properties. + * slime-cl-indent.el (common-lisp-init-standard-indentation): New + function, wraps initialization of the common-lisp-indent-function + properties. 2011-12-06 Didier Verna @@ -232,12 +237,13 @@ 2011-11-19 Nikodemus Siivola - * slime-cl-indent.el ("sbcl"): Add indentation alias for !def-debug-command. + * slime-cl-indent.el ("sbcl"): Add indentation alias for + !def-debug-command. 2011-11-16 Stas Boukarev - * slime-repl.el (slime-open-stream-to-lisp): Set the process coding system - to the right coding system. + * slime-repl.el (slime-open-stream-to-lisp): Set the process + coding system to the right coding system. 2011-11-12 Nikodemus Siivola @@ -247,7 +253,8 @@ * slime-cl-indent.el (lisp-beginning-of-defmethod-qualifiers): Renamed from `lisp-beginning-of-defmethod'. Skip the method name as well, since unlike qualifiers it can be list -- eg. (setf foo). - (lisp-indent-defmethod): Use the above to get the number of skips right. + (lisp-indent-defmethod): Use the above to get the number of skips + right. * slime-cl-indent-test.txt: Tests 64 and 65. @@ -280,7 +287,8 @@ 2011-10-31 Nikodemus Siivola - * slime-cl-indent.el (style "sbcl"): Indentation for !DEF-TYPE-TRANSLATOR. + * slime-cl-indent.el (style "sbcl"): Indentation for + !DEF-TYPE-TRANSLATOR. 2011-10-29 Nikodemus Siivola @@ -305,8 +313,8 @@ 2011-10-05 Stas Boukarev - * slime-repl.el (slime-clear-repl-variables): New function, clears *, /, - and + variables. + * 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. @@ -352,8 +360,8 @@ 2011-08-30 Nikodemus Siivola - * slime-repl.el (slime-repl-suppress-prompt): New variable. Bind to T to - temporarily suppress the prompt. + * slime-repl.el (slime-repl-suppress-prompt): New variable. Bind + to T to temporarily suppress the prompt. (slime-eval-last-expression-in-repl): New command. Sends form from another buffer to REPL for evaluation. (slime-mode-map): Bind slime-eval-last-expression-in-repl to C-c C-j. @@ -370,11 +378,13 @@ 2011-06-21 Nikodemus Siivola - * slime-cl-indent.el (lisp-loop-indent-forms-like-keywords): Fix type error. - (common-lisp-style-default): Fix type error, move to after styles have been - defined so as to be able to offer a menu for picking the predefined styles. - ("sbcl"): Oops! It's (as ...) not (:as ...). Also add couple of missing defining - forms. + * slime-cl-indent.el (lisp-loop-indent-forms-like-keywords): Fix + type error. + (common-lisp-style-default): Fix type error, move to after styles + have been defined so as to be able to offer a menu for picking the + predefined styles. + ("sbcl"): Oops! It's (as ...) not (:as ...). Also add couple of + missing defining forms. 2011-06-16 Nikodemus Siivola @@ -436,9 +446,10 @@ Refactoring named styles. - * slime-cl-indent.el (define-common-lisp-style): Not a list of hooks anymore, - but just a single hook. Document the fact that code in :eval option may get - called multiple times over the lifetime of a buffer. + * slime-cl-indent.el (define-common-lisp-style): Not a list of + hooks anymore, but just a single hook. Document the fact that code + in :eval option may get called multiple times over the lifetime of + a buffer. (common-lisp-style-name, common-lisp-style-inherits) (common-lisp-style-variables, common-lisp-style-indentation) (common-lisp-style-hook, common-lisp-style-docstring) @@ -605,8 +616,8 @@ * slime-cl-indent.el (common-lisp-indent-function-1): Better #+ support. - (common-lisp-loop-part-indentation): Make newline-and-indent work better - with non-subclause-aware loop indentation. + (common-lisp-loop-part-indentation): Make newline-and-indent work + better with non-subclause-aware loop indentation. 2011-05-15 Didier Verna @@ -633,13 +644,15 @@ * slime-cl-indent.el (lisp-indent-lambda-list): Use sexp-based traversal instead of regular expressions to figure out how to - indent lambda-lists. Allows indenting destructuring lambda-lists correctly: - previously we could align to a keyword in a previous sublist, instead - of the sublist itself. - (lisp-indent-lambda-list-keywords-regexp): Add support for non-standard &more. + indent lambda-lists. Allows indenting destructuring lambda-lists + correctly: previously we could align to a keyword in a previous + sublist, instead of the sublist itself. + (lisp-indent-lambda-list-keywords-regexp): Add support for + non-standard &more. (test-lisp-indent, run-lisp-indent-tests): Rudimentary tests. - (lisp-indent-259): Use lambda-list-indentation even if the CDR of the path - isn't null: this allows correct indentation of destructuring sublists. + (lisp-indent-259): Use lambda-list-indentation even if the CDR of + the path isn't null: this allows correct indentation of + destructuring sublists. (run-lisp-indent-tests): More test-cases. 2011-05-11 Nikodemus Siivola @@ -673,7 +686,8 @@ (common-lisp-indent-parse-state-start): (common-lisp-indent-parse-state-prev): Parse state accessors. (common-lisp-indent-loop-macro-1): Subclause aware loop indentation. - (common-lisp-indent-loop-advance-past-keyword-on-line): Utility used by the above. + (common-lisp-indent-loop-advance-past-keyword-on-line): Utility + used by the above. 2011-05-10 Nikodemus Siivola @@ -723,8 +737,9 @@ entries. * slime-cl-indent.el (lisp-lambda-list-keyword-alignment): * slime-cl-indent.el (lisp-lambda-list-keyword-parameter-indentation): - * slime-cl-indent.el (lisp-lambda-list-keyword-parameter-alignment): New - customizable user options. + * slime-cl-indent.el + (lisp-lambda-list-keyword-parameter-alignment): New customizable + user options. * slime-cl-indent.el (lisp-indent-defun-method): Improve docstring. * slime-cl-indent.el (extended-loop-p): Fix comment. * slime-cl-indent.el (lisp-indent-lambda-list-keywords-regexp): New @@ -1138,10 +1153,12 @@ 2010-04-18 Stas Boukarev * slime-presentations.el - (slime-repl-grab-old-output,slime-copy-or-inspect-presentation-at-mouse): - If the presentation at point is no longer available, remove - presentation properties from the object. - * swank-presentations.lisp (lookup-presented-object): defun->defslimefun. + (slime-repl-grab-old-output) + (slime-copy-or-inspect-presentation-at-mouse): If the presentation + at point is no longer available, remove presentation properties + from the object. + * swank-presentations.lisp (lookup-presented-object): + defun->defslimefun. 2010-04-06 Stas Boukarev @@ -1225,15 +1242,15 @@ 2010-03-20 Stas Boukarev - * slime-c-p-c.el, slime-fuzzy.el: Don't define keys on slime-repl-mode-map - if slime-repl isn't loaded. + * slime-c-p-c.el, slime-fuzzy.el: Don't define keys on + slime-repl-mode-map if slime-repl isn't loaded. * slime-presentations.el: Refuse to load if slime-repl isn't loaded. Reported by Robert Goldman. 2010-03-13 Stas Boukarev - * slime-asdf.el: use slime-from-lisp-filename so that slime-tramp can work. - Reported by Peter Stirling. + * slime-asdf.el: use slime-from-lisp-filename so that slime-tramp + can work. Reported by Peter Stirling. 2010-03-12 Stas Boukarev @@ -1879,8 +1896,9 @@ * slime-repl.el (slime-repl-position-in-history): Add new optional parameter `exclude-string'. - (slime-repl-history-replace): Don't replace history item if it's exactly - matching the current input, search for the next match instead. + (slime-repl-history-replace): Don't replace history item if it's + exactly matching the current input, search for the next match + instead. 2009-11-19 Tobias C. Rittweiler @@ -1962,10 +1980,10 @@ 2009-11-02 Stas Boukarev - * slime-parse.el (slime-incomplete-form-at-point): Concatenate " )" - not just ")", because the form's last char may be \, and the parenthesis - will be escaped. - That fixes a bug reported by Ariel Badichi. + * slime-parse.el (slime-incomplete-form-at-point): Concatenate + " )" not just ")", because the form's last char may be \, + and the parenthesis will be escaped. That fixes a bug reported by + Ariel Badichi. 2009-10-31 Tobias C. Rittweiler @@ -2156,7 +2174,8 @@ 2009-08-27 Stas Boukarev - * slime-c-p-c.el (slime-contextual-completions): Detect characters properly. + * slime-c-p-c.el (slime-contextual-completions): Detect characters + properly. (slime-completions-for-character): Append #\ to the character names. This fixes character completion, reported by Nick Levine. @@ -2265,9 +2284,9 @@ * slime-fuzzy.el (slime-fuzzy-complete-symbol): show message in the minibuffer after showing completion list, because completion itself can take place in the minibuffer. - (slime-fuzzy-choices-buffer): if completion was started in the minibuffer, - don't switch to minibuffer in the other window, but select minibuffer window - instead. + (slime-fuzzy-choices-buffer): if completion was started in the + minibuffer, don't switch to minibuffer in the other window, but + select minibuffer window instead. 2009-06-23 Helmut Eller @@ -3051,10 +3070,10 @@ 2008-04-06 Tobias C. Rittweiler - * slime-presentations.lisp: + * slime-presentations.lisp: (slime-maybe-M-.-presentation-at-point): Renamed to `slime-edit-presentation'. Now makes sure to decline if user gave - a name explicitly. + a name explicitly. 2008-03-24 Helmut Eller @@ -3072,7 +3091,7 @@ string representation of the classifications rather than the classifications themselves. (Notice this propagates up to (and consequently changes the return value of) the RPC function - FUZZY-COMPLETIONS. (incompatible api change.) + FUZZY-COMPLETIONS. (incompatible api change.) Rationale: The number of supported classification can be changed without having to adapt its display at the client. @@ -3106,11 +3125,11 @@ 2008-03-02 Tobias C. Rittweiler - M-. now works on presentations. + M-. now works on presentations. Additionally, a Find Definition entry is presented in the menu appearing on right clicking on a presentation. - + * slime-presentations.lisp (slime-M-.-presentation): New function. (slime-M-.-presentation-at-mouse): New function. (slime-M-.-presentation-at-point): New function. @@ -3128,7 +3147,7 @@ Having the `slime-presentations' contrib enabled, (princ 10) resulted in "1010" rather than "10\n10". (This also caused a regression in the `repl-test' test case.) - + * swank-presentations.lisp (present-repl-results): Emit fresh-line as the original SEND-REPL-RESULTS-TO-EMACS does. @@ -3222,16 +3241,16 @@ 2008-01-20 Matthias Koeppe - Hook presentations into debugger and inspector, restoring + Hook presentations into debugger and inspector, restoring features that were removed on 2007-08-27. - + * slime-presentations.el (slime-presentation-add-easy-menu): Install presentation menu also in the debugger and inspector. (slime-presentation-inspector-insert-ispec): New. (slime-presentation-sldb-insert-frame-variable-value): New. (slime-presentations-init): Install these functions as slime-inspector-insert-ispec-function and - sldb-insert-frame-variable-value-function. + sldb-insert-frame-variable-value-function. 2008-01-19 Helmut Eller @@ -3243,7 +3262,7 @@ * slime-presentations.el (slime-copy-or-inspect-presentation-at-mouse): Call slime-copy-presentation-at-mouse-to-repl rather than - slime-copy-presentation-at-mouse. + slime-copy-presentation-at-mouse. 2008-01-10 Tobias C. Rittweiler @@ -3252,42 +3271,42 @@ * swank-arglist.lisp (read-form-spec): Added assertion against receiving junk form specs from Emacs. - + 2008-01-10 Tobias C. Rittweiler * slime-editing-commands.el (slime-close-all-parens-in-sexp): Use new portability function `slime-delete-and-extract-region'. - + 2008-01-10 Tobias C. Rittweiler * swank-parse.lisp (slime-incomplete-form-at-point): Hopefully better fix than before. [328 lines skipped] From sboukarev at common-lisp.net Mon Apr 9 13:50:05 2012 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Mon, 09 Apr 2012 06:50:05 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv3272 Modified Files: ChangeLog slime.el Log Message: * slime.el (def-slime-test utf-8-source): Remove literal Unicode characters in the form of \xFFFF, it causes problems for some people. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/07 10:23:38 1.2312 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/09 13:50:04 1.2313 @@ -1,3 +1,9 @@ +2012-04-09 Stas Boukarev + + * slime.el (def-slime-test utf-8-source): Remove literal Unicode + characters in the form of \xFFFF, it causes problems for some + people. + 2012-04-07 Helmut Eller Fix long lines. --- /project/slime/cvsroot/slime/slime.el 2012/04/07 08:19:32 1.1396 +++ /project/slime/cvsroot/slime/slime.el 2012/04/09 13:50:04 1.1397 @@ -8022,8 +8022,10 @@ (def-slime-test utf-8-source (input output) "Source code containing utf-8 should work" - '(("(defun cl-user::foo () \"\x304a\x306f\x3088\x3046\")" - "\x304a\x306f\x3088\x3046")) + `((,(format "(defun cl-user::foo () \"%c%c%c%c\")" + #x304a #x306f #x3088 #x3046) + ,(format "%c%c%c%c" + #x304a #x306f #x3088 #x3046))) (slime-eval `(cl:eval (cl:read-from-string ,input))) (slime-test-expect "Eval result correct" output (slime-eval '(cl-user::foo))) From sboukarev at common-lisp.net Tue Apr 10 11:33:28 2012 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Tue, 10 Apr 2012 04:33:28 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv31935 Modified Files: ChangeLog slime.el Log Message: * slime.el (def-slime-test utf-8-source): Another try at fixing utf8 literals in code. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/09 13:50:04 1.2313 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/10 11:33:28 1.2314 @@ -1,3 +1,8 @@ +2012-04-10 Stas Boukarev + + * slime.el (def-slime-test utf-8-source): Another try at fixing + utf8 literals in code. + 2012-04-09 Stas Boukarev * slime.el (def-slime-test utf-8-source): Remove literal Unicode --- /project/slime/cvsroot/slime/slime.el 2012/04/09 13:50:04 1.1397 +++ /project/slime/cvsroot/slime/slime.el 2012/04/10 11:33:28 1.1398 @@ -8022,9 +8022,9 @@ (def-slime-test utf-8-source (input output) "Source code containing utf-8 should work" - `((,(format "(defun cl-user::foo () \"%c%c%c%c\")" + (list (list (format "(defun cl-user::foo () \"%c%c%c%c\")" #x304a #x306f #x3088 #x3046) - ,(format "%c%c%c%c" + (format "%c%c%c%c" #x304a #x306f #x3088 #x3046))) (slime-eval `(cl:eval (cl:read-from-string ,input))) (slime-test-expect "Eval result correct" From sboukarev at common-lisp.net Tue Apr 10 17:52:57 2012 From: sboukarev at common-lisp.net (CVS User sboukarev) Date: Tue, 10 Apr 2012 10:52:57 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv30907 Modified Files: ChangeLog slime.el Log Message: * slime.el (def-slime-test utf-8-source): Define only when (and (featurep 'emacs) (>= emacs-major-version 23)). --- /project/slime/cvsroot/slime/ChangeLog 2012/04/10 11:33:28 1.2314 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/10 17:52:57 1.2315 @@ -1,5 +1,10 @@ 2012-04-10 Stas Boukarev + * slime.el (def-slime-test utf-8-source): Define only when + (and (featurep 'emacs) (>= emacs-major-version 23)). + +2012-04-10 Stas Boukarev + * slime.el (def-slime-test utf-8-source): Another try at fixing utf8 literals in code. --- /project/slime/cvsroot/slime/slime.el 2012/04/10 11:33:28 1.1398 +++ /project/slime/cvsroot/slime/slime.el 2012/04/10 17:52:57 1.1399 @@ -8019,49 +8019,51 @@ (slime-check "Compilation successfull" (eq (slime-compilation-result.successp result) t)))))) -(def-slime-test utf-8-source - (input output) +(when (and (featurep 'emacs) + (>= emacs-major-version 23)) + (def-slime-test utf-8-source + (input output) "Source code containing utf-8 should work" - (list (list (format "(defun cl-user::foo () \"%c%c%c%c\")" - #x304a #x306f #x3088 #x3046) - (format "%c%c%c%c" - #x304a #x306f #x3088 #x3046))) - (slime-eval `(cl:eval (cl:read-from-string ,input))) - (slime-test-expect "Eval result correct" - output (slime-eval '(cl-user::foo))) - (let ((cell (cons nil nil))) - (let ((hook (slime-curry (lambda (cell &rest _) (setcar cell t)) cell))) - (add-hook 'slime-compilation-finished-hook hook) - (unwind-protect - (progn - (slime-compile-string input 0) - (slime-wait-condition "Compilation finished" - (lambda () (car cell)) - 0.5) - (slime-test-expect "Compile-string result correct" - output (slime-eval '(cl-user::foo)))) - (remove-hook 'slime-compilation-finished-hook hook)) - (let ((filename "/tmp/slime-tmp-file.lisp")) - (setcar cell nil) + (list (list (format "(defun cl-user::foo () \"%c%c%c%c\")" + #x304a #x306f #x3088 #x3046) + (format "%c%c%c%c" + #x304a #x306f #x3088 #x3046))) + (slime-eval `(cl:eval (cl:read-from-string ,input))) + (slime-test-expect "Eval result correct" + output (slime-eval '(cl-user::foo))) + (let ((cell (cons nil nil))) + (let ((hook (slime-curry (lambda (cell &rest _) (setcar cell t)) cell))) (add-hook 'slime-compilation-finished-hook hook) - (unwind-protect - (with-temp-buffer - (when (fboundp 'set-buffer-multibyte) - (set-buffer-multibyte t)) - (setq buffer-file-coding-system 'utf-8-unix) - (setq buffer-file-name filename) - (insert ";; -*- coding: utf-8-unix -*- \n") - (insert input) - (write-region nil nil filename nil t) - (let ((slime-load-failed-fasl 'always)) - (slime-compile-and-load-file) - (slime-wait-condition "Compilation finished" - (lambda () (car cell)) - 0.5)) - (slime-test-expect "Compile-file result correct" - output (slime-eval '(cl-user::foo)))) - (remove-hook 'slime-compilation-finished-hook hook) - (ignore-errors (delete-file filename))))))) + (unwind-protect + (progn + (slime-compile-string input 0) + (slime-wait-condition "Compilation finished" + (lambda () (car cell)) + 0.5) + (slime-test-expect "Compile-string result correct" + output (slime-eval '(cl-user::foo)))) + (remove-hook 'slime-compilation-finished-hook hook)) + (let ((filename "/tmp/slime-tmp-file.lisp")) + (setcar cell nil) + (add-hook 'slime-compilation-finished-hook hook) + (unwind-protect + (with-temp-buffer + (when (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte t)) + (setq buffer-file-coding-system 'utf-8-unix) + (setq buffer-file-name filename) + (insert ";; -*- coding: utf-8-unix -*- \n") + (insert input) + (write-region nil nil filename nil t) + (let ((slime-load-failed-fasl 'always)) + (slime-compile-and-load-file) + (slime-wait-condition "Compilation finished" + (lambda () (car cell)) + 0.5)) + (slime-test-expect "Compile-file result correct" + output (slime-eval '(cl-user::foo)))) + (remove-hook 'slime-compilation-finished-hook hook) + (ignore-errors (delete-file filename)))))))) (def-slime-test async-eval-debugging (depth) "Test recursive debugging of asynchronous evaluation requests." From heller at common-lisp.net Wed Apr 11 11:38:56 2012 From: heller at common-lisp.net (CVS User heller) Date: Wed, 11 Apr 2012 04:38:56 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv12121 Modified Files: ChangeLog Log Message: * slime.el ([test] utf-8-source): Use the encoded byte sequence of the Unicode string. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/10 17:52:57 1.2315 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/11 11:38:56 1.2316 @@ -1,3 +1,8 @@ +2012-04-11 Helmut Eller + + * slime.el ([test] utf-8-source): Use the encoded byte sequence of + the Unicode string. + 2012-04-10 Stas Boukarev * slime.el (def-slime-test utf-8-source): Define only when From heller at common-lisp.net Wed Apr 11 11:39:03 2012 From: heller at common-lisp.net (CVS User heller) Date: Wed, 11 Apr 2012 04:39:03 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv12236 Modified Files: slime.el Log Message: * slime.el ([test] utf-8-source): Use the encoded byte sequence of the Unicode string. --- /project/slime/cvsroot/slime/slime.el 2012/04/10 17:52:57 1.1399 +++ /project/slime/cvsroot/slime/slime.el 2012/04/11 11:39:03 1.1400 @@ -8019,51 +8019,53 @@ (slime-check "Compilation successfull" (eq (slime-compilation-result.successp result) t)))))) -(when (and (featurep 'emacs) - (>= emacs-major-version 23)) - (def-slime-test utf-8-source - (input output) +(def-slime-test utf-8-source + (input output) "Source code containing utf-8 should work" - (list (list (format "(defun cl-user::foo () \"%c%c%c%c\")" - #x304a #x306f #x3088 #x3046) - (format "%c%c%c%c" - #x304a #x306f #x3088 #x3046))) - (slime-eval `(cl:eval (cl:read-from-string ,input))) - (slime-test-expect "Eval result correct" - output (slime-eval '(cl-user::foo))) - (let ((cell (cons nil nil))) - (let ((hook (slime-curry (lambda (cell &rest _) (setcar cell t)) cell))) + (list (let* ((bytes "\343\201\212\343\201\257\343\202\210\343\201\206") + ;;(encode-coding-string (string #x304a #x306f #x3088 #x3046) + ;; 'utf-8) + (string (decode-coding-string bytes 'utf-8-unix))) + (assert (equal bytes (encode-coding-string string 'utf-8-unix))) + (list (concat "(defun cl-user::foo () \"" string "\")") + string))) + (slime-eval `(cl:eval (cl:read-from-string ,input))) + (slime-test-expect "Eval result correct" + output (slime-eval '(cl-user::foo))) + (let ((cell (cons nil nil))) + (let ((hook (slime-curry (lambda (cell &rest _) (setcar cell t)) cell))) + (add-hook 'slime-compilation-finished-hook hook) + (unwind-protect + (progn + (slime-compile-string input 0) + (slime-wait-condition "Compilation finished" + (lambda () (car cell)) + 0.5) + (slime-test-expect "Compile-string result correct" + output (slime-eval '(cl-user::foo)))) + (remove-hook 'slime-compilation-finished-hook hook)) + (let ((filename "/tmp/slime-tmp-file.lisp")) + (setcar cell nil) (add-hook 'slime-compilation-finished-hook hook) - (unwind-protect - (progn - (slime-compile-string input 0) - (slime-wait-condition "Compilation finished" - (lambda () (car cell)) - 0.5) - (slime-test-expect "Compile-string result correct" - output (slime-eval '(cl-user::foo)))) - (remove-hook 'slime-compilation-finished-hook hook)) - (let ((filename "/tmp/slime-tmp-file.lisp")) - (setcar cell nil) - (add-hook 'slime-compilation-finished-hook hook) - (unwind-protect - (with-temp-buffer - (when (fboundp 'set-buffer-multibyte) - (set-buffer-multibyte t)) - (setq buffer-file-coding-system 'utf-8-unix) - (setq buffer-file-name filename) - (insert ";; -*- coding: utf-8-unix -*- \n") - (insert input) - (write-region nil nil filename nil t) - (let ((slime-load-failed-fasl 'always)) - (slime-compile-and-load-file) - (slime-wait-condition "Compilation finished" - (lambda () (car cell)) - 0.5)) - (slime-test-expect "Compile-file result correct" - output (slime-eval '(cl-user::foo)))) - (remove-hook 'slime-compilation-finished-hook hook) - (ignore-errors (delete-file filename)))))))) + (unwind-protect + (with-temp-buffer + (when (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte t)) + (setq buffer-file-coding-system 'utf-8-unix) + (setq buffer-file-name filename) + (insert ";; -*- coding: utf-8-unix -*- \n") + (insert input) + (let ((coding-system-for-write 'utf-8-unix)) + (write-region nil nil filename nil t)) + (let ((slime-load-failed-fasl 'always)) + (slime-compile-and-load-file) + (slime-wait-condition "Compilation finished" + (lambda () (car cell)) + 0.5)) + (slime-test-expect "Compile-file result correct" + output (slime-eval '(cl-user::foo)))) + (remove-hook 'slime-compilation-finished-hook hook) + (ignore-errors (delete-file filename))))))) (def-slime-test async-eval-debugging (depth) "Test recursive debugging of asynchronous evaluation requests." From nsiivola at common-lisp.net Fri Apr 13 16:14:58 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 13 Apr 2012 09:14:58 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv30478/contrib Modified Files: ChangeLog slime-cl-indent.el Log Message: slime-indentation: fix long lines --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/07 10:23:39 1.542 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:14:57 1.543 @@ -1,3 +1,9 @@ +2012-04-13 Nikodemus Siivola + + Wrap long lines. + + * slime-cl-indent.el + 2012-04-06 Stas Boukarev * swank-fancy-inspector.lisp (format-iso8601-time): Add 1 to the --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/04 12:04:42 1.64 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/13 16:14:58 1.65 @@ -208,13 +208,14 @@ (defun common-lisp-style-hook (style) (fifth style)) (defun common-lisp-style-docstring (style) (sixth style)) -(defun common-lisp-make-style (stylename inherits variables indentation hook documentation) +(defun common-lisp-make-style (stylename inherits variables indentation hook + documentation) (list stylename inherits variables indentation hook documentation)) (defvar common-lisp-style nil) -;;; `define-common-lisp-style' updates the docstring of `common-lisp-style', using -;;; this as the base. +;;; `define-common-lisp-style' updates the docstring of +;;; `common-lisp-style', using this as the base. (put 'common-lisp-style 'common-lisp-style-base-doc "Name of the Common Lisp indentation style used in the current buffer. Set this by giving eg. @@ -240,7 +241,8 @@ (defun common-lisp-lisp-mode-hook () (let ((style (or common-lisp-style common-lisp-style-default))) (when style - (set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function) + (set (make-local-variable 'lisp-indent-function) + 'common-lisp-indent-function) (common-lisp-set-style style)))) (add-hook 'lisp-mode-hook 'common-lisp-lisp-mode-hook) @@ -258,7 +260,7 @@ (error "Unknown Common Lisp style: %s" name)))) (defun common-lisp-safe-style-p (stylename) - "True for known Common Lisp style which doesn't have or inherit an :EVAL option. + "True for known Common Lisp style without an :EVAL option. Ie. styles that will not evaluate arbitrary code on activation." (let* ((style (ignore-errors (common-lisp-find-style stylename))) (base (common-lisp-style-inherits style))) @@ -267,15 +269,16 @@ (or (not base) (common-lisp-safe-style-p base))))) -(defun common-lisp-add-style (stylename inherits variables indentation hooks documentation) +(defun common-lisp-add-style (stylename inherits variables indentation hooks + documentation) ;; Invalidate indentation methods cached in common-lisp-active-style. (maphash (lambda (k v) (puthash k (copy-list v) common-lisp-styles)) common-lisp-styles) ;; Add/Redefine the specified style. (puthash stylename - (common-lisp-make-style stylename inherits variables indentation hooks - documentation) + (common-lisp-make-style stylename inherits variables indentation + hooks documentation) common-lisp-styles) ;; Frob `common-lisp-style' docstring. (let ((doc (get 'common-lisp-style 'common-lisp-style-base-doc)) @@ -365,7 +368,8 @@ (completing-read prompt (common-lisp-style-names) nil t nil 'common-lisp-set-style-history)))) - (setq common-lisp-style (common-lisp-style-name (common-lisp-find-style stylename)) + (setq common-lisp-style (common-lisp-style-name + (common-lisp-find-style stylename)) common-lisp-active-style nil) ;; Actually activates the style. (common-lisp-active-style-methods) @@ -529,7 +533,8 @@ (re-search-forward "[ :\"]+") (let ((start (point))) (re-search-forward "[\":)]") - (setf pkg (upcase (buffer-substring-no-properties start (1- (point))))))))) + (setf pkg (upcase (buffer-substring-no-properties + start (1- (point))))))))) pkg)) (defun common-lisp-current-package-function 'common-lisp-guess-current-package @@ -644,11 +649,14 @@ (not (looking-at re))) (setq indent (current-column))) (when (and indent - (looking-at common-lisp-indent-body-introducing-loop-macro-keyword)) + (looking-at + common-lisp-body-introducing-loop-macro-keyword)) t))) (list indent loop-start)) ;; Keyword-style or comment outside body - ((or lisp-loop-indent-forms-like-keywords (looking-at re) (looking-at ";")) + ((or lisp-loop-indent-forms-like-keywords + (looking-at re) + (looking-at ";")) (if (and (looking-at ";") (let ((p (common-lisp-trailing-comment))) (when p @@ -743,26 +751,27 @@ (unless (eql (elt string (- len i 1)) (char-before (- (point) i))) (return nil))))) -(defvar common-lisp-feature-expression-regexp "#!?\\(+\\|-\\)") +(defvar common-lisp-feature-expr-regexp "#!?\\(+\\|-\\)") ;;; Semi-feature-expression aware keyword check. (defun common-lisp-looking-at-keyword () (or (looking-at ":") - (and (looking-at common-lisp-feature-expression-regexp) + (and (looking-at common-lisp-feature-expr-regexp) (save-excursion (forward-sexp) (skip-chars-forward " \t\n") (common-lisp-looking-at-keyword))))) -;;; Semi-feature-expression aware backwards movement for keyword argument pairs. +;;; Semi-feature-expression aware backwards movement for keyword +;;; argument pairs. (defun common-lisp-backward-keyword-argument () (ignore-errors (backward-sexp 2) - (when (looking-at common-lisp-feature-expression-regexp) + (when (looking-at common-lisp-feature-expr-regexp) (cond ((ignore-errors (save-excursion (backward-sexp 2) - (looking-at common-lisp-feature-expression-regexp))) + (looking-at common-lisp-feature-expr-regexp))) (common-lisp-backward-keyword-argument)) ((ignore-errors (save-excursion @@ -822,7 +831,8 @@ ;; The pleblisp package feature (setq function (substring function (1+ (match-beginning 0))) - method (common-lisp-get-indentation (intern-soft function) full))) + method (common-lisp-get-indentation + (intern-soft function) full))) ((and (null method)) ;; backwards compatibility (setq method (common-lisp-get-indentation tem))))) @@ -862,17 +872,20 @@ (goto-char indent-point) (backward-sexp) (let ((indent (current-column))) - (when (or (looking-at common-lisp-feature-expression-regexp) + (when (or (looking-at common-lisp-feature-expr-regexp) (ignore-errors (backward-sexp) - (when (looking-at common-lisp-feature-expression-regexp) + (when (looking-at + common-lisp-feature-expr-regexp) (setq indent (current-column)) (let ((line (line-number-at-pos))) - (while (ignore-errors - (backward-sexp 2) - (and - (= line (line-number-at-pos)) - (looking-at common-lisp-feature-expression-regexp))) + (while + (ignore-errors + (backward-sexp 2) + (and + (= line (line-number-at-pos)) + (looking-at + common-lisp-feature-expr-regexp))) (setq indent (current-column)))) t))) (setq calculated (list indent containing-form-start))))) @@ -917,8 +930,9 @@ (when (common-lisp-looking-at-keyword) (while (common-lisp-backward-keyword-argument) (when (common-lisp-looking-at-keyword) - (setq calculated (list (current-column) - containing-form-start))))))))) + (setq calculated + (list (current-column) + containing-form-start))))))))) ((integerp method) ;; convenient top-level hack. ;; (also compatible with lisp-indent-function) @@ -954,8 +968,8 @@ (or calculated tentative-calculated ;; Fallback. ;; - ;; Instead of punting directly to calculate-lisp-indent we handle a few - ;; of cases it doesn't deal with: + ;; Instead of punting directly to calculate-lisp-indent we + ;; handle a few of cases it doesn't deal with: ;; ;; A: (foo ( ;; bar zot @@ -1029,7 +1043,8 @@ (defvar lisp-indent-lambda-list-keywords-regexp "&\\(\ -optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\\|more\ +optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|\ +environment\\|more\ \\)\\>" "Regular expression matching lambda-list keywords.") @@ -1037,61 +1052,68 @@ (indent-point sexp-column containing-form-start) (if (not lisp-lambda-list-indentation) (1+ sexp-column) - (let (limit) - (cond ((save-excursion - (goto-char indent-point) - (back-to-indentation) - (setq limit (point)) - (looking-at lisp-indent-lambda-list-keywords-regexp)) - ;; We're facing a lambda-list keyword. - (if lisp-lambda-list-keyword-alignment - ;; Align to the first keyword if any, or to the beginning of - ;; the lambda-list. - (save-excursion - (goto-char containing-form-start) - (down-list) - (let ((key-indent nil) - (next t)) - (while (and next (< (point) indent-point)) - (if (looking-at lisp-indent-lambda-list-keywords-regexp) - (setq key-indent (current-column) - next nil) - (setq next (ignore-errors (forward-sexp) t)) - (if next - (ignore-errors - (forward-sexp) - (backward-sexp))))) - (or key-indent - (1+ sexp-column)))) - ;; Align to the beginning of the lambda-list. - (1+ sexp-column))) - (t - ;; Otherwise, align to the first argument of the last lambda-list - ;; keyword, the keyword itself, or the beginning of the - ;; lambda-list. - (save-excursion - (goto-char indent-point) - (let ((indent nil) - (next t)) - (while (and next (> (point) containing-form-start)) - (setq next (ignore-errors (backward-sexp) t)) - (let* ((col (current-column)) - (pos - (save-excursion - (ignore-errors (forward-sexp)) - (skip-chars-forward " \t") - (if (eolp) - (+ col lisp-lambda-list-keyword-parameter-indentation) - col)))) - (if (looking-at lisp-indent-lambda-list-keywords-regexp) - (setq indent (if lisp-lambda-list-keyword-parameter-alignment - (or indent pos) - (+ col - lisp-lambda-list-keyword-parameter-indentation)) - next nil) - (progn - (setq indent col))))) - (or indent (1+ sexp-column))))))))) + (lisp-properly-indent-lambda-list + indent-point sexp-column containing-form-start))) + +(defun lisp-properly-indent-lambda-list + (indent-point sexp-column containing-form-start) + (let (limit) + (cond + ((save-excursion + (goto-char indent-point) + (back-to-indentation) + (setq limit (point)) + (looking-at lisp-indent-lambda-list-keywords-regexp)) + ;; We're facing a lambda-list keyword. + (if lisp-lambda-list-keyword-alignment + ;; Align to the first keyword if any, or to the beginning of + ;; the lambda-list. + (save-excursion + (goto-char containing-form-start) + (down-list) + (let ((key-indent nil) + (next t)) + (while (and next (< (point) indent-point)) + (if (looking-at lisp-indent-lambda-list-keywords-regexp) + (setq key-indent (current-column) + next nil) + (setq next (ignore-errors (forward-sexp) t)) + (if next + (ignore-errors + (forward-sexp) + (backward-sexp))))) + (or key-indent + (1+ sexp-column)))) + ;; Align to the beginning of the lambda-list. + (1+ sexp-column))) + (t + ;; Otherwise, align to the first argument of the last lambda-list + ;; keyword, the keyword itself, or the beginning of the + ;; lambda-list. + (save-excursion + (goto-char indent-point) + (let ((indent nil) + (next t)) + (while (and next (> (point) containing-form-start)) + (setq next (ignore-errors (backward-sexp) t)) + (let* ((col (current-column)) + (pos + (save-excursion + (ignore-errors (forward-sexp)) + (skip-chars-forward " \t") + (if (eolp) + (+ col + lisp-lambda-list-keyword-parameter-indentation) + col)))) + (if (looking-at lisp-indent-lambda-list-keywords-regexp) + (setq indent + (if lisp-lambda-list-keyword-parameter-alignment + (or indent pos) + (+ col + lisp-lambda-list-keyword-parameter-indentation)) + next nil) + (setq indent col)))) + (or indent (1+ sexp-column)))))))) (defun common-lisp-lambda-list-initial-value-form-p (point) (let ((state 'x) @@ -1365,7 +1387,8 @@ 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))) + (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 @@ -1374,13 +1397,13 @@ ;;;; LOOP indentation, the complex version -- handles subclause indentation ;; Regexps matching various varieties of loop macro keyword ... -(defvar common-lisp-indent-body-introducing-loop-macro-keyword +(defvar common-lisp-body-introducing-loop-macro-keyword "\\(#?:\\)?\\(do\\|finally\\|initially\\)" "Regexp matching loop macro keywords which introduce body-forms.") ;; This is so "and when" and "else when" get handled right ;; (not to mention "else do" !!!) -(defvar common-lisp-indent-prefix-loop-macro-keyword +(defvar common-lisp-prefix-loop-macro-keyword "\\(#?:\\)?\\(and\\|else\\)" "Regexp matching loop macro keywords which are prefixes.") @@ -1391,16 +1414,18 @@ ;; This is handled right, but it's incomplete ... ;; (It could probably get arbitrarily long if I did *every* iteration-path) (defvar common-lisp-indent-indented-loop-macro-keyword - "\\(#?:\\)?\\(into\\|by\\|upto\\|downto\\|above\\|below\\|on\\|being\\|=\\|first\\|then\\|from\\|to\\)" + "\\(#?:\\)\ +?\\(into\\|by\\|upto\\|downto\\|above\\|below\\|on\\|being\\|=\\|first\\|\ +then\\|from\\|to\\)" "Regexp matching keywords introducing loop subclauses. Always indented two.") -(defvar common-lisp-indent-indenting-loop-macro-keyword +(defvar common-lisp-indenting-loop-macro-keyword "\\(#?:\\)?\\(when\\|unless\\|if\\)" "Regexp matching keywords introducing conditional clauses. Cause subsequent clauses to be indented.") -(defvar common-lisp-indent-loop-macro-else-keyword "\\(#?:\\)?else") +(defvar common-lisp-loop-macro-else-keyword "\\(#?:\\)?else") ;;; Attempt to indent the loop macro ... @@ -1420,7 +1445,7 @@ ;; base column for indentation (goto-char (common-lisp-indent-parse-state-start parse-state)) (let ((loop-start-column (current-column))) - (common-lisp-indent-loop-advance-past-keyword-on-line) + (common-lisp-loop-advance-past-keyword-on-line) (when (eolp) (forward-line 1) @@ -1433,7 +1458,8 @@ (let* ((case-fold-search t) (loop-macro-first-clause (point)) - (previous-expression-start (common-lisp-indent-parse-state-prev parse-state)) + (previous-expression-start + (common-lisp-indent-parse-state-prev parse-state)) (default-value (current-column)) (loop-body-p nil) (loop-body-indentation nil) @@ -1443,11 +1469,11 @@ (goto-char previous-expression-start) ;; Handle a body-introducing-clause which ends a line specially. - (if (looking-at common-lisp-indent-body-introducing-loop-macro-keyword) + (if (looking-at common-lisp-body-introducing-loop-macro-keyword) (let ((keyword-position (current-column))) (setq loop-body-p t) (setq loop-body-indentation [125 lines skipped] From nsiivola at common-lisp.net Fri Apr 13 16:15:40 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 13 Apr 2012 09:15: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-serv32007/contrib Modified Files: ChangeLog slime-cl-indent-test.txt slime-cl-indent.el Log Message: slime-indentation: correct indentation for &AUX value forms in lambda-lists --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:14:57 1.543 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:15:40 1.544 @@ -1,5 +1,13 @@ 2012-04-13 Nikodemus Siivola + * slime-cl-indent.el (common-lisp-lambda-list-initial-value-form-p): + Handle &AUX as well, and don't signal an error if the we don't + have a list where expected. + * slime-cl-indent-test.txt (Test 88): Test for indenting &AUX value + form. + +2012-04-13 Nikodemus Siivola + Wrap long lines. * slime-cl-indent.el --- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/04/04 12:04:42 1.20 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/04/13 16:15:40 1.21 @@ -926,3 +926,12 @@ &rest rest)) (list foo opt1 opt2 rest)) + +;;; Test: 88 + +(defstruct (foo + (:constructor make-foo + (bar &aux (quux (quux-from-bar bar + :for 'foo))))) + bar + quux) --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/13 16:14:58 1.65 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/13 16:15:40 1.66 @@ -1123,9 +1123,10 @@ (point)))) (save-excursion (backward-sexp) - (down-list 1) + (ignore-errors (down-list 1)) (while (and point (< (point) point)) - (cond ((or (looking-at "&key") (looking-at "&optional")) + (cond ((or (looking-at "&key") (looking-at "&optional") + (looking-at "&aux")) (setq state 'key)) ((looking-at lisp-indent-lambda-list-keywords-regexp) (setq state 'x))) From nsiivola at common-lisp.net Fri Apr 13 16:16:11 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 13 Apr 2012 09:16:11 -0700 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory tiger.common-lisp.net:/tmp/cvs-serv32410/contrib Modified Files: ChangeLog slime-cl-indent-test.txt slime-cl-indent.el Log Message: slime-indentation: don't indent non-lists as if they were lambda-lists Not even if they appear where a lambda-list is expected. Makes TENTATIVE-DEFUN logic more correct for things like (define-foo name :option1 bar :option2 quux) which previously indented as (define-foo name :option1 bar :option2 quux) . --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:15:40 1.544 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:16:11 1.545 @@ -1,5 +1,12 @@ 2012-04-13 Nikodemus Siivola + * slime-cl-indent.el (lisp-indent-259): If we are expecting a + lambda-list, but don't have a list in the position, indent as if + it was &body instead. + * slime-cl-indent-test.txt (Test 89-90): Tests. + +2012-04-13 Nikodemus Siivola + * slime-cl-indent.el (common-lisp-lambda-list-initial-value-form-p): Handle &AUX as well, and don't signal an error if the we don't have a list where expected. --- /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/04/13 16:15:40 1.21 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent-test.txt 2012/04/13 16:16:11 1.22 @@ -935,3 +935,15 @@ :for 'foo))))) bar quux) + +;;; Test: 89 + +(define-tentative-thing foo + (bar) + quux) + +;;; Test: 90 + +(define-tentative-thing foo + bar + quux) --- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/13 16:15:40 1.66 +++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2012/04/13 16:16:11 1.67 @@ -1208,20 +1208,27 @@ normal-indent (list normal-indent containing-form-start)))) ((eq tem '&lambda) - (if (common-lisp-lambda-list-initial-value-form-p indent-point) - (throw 'exit (if (consp normal-indent) - normal-indent - (list normal-indent containing-form-start))) - (throw 'exit - (cond ((null p) - (list (+ sexp-column 4) containing-form-start)) - (t - ;; Indentation within a lambda-list. -- dvl - (list (lisp-indent-lambda-list - indent-point - sexp-column - containing-form-start) - containing-form-start)))))) + (throw 'exit + (cond ((not (common-lisp-looking-back ")")) + ;; If it's not a list at all, indent it + ;; like body instead. + (if (null p) + (+ sexp-column lisp-body-indent) + normal-indent)) + ((common-lisp-lambda-list-initial-value-form-p + indent-point) + (if (consp normal-indent) + normal-indent + (list normal-indent containing-form-start))) + ((null p) + (list (+ sexp-column 4) containing-form-start)) + (t + ;; Indentation within a lambda-list. -- dvl + (list (lisp-indent-lambda-list + indent-point + sexp-column + containing-form-start) + containing-form-start))))) ((integerp tem) (throw 'exit (if (null p) ;not in subforms From jgarcia at common-lisp.net Fri Apr 13 22:50:12 2012 From: jgarcia at common-lisp.net (CVS User jgarcia) Date: Fri, 13 Apr 2012 15:50:12 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv9667 Modified Files: swank-ecl.lisp Log Message: In MAKE-LOCK (swank-ecl.lisp) make it explicit the need for recursive locks. --- /project/slime/cvsroot/slime/swank-ecl.lisp 2012/04/07 10:23:39 1.73 +++ /project/slime/cvsroot/slime/swank-ecl.lisp 2012/04/13 22:50:12 1.74 @@ -736,7 +736,7 @@ "STOPPED")) (defimplementation make-lock (&key name) - (mp:make-lock :name name)) + (mp:make-lock :name name :recursive t)) (defimplementation call-with-lock-held (lock function) (declare (type function function)) From heller at common-lisp.net Fri Apr 20 05:54:21 2012 From: heller at common-lisp.net (CVS User heller) Date: Thu, 19 Apr 2012 22:54: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-serv31416/contrib Modified Files: ChangeLog swank-mit-scheme.scm Log Message: Prettier arglists. * swank-mit-scheme.scm (swank:operator-arglist): Remove trailing newlines. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/13 16:16:11 1.545 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2012/04/20 05:54:21 1.546 @@ -1,3 +1,10 @@ +2012-04-20 John Smith + + Prettier arglists. + + * swank-mit-scheme.scm (swank:operator-arglist): Remove trailing + newlines. + 2012-04-13 Nikodemus Siivola * slime-cl-indent.el (lisp-indent-259): If we are expecting a --- /project/slime/cvsroot/slime/contrib/swank-mit-scheme.scm 2011/01/20 22:00:12 1.8 +++ /project/slime/cvsroot/slime/contrib/swank-mit-scheme.scm 2012/04/20 05:54:21 1.9 @@ -420,10 +420,11 @@ (define (swank:operator-arglist socket name pack) (let ((v (ignore-errors (lambda () - (with-output-to-string - (lambda () - (carefully-pa - (eval (read-from-string name) (user-env pack))))))))) + (string-trim-right + (with-output-to-string + (lambda () + (carefully-pa + (eval (read-from-string name) (user-env pack)))))))))) (if (condition? v) 'nil v))) (define (carefully-pa o) From nsiivola at common-lisp.net Fri Apr 20 12:43:04 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 20 Apr 2012 05:43:04 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv13275 Modified Files: ChangeLog swank-sbcl.lisp Log Message: sbcl: SWANK-VALUE to make it nicer to refer to values of SWANK symbols --- /project/slime/cvsroot/slime/ChangeLog 2012/04/11 11:38:56 1.2316 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/20 12:43:04 1.2317 @@ -1,3 +1,13 @@ +2012-04-20 Nikodemus Siivola + + * swank-sbcl.lisp (swank-value): New function, makes it easy to + refer to variables in SWANK -- which doesn't exist when the + backend is loaded. + (lisp-source-location): One of the strings being interned was + downcased. Fix using SWANK-VALUE. + (make-socket-io-stream): Use SWANK-VALUE instead of INTERN & + SYMBOL-VALUE. + 2012-04-11 Helmut Eller * slime.el ([test] utf-8-source): Use the encoded byte sequence of --- /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/07 10:23:39 1.306 +++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/20 12:43:04 1.307 @@ -297,10 +297,7 @@ `(:external-format ,external-format)) (t '())) :serve-events ,(eq :fd-handler - ;; KLUDGE: SWANK package isn't - ;; available when backend is loaded. - (symbol-value - (intern "*COMMUNICATION-STYLE*" :swank))) + (swank-value '*communication-style* t)) ;; SBCL < 1.0.42.43 doesn't support :SERVE-EVENTS ;; argument. :allow-other-keys t))) @@ -402,6 +399,15 @@ ;;; Utilities +(defun swank-value (name &optional errorp) + ;; Easy way to refer to symbol values in SWANK, which doesn't yet exist when + ;; this is file is loaded. + (let ((symbol (find-symbol (string name) :swank))) + (if (and symbol (or errorp (boundp symbol))) + (symbol-value symbol) + (when errorp + (error "~S does not exist in SWANK." name))))) + #+#.(swank-backend:with-symbol 'function-lambda-list 'sb-introspect) (defimplementation arglist (fname) (sb-introspect:function-lambda-list fname)) @@ -1142,12 +1148,11 @@ (defun lisp-source-location (code-location) (let ((source (prin1-to-string (sb-debug::code-location-source-form code-location 100))) - (condition (intern "*swank-debugger-condition*" :swank))) - (if (and (boundp condition) - (typep (symbol-value condition) 'sb-impl::step-form-condition) - (and (search "SB-IMPL::WITH-STEPPING-ENABLED" source - :test #'char-equal) - (search "SB-IMPL::STEP-FINISHED" source :test #'char-equal))) + (condition (swank-value '*swank-debugger-condition*))) + (if (typep condition 'sb-impl::step-form-condition) + (and (search "SB-IMPL::WITH-STEPPING-ENABLED" source + :test #'char-equal) + (search "SB-IMPL::STEP-FINISHED" source :test #'char-equal)) ;; The initial form is utterly uninteresting -- and almost ;; certainly right there in the REPL. (make-error-location "Stepping...") From nsiivola at common-lisp.net Fri Apr 20 12:45:28 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 20 Apr 2012 05:45:28 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv15282 Modified Files: ChangeLog swank-sbcl.lisp Log Message: sbcl: workaround for auto-flush thread deadlocks, take II Occasionally auto-flush thread could deadlock with a thread doing compilation: T1: grabs world-lock T2: decides to flush, grabs stream lock T1: needs to do output (compiler note, etc), waits on the stream lock T2: needs the world-lock for a while (PCL dispatch machinery setup, etc) *boink* This is an SBCL issue, no mistake about it -- but sorting out the world-lock handling is going to take a while, and sticking a deadline around the FINISH-OUTPUT call avoids the issue. In this iteration the change is limited to swank-sbcl.lisp, making it hopefully non-intrusive enough to stay in. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/20 12:43:04 1.2317 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/20 12:45:28 1.2318 @@ -1,5 +1,13 @@ 2012-04-20 Nikodemus Siivola + * swank-sbcl.lisp (stream-force-output :around): Workaroud for + deadlocks between auto-flush-thread buffer write lock and world + lock. + (slime-output-stream): Dummy forward definition for the benefit of + the defmethod. + +2012-04-20 Nikodemus Siivola + * swank-sbcl.lisp (swank-value): New function, makes it easy to refer to variables in SWANK -- which doesn't exist when the backend is loaded. --- /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/20 12:43:04 1.307 +++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/20 12:45:28 1.308 @@ -17,15 +17,14 @@ (require 'sb-bsd-sockets) (require 'sb-introspect) (require 'sb-posix) - (require 'sb-cltl2)) + (require 'sb-cltl2) + (import-from :sb-gray *gray-stream-symbols* :swank-backend)) (declaim (optimize (debug 2) (sb-c::insert-step-conditions 0) (sb-c::insert-debug-catch 0) (sb-c::merge-tail-calls 2))) -(import-from :sb-gray *gray-stream-symbols* :swank-backend) - ;;; backwards compability tests (eval-when (:compile-toplevel :load-toplevel :execute) @@ -1634,6 +1633,26 @@ (sb-thread:with-mutex (mutex) (cdr (assoc name alist))))) + ;; Workaround for deadlocks between the world-lock and auto-flush-thread + ;; buffer write lock. + ;; + ;; Another alternative would be to grab the world-lock here, but that's less + ;; future-proof, and could introduce other lock-ordering issues in the + ;; future. + ;; + ;; In an ideal world we would just have an :AROUND method on + ;; SLIME-OUTPUT-STREAM, and be done, but that class doesn't exist when this + ;; file is loaded -- so first we need a dummy definition that will be + ;; overridden by swank-gray.lisp. + (defclass slime-output-stream (fundamental-character-output-stream) + ()) + (defmethod stream-force-output :around ((stream slime-output-stream)) + (handler-case + (sb-sys:with-deadline (:seconds 0.1) + (call-next-method)) + (sb-sys:deadline-timeout () + nil))) + ) (defimplementation quit-lisp () From jgarcia at common-lisp.net Fri Apr 20 21:58:19 2012 From: jgarcia at common-lisp.net (CVS User jgarcia) Date: Fri, 20 Apr 2012 14:58:19 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv8642 Modified Files: swank-ecl.lisp Log Message: In swank-ecl.lisp, import compute-applicable-methods-using-classes when its fboundp (ECL 12.5.1 will provide it). --- /project/slime/cvsroot/slime/swank-ecl.lisp 2012/04/13 22:50:12 1.74 +++ /project/slime/cvsroot/slime/swank-ecl.lisp 2012/04/20 21:58:18 1.75 @@ -40,11 +40,12 @@ (import-from :gray *gray-stream-symbols* :swank-backend) (import-swank-mop-symbols :clos - '(:eql-specializer + `(:eql-specializer :eql-specializer-object :generic-function-declarations :specializer-direct-methods - :compute-applicable-methods-using-classes))) + ,@(unless (fboundp 'clos:compute-applicable-methods-using-classes) + '(:compute-applicable-methods-using-classes))))) ;;;; TCP Server From crhodes at common-lisp.net Mon Apr 23 16:32:53 2012 From: crhodes at common-lisp.net (CVS User crhodes) Date: Mon, 23 Apr 2012 09:32:53 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv15750 Modified Files: ChangeLog slime.el Log Message: Indirect through a variable in slime-operator-before-point. I could write about how this is necessary given the reprogrammability of the CL reader, but honestly this is motivated by trying to get arglist display in the minibuffer for R. I'll be glad if this is useful for (real) Lisp programmers too. --- /project/slime/cvsroot/slime/ChangeLog 2012/04/20 12:45:28 1.2318 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/23 16:32:52 1.2319 @@ -1,3 +1,10 @@ +2012-04-23 Christophe Rhodes + + * slime.el (slime-operator-before-point-function): new variable. + (slime-operator-before-point): use it. + (slime-lisp-operator-before-point): default implementation for + slime-operator-before-point-function (unchanged from before). + 2012-04-20 Nikodemus Siivola * swank-sbcl.lisp (stream-force-output :around): Workaroud for --- /project/slime/cvsroot/slime/slime.el 2012/04/11 11:39:03 1.1400 +++ /project/slime/cvsroot/slime/slime.el 2012/04/23 16:32:52 1.1401 @@ -3627,13 +3627,17 @@ (when arglist (slime-message "%s" arglist))))))) +(defvar slime-operator-before-point-function 'slime-lisp-operator-before-point) + (defun slime-operator-before-point () + (funcall slime-operator-before-point-function)) + +(defun slime-lisp-operator-before-point () (ignore-errors (save-excursion (backward-up-list 1) (down-list 1) (slime-symbol-at-point)))) - ;;;; Completion From dcrosher at common-lisp.net Tue Apr 24 11:08:13 2012 From: dcrosher at common-lisp.net (CVS User dcrosher) Date: Tue, 24 Apr 2012 04:08:13 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv4159 Modified Files: swank-scl.lisp Log Message: * create-socket: correct variable name typo. --- /project/slime/cvsroot/slime/swank-scl.lisp 2012/04/07 10:23:39 1.40 +++ /project/slime/cvsroot/slime/swank-scl.lisp 2012/04/24 11:08:13 1.41 @@ -29,7 +29,7 @@ (defimplementation create-socket (host port &key backlog) (let ((addr (resolve-hostname host))) (ext:create-inet-listener port :stream :host addr :reuse-address t - :backlog (or backend 5)))) + :backlog (or backlog 5)))) (defimplementation local-port (socket) (nth-value 1 (ext::get-socket-host-and-port (socket-fd socket)))) From dcrosher at common-lisp.net Tue Apr 24 11:12:15 2012 From: dcrosher at common-lisp.net (CVS User dcrosher) Date: Tue, 24 Apr 2012 04:12:15 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv4506 Modified Files: swank.lisp swank-rpc.lisp ChangeLog Log Message: * Use #\; to separate the file options. --- /project/slime/cvsroot/slime/swank.lisp 2012/04/07 08:19:32 1.786 +++ /project/slime/cvsroot/slime/swank.lisp 2012/04/24 11:12:14 1.787 @@ -1,4 +1,4 @@ -;;; -*- outline-regexp:";;;;;*" indent-tabs-mode:nil coding:latin-1-unix -*- +;;; -*- outline-regexp: ";;;;;*"; indent-tabs-mode: nil; coding: iso-8859-1 -*- ;;; ;;; This code has been placed in the Public Domain. All warranties ;;; are disclaimed. --- /project/slime/cvsroot/slime/swank-rpc.lisp 2011/12/04 15:44:08 1.11 +++ /project/slime/cvsroot/slime/swank-rpc.lisp 2012/04/24 11:12:14 1.12 @@ -1,4 +1,4 @@ -;;; -*- indent-tabs-mode:nil coding:latin-1-unix -*- +;;; -*- indent-tabs-mode: nil; coding: iso-8859-1 -*- ;;; ;;; swank-rpc.lisp -- Pass remote calls and responses between lisp systems. ;;; --- /project/slime/cvsroot/slime/ChangeLog 2012/04/23 16:32:52 1.2319 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/24 11:12:14 1.2320 @@ -1,3 +1,10 @@ +2012-04-24 Douglas Crosher + + * swank-scl.lisp (create-socket): correct variable name typo. + + * swank.lisp, swank-rpc.lisp (file options): use #\; to separate the + file options. + 2012-04-23 Christophe Rhodes * slime.el (slime-operator-before-point-function): new variable. From nsiivola at common-lisp.net Fri Apr 27 14:57:59 2012 From: nsiivola at common-lisp.net (CVS User nsiivola) Date: Fri, 27 Apr 2012 07:57:59 -0700 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory tiger.common-lisp.net:/tmp/cvs-serv18685 Modified Files: ChangeLog swank-sbcl.lisp Log Message: sbcl: fix lisp-source-location --- /project/slime/cvsroot/slime/ChangeLog 2012/04/24 11:12:14 1.2320 +++ /project/slime/cvsroot/slime/ChangeLog 2012/04/27 14:57:58 1.2321 @@ -1,3 +1,8 @@ +2012-04-27 Nikodemus Siivola + + * swank-sbcl.lisp (lisp-source-location): How hard can it be to + get this right? (3-legged IF, FFS!) + 2012-04-24 Douglas Crosher * swank-scl.lisp (create-socket): correct variable name typo. --- /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/20 12:45:28 1.308 +++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2012/04/27 14:57:59 1.309 @@ -1148,8 +1148,8 @@ (let ((source (prin1-to-string (sb-debug::code-location-source-form code-location 100))) (condition (swank-value '*swank-debugger-condition*))) - (if (typep condition 'sb-impl::step-form-condition) - (and (search "SB-IMPL::WITH-STEPPING-ENABLED" source + (if (and (typep condition 'sb-impl::step-form-condition) + (search "SB-IMPL::WITH-STEPPING-ENABLED" source :test #'char-equal) (search "SB-IMPL::STEP-FINISHED" source :test #'char-equal)) ;; The initial form is utterly uninteresting -- and almost