From trittweiler at common-lisp.net Sun Mar 1 18:46:45 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sun, 01 Mar 2009 18:46:45 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv31051/contrib Modified Files: swank-arglists.lisp ChangeLog Log Message: * swank-arglists.lisp (variable-desc-for-echo-area): Print values of special variables with ~S, not with ~A. --- /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2009/02/27 21:38:20 1.29 +++ /project/slime/cvsroot/slime/contrib/swank-arglists.lisp 2009/03/01 18:46:45 1.30 @@ -496,7 +496,7 @@ (*print-length* 10) (*print-lines* 1)) (call/truncated-output-to-string 75 (lambda (s) - (format s "~A => ~A" sym (symbol-value sym))))))))) + (format s "~A => ~S" sym (symbol-value sym))))))))) (defun decode-required-arg (arg) "ARG can be a symbol or a destructuring pattern." --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/02/27 21:39:32 1.184 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/01 18:46:45 1.185 @@ -1,3 +1,8 @@ +2009-02-28 Stas Boukarev + + * swank-arglists.lisp (variable-desc-for-echo-area): Print + values of special variables with ~S, not with ~A. + 2009-02-27 Tobias C. Rittweiler * swank-arglists.lisp (read-conversatively-for-autodoc): Make it From trittweiler at common-lisp.net Sun Mar 1 20:36:28 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sun, 01 Mar 2009 20:36:28 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv21996/contrib Modified Files: ChangeLog Log Message: * slime-asdf.el (slime-read-system-name): Display default value as part of the prompt, instead of inserting it as an input candidate. (slime-find-asd): Do not call `file-name-sans-extension' twice. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/01 18:46:45 1.185 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/01 20:36:28 1.186 @@ -1,5 +1,12 @@ 2009-02-28 Stas Boukarev + * slime-asdf.el (slime-read-system-name): Display default value as + part of the prompt, instead of inserting it as an input + candidate. + (slime-find-asd): Do not call `file-name-sans-extension' twice. + +2009-02-28 Stas Boukarev + * swank-arglists.lisp (variable-desc-for-echo-area): Print values of special variables with ~S, not with ~A. From trittweiler at common-lisp.net Mon Mar 2 20:35:55 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Mon, 02 Mar 2009 20:35:55 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv24989 Modified Files: ChangeLog hyperspec.el Log Message: * hyperspec.el (common-lisp-hyperspec-symbols): Add entries for reader macros even when `common-lisp-hyperspec-symbol-table' is bound to some value. --- /project/slime/cvsroot/slime/ChangeLog 2009/02/27 22:00:25 1.1703 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/02 20:35:54 1.1704 @@ -1,3 +1,9 @@ +2009-03-02 Tobias C. Rittweiler + + * hyperspec.el (common-lisp-hyperspec-symbols): Add entries for + reader macros even when `common-lisp-hyperspec-symbol-table' is + bound to some value. + 2009-02-27 Tobias C. Rittweiler * slime.el ([test] macroexpand): New test case. --- /project/slime/cvsroot/slime/hyperspec.el 2009/02/27 19:02:44 1.12 +++ /project/slime/cvsroot/slime/hyperspec.el 2009/03/02 20:35:55 1.13 @@ -120,6 +120,15 @@ (eval-when (load eval) (defalias 'hyperspec-lookup 'common-lisp-hyperspec)) +;;; Refactored out from the below. +;;; +;;; 20090302 Tobias C Rittweiler + +(defun intern-clhs-symbol (string relative-url) + (let ((symbol (intern string common-lisp-hyperspec-symbols))) + (if (boundp symbol) + (push relative-url (symbol-value symbol)) + (set symbol (list relative-url))))) ;;; Added dynamic lookup of symbol in CLHS symbol table ;;; @@ -140,1023 +149,1029 @@ (set-buffer index-buffer) (goto-char (point-min)) (while (< (point) (point-max)) - (let* ((symbol (intern (downcase (get-one-line)) - common-lisp-hyperspec-symbols)) + (let* ((symbol-name (downcase (get-one-line))) (relative-url (get-one-line))) - (set symbol (list (subseq relative-url - (1+ (position ?\/ relative-url :from-end t)))))))))) - (mapcar (lambda (entry) - (let ((symbol (intern (car entry) common-lisp-hyperspec-symbols))) - (if (boundp symbol) - (push (cadr entry) (symbol-value symbol)) - (set symbol (cdr entry))))) - '(("&allow-other-keys" "03_da.htm") - ("&aux" "03_da.htm") - ("&body" "03_dd.htm") - ("&environment" "03_dd.htm") - ("&key" "03_da.htm") - ("&optional" "03_da.htm") - ("&rest" "03_da.htm") - ("&whole" "03_dd.htm") - ("*" "a_st.htm") - ("**" "v__stst_.htm") - ("***" "v__stst_.htm") - ("*break-on-signals*" "v_break_.htm") - ("*compile-file-pathname*" "v_cmp_fi.htm") - ("*compile-file-truename*" "v_cmp_fi.htm") - ("*compile-print*" "v_cmp_pr.htm") - ("*compile-verbose*" "v_cmp_pr.htm") - ("*debug-io*" "v_debug_.htm") - ("*debugger-hook*" "v_debugg.htm") - ("*default-pathname-defaults*" "v_defaul.htm") - ("*error-output*" "v_debug_.htm") - ("*features*" "v_featur.htm") - ("*gensym-counter*" "v_gensym.htm") - ("*load-pathname*" "v_ld_pns.htm") - ("*load-print*" "v_ld_prs.htm") - ("*load-truename*" "v_ld_pns.htm") - ("*load-verbose*" "v_ld_prs.htm") - ("*macroexpand-hook*" "v_mexp_h.htm") - ("*modules*" "v_module.htm") - ("*package*" "v_pkg.htm") - ("*print-array*" "v_pr_ar.htm") - ("*print-base*" "v_pr_bas.htm") - ("*print-case*" "v_pr_cas.htm") - ("*print-circle*" "v_pr_cir.htm") - ("*print-escape*" "v_pr_esc.htm") - ("*print-gensym*" "v_pr_gen.htm") - ("*print-length*" "v_pr_lev.htm") - ("*print-level*" "v_pr_lev.htm") - ("*print-lines*" "v_pr_lin.htm") - ("*print-miser-width*" "v_pr_mis.htm") - ("*print-pprint-dispatch*" "v_pr_ppr.htm") - ("*print-pretty*" "v_pr_pre.htm") - ("*print-radix*" "v_pr_bas.htm") - ("*print-readably*" "v_pr_rda.htm") - ("*print-right-margin*" "v_pr_rig.htm") - ("*query-io*" "v_debug_.htm") - ("*random-state*" "v_rnd_st.htm") - ("*read-base*" "v_rd_bas.htm") - ("*read-default-float-format*" "v_rd_def.htm") - ("*read-eval*" "v_rd_eva.htm") - ("*read-suppress*" "v_rd_sup.htm") - ("*readtable*" "v_rdtabl.htm") - ("*standard-input*" "v_debug_.htm") - ("*standard-output*" "v_debug_.htm") - ("*terminal-io*" "v_termin.htm") - ("*trace-output*" "v_debug_.htm") - ("+" "a_pl.htm") - ("++" "v_pl_plp.htm") - ("+++" "v_pl_plp.htm") - ("-" "a__.htm") - ("/" "a_sl.htm") - ("//" "v_sl_sls.htm") - ("///" "v_sl_sls.htm") - ("/=" "f_eq_sle.htm") - ("1+" "f_1pl_1_.htm") - ("1-" "f_1pl_1_.htm") - ("<" "f_eq_sle.htm") - ("<=" "f_eq_sle.htm") - ("=" "f_eq_sle.htm") - (">" "f_eq_sle.htm") - (">=" "f_eq_sle.htm") - ("abort" "a_abort.htm") - ("abs" "f_abs.htm") - ("acons" "f_acons.htm") - ("acos" "f_asin_.htm") - ("acosh" "f_sinh_.htm") - ("add-method" "f_add_me.htm") - ("adjoin" "f_adjoin.htm") - ("adjust-array" "f_adjust.htm") - ("adjustable-array-p" "f_adju_1.htm") - ("allocate-instance" "f_alloca.htm") - ("alpha-char-p" "f_alpha_.htm") - ("alphanumericp" "f_alphan.htm") - ("and" "a_and.htm") - ("append" "f_append.htm") - ("apply" "f_apply.htm") - ("apropos" "f_apropo.htm") - ("apropos-list" "f_apropo.htm") - ("aref" "f_aref.htm") - ("arithmetic-error" "e_arithm.htm") - ("arithmetic-error-operands" "f_arithm.htm") - ("arithmetic-error-operation" "f_arithm.htm") - ("array" "t_array.htm") - ("array-dimension" "f_ar_dim.htm") - ("array-dimension-limit" "v_ar_dim.htm") - ("array-dimensions" "f_ar_d_1.htm") - ("array-displacement" "f_ar_dis.htm") - ("array-element-type" "f_ar_ele.htm") - ("array-has-fill-pointer-p" "f_ar_has.htm") - ("array-in-bounds-p" "f_ar_in_.htm") - ("array-rank" "f_ar_ran.htm") - ("array-rank-limit" "v_ar_ran.htm") - ("array-row-major-index" "f_ar_row.htm") - ("array-total-size" "f_ar_tot.htm") - ("array-total-size-limit" "v_ar_tot.htm") - ("arrayp" "f_arrayp.htm") - ("ash" "f_ash.htm") - ("asin" "f_asin_.htm") - ("asinh" "f_sinh_.htm") - ("assert" "m_assert.htm") - ("assoc" "f_assocc.htm") - ("assoc-if" "f_assocc.htm") - ("assoc-if-not" "f_assocc.htm") - ("atan" "f_asin_.htm") - ("atanh" "f_sinh_.htm") - ("atom" "a_atom.htm") - ("base-char" "t_base_c.htm") - ("base-string" "t_base_s.htm") - ("bignum" "t_bignum.htm") - ("bit" "a_bit.htm") - ("bit-and" "f_bt_and.htm") - ("bit-andc1" "f_bt_and.htm") - ("bit-andc2" "f_bt_and.htm") - ("bit-eqv" "f_bt_and.htm") - ("bit-ior" "f_bt_and.htm") - ("bit-nand" "f_bt_and.htm") - ("bit-nor" "f_bt_and.htm") - ("bit-not" "f_bt_and.htm") - ("bit-orc1" "f_bt_and.htm") - ("bit-orc2" "f_bt_and.htm") - ("bit-vector" "t_bt_vec.htm") - ("bit-vector-p" "f_bt_vec.htm") - ("bit-xor" "f_bt_and.htm") - ("block" "s_block.htm") - ("boole" "f_boole.htm") - ("boole-1" "v_b_1_b.htm") - ("boole-2" "v_b_1_b.htm") - ("boole-and" "v_b_1_b.htm") - ("boole-andc1" "v_b_1_b.htm") - ("boole-andc2" "v_b_1_b.htm") - ("boole-c1" "v_b_1_b.htm") - ("boole-c2" "v_b_1_b.htm") - ("boole-clr" "v_b_1_b.htm") - ("boole-eqv" "v_b_1_b.htm") - ("boole-ior" "v_b_1_b.htm") - ("boole-nand" "v_b_1_b.htm") - ("boole-nor" "v_b_1_b.htm") - ("boole-orc1" "v_b_1_b.htm") - ("boole-orc2" "v_b_1_b.htm") - ("boole-set" "v_b_1_b.htm") - ("boole-xor" "v_b_1_b.htm") - ("boolean" "t_ban.htm") - ("both-case-p" "f_upper_.htm") - ("boundp" "f_boundp.htm") - ("break" "f_break.htm") - ("broadcast-stream" "t_broadc.htm") - ("broadcast-stream-streams" "f_broadc.htm") - ("built-in-class" "t_built_.htm") - ("butlast" "f_butlas.htm") - ("byte" "f_by_by.htm") - ("byte-position" "f_by_by.htm") - ("byte-size" "f_by_by.htm") - ("caaaar" "f_car_c.htm") - ("caaadr" "f_car_c.htm") - ("caaar" "f_car_c.htm") - ("caadar" "f_car_c.htm") - ("caaddr" "f_car_c.htm") - ("caadr" "f_car_c.htm") - ("caar" "f_car_c.htm") - ("cadaar" "f_car_c.htm") - ("cadadr" "f_car_c.htm") - ("cadar" "f_car_c.htm") - ("caddar" "f_car_c.htm") - ("cadddr" "f_car_c.htm") - ("caddr" "f_car_c.htm") - ("cadr" "f_car_c.htm") - ("call-arguments-limit" "v_call_a.htm") - ("call-method" "m_call_m.htm") - ("call-next-method" "f_call_n.htm") - ("car" "f_car_c.htm") - ("case" "m_case_.htm") - ("catch" "s_catch.htm") - ("ccase" "m_case_.htm") - ("cdaaar" "f_car_c.htm") - ("cdaadr" "f_car_c.htm") - ("cdaar" "f_car_c.htm") - ("cdadar" "f_car_c.htm") - ("cdaddr" "f_car_c.htm") - ("cdadr" "f_car_c.htm") - ("cdar" "f_car_c.htm") - ("cddaar" "f_car_c.htm") - ("cddadr" "f_car_c.htm") - ("cddar" "f_car_c.htm") - ("cdddar" "f_car_c.htm") - ("cddddr" "f_car_c.htm") - ("cdddr" "f_car_c.htm") - ("cddr" "f_car_c.htm") - ("cdr" "f_car_c.htm") - ("ceiling" "f_floorc.htm") - ("cell-error" "e_cell_e.htm") - ("cell-error-name" "f_cell_e.htm") - ("cerror" "f_cerror.htm") - ("change-class" "f_chg_cl.htm") - ("char" "f_char_.htm") - ("char-code" "f_char_c.htm") - ("char-code-limit" "v_char_c.htm") - ("char-downcase" "f_char_u.htm") - ("char-equal" "f_chareq.htm") - ("char-greaterp" "f_chareq.htm") - ("char-int" "f_char_i.htm") - ("char-lessp" "f_chareq.htm") - ("char-name" "f_char_n.htm") - ("char-not-equal" "f_chareq.htm") - ("char-not-greaterp" "f_chareq.htm") - ("char-not-lessp" "f_chareq.htm") - ("char-upcase" "f_char_u.htm") - ("char/=" "f_chareq.htm") - ("char<" "f_chareq.htm") - ("char<=" "f_chareq.htm") - ("char=" "f_chareq.htm") - ("char>" "f_chareq.htm") - ("char>=" "f_chareq.htm") - ("character" "a_ch.htm") - ("characterp" "f_chp.htm") - ("check-type" "m_check_.htm") - ("cis" "f_cis.htm") - ("class" "t_class.htm") - ("class-name" "f_class_.htm") - ("class-of" "f_clas_1.htm") - ("clear-input" "f_clear_.htm") - ("clear-output" "f_finish.htm") - ("close" "f_close.htm") - ("clrhash" "f_clrhas.htm") - ("code-char" "f_code_c.htm") - ("coerce" "f_coerce.htm") - ("compilation-speed" "d_optimi.htm") - ("compile" "f_cmp.htm") - ("compile-file" "f_cmp_fi.htm") - ("compile-file-pathname" "f_cmp__1.htm") - ("compiled-function" "t_cmpd_f.htm") - ("compiled-function-p" "f_cmpd_f.htm") - ("compiler-macro" "f_docume.htm") - ("compiler-macro-function" "f_cmp_ma.htm") - ("complement" "f_comple.htm") - ("complex" "a_comple.htm") - ("complexp" "f_comp_3.htm") - ("compute-applicable-methods" "f_comput.htm") - ("compute-restarts" "f_comp_1.htm") - ("concatenate" "f_concat.htm") - ("concatenated-stream" "t_concat.htm") - ("concatenated-stream-streams" "f_conc_1.htm") - ("cond" "m_cond.htm") - ("condition" "e_cnd.htm") - ("conjugate" "f_conjug.htm") - ("cons" "a_cons.htm") - ("consp" "f_consp.htm") - ("constantly" "f_cons_1.htm") - ("constantp" "f_consta.htm") - ("continue" "a_contin.htm") - ("control-error" "e_contro.htm") - ("copy-alist" "f_cp_ali.htm") - ("copy-list" "f_cp_lis.htm") - ("copy-pprint-dispatch" "f_cp_ppr.htm") - ("copy-readtable" "f_cp_rdt.htm") - ("copy-seq" "f_cp_seq.htm") - ("copy-structure" "f_cp_stu.htm") - ("copy-symbol" "f_cp_sym.htm") - ("copy-tree" "f_cp_tre.htm") - ("cos" "f_sin_c.htm") - ("cosh" "f_sinh_.htm") - ("count" "f_countc.htm") - ("count-if" "f_countc.htm") - ("count-if-not" "f_countc.htm") - ("ctypecase" "m_tpcase.htm") - ("debug" "d_optimi.htm") - ("decf" "m_incf_.htm") - ("declaim" "m_declai.htm") - ("declaration" "d_declar.htm") - ("declare" "s_declar.htm") - ("decode-float" "f_dec_fl.htm") - ("decode-universal-time" "f_dec_un.htm") - ("defclass" "m_defcla.htm") - ("defconstant" "m_defcon.htm") - ("defgeneric" "m_defgen.htm") - ("define-compiler-macro" "m_define.htm") - ("define-condition" "m_defi_5.htm") - ("define-method-combination" "m_defi_4.htm") - ("define-modify-macro" "m_defi_2.htm") - ("define-setf-expander" "m_defi_3.htm") - ("define-symbol-macro" "m_defi_1.htm") - ("defmacro" "m_defmac.htm") - ("defmethod" "m_defmet.htm") - ("defpackage" "m_defpkg.htm") - ("defparameter" "m_defpar.htm") - ("defsetf" "m_defset.htm") - ("defstruct" "m_defstr.htm") - ("deftype" "m_deftp.htm") - ("defun" "m_defun.htm") - ("defvar" "m_defpar.htm") - ("delete" "f_rm_rm.htm") - ("delete-duplicates" "f_rm_dup.htm") - ("delete-file" "f_del_fi.htm") - ("delete-if" "f_rm_rm.htm") - ("delete-if-not" "f_rm_rm.htm") - ("delete-package" "f_del_pk.htm") - ("denominator" "f_numera.htm") - ("deposit-field" "f_deposi.htm") - ("describe" "f_descri.htm") - ("describe-object" "f_desc_1.htm") - ("destructuring-bind" "m_destru.htm") - ("digit-char" "f_digit_.htm") - ("digit-char-p" "f_digi_1.htm") - ("directory" "f_dir.htm") - ("directory-namestring" "f_namest.htm") - ("disassemble" "f_disass.htm") - ("division-by-zero" "e_divisi.htm") - ("do" "m_do_do.htm") - ("do*" "m_do_do.htm") - ("do-all-symbols" "m_do_sym.htm") - ("do-external-symbols" "m_do_sym.htm") - ("do-symbols" "m_do_sym.htm") - ("documentation" "f_docume.htm") - ("dolist" "m_dolist.htm") - ("dotimes" "m_dotime.htm") - ("double-float" "t_short_.htm") - ("double-float-epsilon" "v_short_.htm") - ("double-float-negative-epsilon" "v_short_.htm") - ("dpb" "f_dpb.htm") - ("dribble" "f_dribbl.htm") - ("dynamic-extent" "d_dynami.htm") - ("ecase" "m_case_.htm") - ("echo-stream" "t_echo_s.htm") - ("echo-stream-input-stream" "f_echo_s.htm") - ("echo-stream-output-stream" "f_echo_s.htm") - ("ed" "f_ed.htm") - ("eighth" "f_firstc.htm") - ("elt" "f_elt.htm") - ("encode-universal-time" "f_encode.htm") - ("end-of-file" "e_end_of.htm") - ("endp" "f_endp.htm") - ("enough-namestring" "f_namest.htm") - ("ensure-directories-exist" "f_ensu_1.htm") - ("ensure-generic-function" "f_ensure.htm") - ("eq" "f_eq.htm") - ("eql" "a_eql.htm") - ("equal" "f_equal.htm") - ("equalp" "f_equalp.htm") - ("error" "a_error.htm") - ("etypecase" "m_tpcase.htm") - ("eval" "f_eval.htm") - ("eval-when" "s_eval_w.htm") - ("evenp" "f_evenpc.htm") - ("every" "f_everyc.htm") - ("exp" "f_exp_e.htm") - ("export" "f_export.htm") - ("expt" "f_exp_e.htm") - ("extended-char" "t_extend.htm") - ("fboundp" "f_fbound.htm") - ("fceiling" "f_floorc.htm") - ("fdefinition" "f_fdefin.htm") - ("ffloor" "f_floorc.htm") - ("fifth" "f_firstc.htm") - ("file-author" "f_file_a.htm") - ("file-error" "e_file_e.htm") - ("file-error-pathname" "f_file_e.htm") - ("file-length" "f_file_l.htm") - ("file-namestring" "f_namest.htm") - ("file-position" "f_file_p.htm") [1664 lines skipped] From heller at common-lisp.net Tue Mar 3 10:03:59 2009 From: heller at common-lisp.net (CVS User heller) Date: Tue, 03 Mar 2009 10:03:59 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv18975 Modified Files: ChangeLog hyperspec.el slime.el Log Message: Use a separate key, C-c C-d #, to lookup reader-macros. * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): New command. (common-lisp-hyperspec-reader-macros): New variable. (common-lisp-hyperspec-reader-macro-at-point): Moved over from slime.el * slime.el (slime-doc-bindings): Bind C-c C-d #. (slime-hyperspec-lookup): Don't consider reader-macros. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/02 20:35:54 1.1704 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/03 10:03:59 1.1705 @@ -1,3 +1,15 @@ +2009-03-03 Helmut Eller + + Use a separate key, C-c C-d #, to lookup reader-macros. + + * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): New + command. + (common-lisp-hyperspec-reader-macros): New variable. + (common-lisp-hyperspec-reader-macro-at-point): Moved over from + slime.el + * slime.el (slime-doc-bindings): Bind C-c C-d #. + (slime-hyperspec-lookup): Don't consider reader-macros. + 2009-03-02 Tobias C. Rittweiler * hyperspec.el (common-lisp-hyperspec-symbols): Add entries for --- /project/slime/cvsroot/slime/hyperspec.el 2009/03/02 20:35:55 1.13 +++ /project/slime/cvsroot/slime/hyperspec.el 2009/03/03 10:03:59 1.14 @@ -1138,10 +1138,13 @@ ;;; ;;; 20090302 Tobias C Rittweiler, and Stas Boukarev -;;; `common-lisp-hyperspec-symbol-table' (Data/Map_Sym.txt in particular) -;;; does not contain entries for the reader macros. So we have to add these -;;; in either cases of the if-expression above. -(mapc (lambda (entry) (intern-clhs-symbol (car entry) (cadr entry))) +(defvar common-lisp-hyperspec-reader-macros (make-hash-table :test #'equal)) + +;;; Data/Map_Sym.txt in does not contain entries for the reader +;;; macros. So we have to enumerate these explicitly. +(mapc (lambda (entry) + (puthash (car entry) (cadr entry) + common-lisp-hyperspec-reader-macros)) '(("#" "02_dh.htm") ("##" "02_dhp.htm") ("#'" "02_dhb.htm") @@ -1171,8 +1174,21 @@ (")" "02_db.htm") (";" "02_dd.htm"))) +(defun common-lisp-hyperspec-lookup-reader-macro (macro) + "Browse the CLHS entry for the reader-macro MACRO." + (interactive + (list (completing-read "Look up reader-macro: " + common-lisp-hyperspec-reader-macros nil t + (common-lisp-hyperspec-reader-macro-at-point)))) + (browse-url + (concat common-lisp-hyperspec-root "Body/" + (gethash macro common-lisp-hyperspec-reader-macros)))) + +(defun common-lisp-hyperspec-reader-macro-at-point () + (let ((regexp "\\(#.?\\)\\|\\([\"',`';()]\\)")) + (when (looking-back regexp nil t) + (match-string-no-properties 0)))) - ;;; FORMAT character lookup by Frode Vatvedt Fjeld 20030902 ;;; ;;; adjusted for ILISP by Nikodemus Siivola 20030903 --- /project/slime/cvsroot/slime/slime.el 2009/02/27 22:00:25 1.1138 +++ /project/slime/cvsroot/slime/slime.el 2009/03/03 10:03:59 1.1139 @@ -589,7 +589,8 @@ (?d slime-describe-symbol) (?f slime-describe-function) (?h slime-hyperspec-lookup) - (?~ common-lisp-hyperspec-format))) + (?~ common-lisp-hyperspec-format) + (?# common-lisp-hyperspec-lookup-reader-macro))) (defvar slime-who-map (make-sparse-keymap) "Keymap for who-xref commands. Bound to a prefix key.") @@ -4519,9 +4520,7 @@ (defun slime-hyperspec-lookup (symbol-name) "A wrapper for `hyperspec-lookup'" - (interactive (list (let* ((symbol-at-point - (or (slime-reader-macro-at-point) - (slime-symbol-at-point))) + (interactive (list (let* ((symbol-at-point (slime-symbol-at-point)) (stripped-symbol (and symbol-at-point (downcase @@ -8246,13 +8245,6 @@ "Return the sexp at point as a string, othwise signal an error." (or (slime-string-at-point) (error "No string at point."))) -(defun slime-reader-macro-at-point () - (let ((regexp "\\(#.?\\)\\|\\([\"',`';()]\\)")) - (save-match-data - (when (looking-back regexp) - (buffer-substring-no-properties (match-beginning 0) - (match-end 0)))))) - (defun slime-input-complete-p (start end) "Return t if the region from START to END contains a complete sexp." (save-excursion From heller at common-lisp.net Tue Mar 3 10:04:09 2009 From: heller at common-lisp.net (CVS User heller) Date: Tue, 03 Mar 2009 10:04:09 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv19013 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-pretty-package-name): Simplify. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/03 10:03:59 1.1705 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/03 10:04:09 1.1706 @@ -1,5 +1,9 @@ 2009-03-03 Helmut Eller + * slime.el (slime-pretty-package-name): Simplify. + +2009-03-03 Helmut Eller + Use a separate key, C-c C-d #, to lookup reader-macros. * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): New --- /project/slime/cvsroot/slime/slime.el 2009/03/03 10:03:59 1.1139 +++ /project/slime/cvsroot/slime/slime.el 2009/03/03 10:04:09 1.1140 @@ -399,23 +399,11 @@ (defun slime-pretty-package-name (name) "Return a pretty version of a package name NAME." - (let ((name (cond ((string-match "^#?:\\(.*\\)$" name) - (match-string 1 name)) - ((string-match "^\"\\(.*\\)\"$" name) - (match-string 1 name)) - ((string-match slime-reader-conditionals-regexp name) - ;; This is kind of a sledge hammer, but as it's a rare - ;; case we don't care. - (with-temp-buffer - (insert name) - (goto-char (point-min)) - (slime-forward-cruft) - (if (eobp) ; Skipped all reader conditionals? - name ; If so, return the garbage! - (slime-pretty-package-name (slime-sexp-at-point))))) - (t ; Normal symbol, or some garbage. - name)))) - (format "%s" name))) + (cond ((string-match "^#?:\\(.*\\)$" name) + (match-string 1 name)) + ((string-match "^\"\\(.*\\)\"$" name) + (match-string 1 name)) + (t name))) (defun slime-compute-modeline-connection () (let ((conn (slime-current-connection))) From trittweiler at common-lisp.net Tue Mar 3 23:22:05 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Tue, 03 Mar 2009 23:22:05 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv17422 Modified Files: ChangeLog slime-repl.el Log Message: * slime-repl.el (slime-check-buffer-contents): Fix typo. (with-canonicalized-slime-repl-buffer): Refactored from test cases. A lot of test cases implemented this somewhat wrongly. Making them fail when not called from the SWANK package. ([test] repl-test): Use above. ([test] repl-return): Ditto. ([test] repl-read): Ditto. ([test] repl-read-lines): Ditto. ([test] repl-type-ahead): Ditto. ([test] interrupt-in-blocking-read): Ditto. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/01 20:36:28 1.186 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/03 23:22:05 1.187 @@ -1,3 +1,16 @@ +2009-03-04 Tobias C. Rittweiler + + * slime-repl.el (slime-check-buffer-contents): Fix typo. + (with-canonicalized-slime-repl-buffer): Refactored from test + cases. A lot of test cases implemented this somewhat + wrongly. Making them fail when not called from the SWANK package. + ([test] repl-test): Use above. + ([test] repl-return): Ditto. + ([test] repl-read): Ditto. + ([test] repl-read-lines): Ditto. + ([test] repl-type-ahead): Ditto. + ([test] interrupt-in-blocking-read): Ditto. + 2009-02-28 Stas Boukarev * slime-asdf.el (slime-read-system-name): Display default value as --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/02/17 09:03:46 1.15 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/03/03 23:22:05 1.16 @@ -1551,6 +1551,21 @@ (slime-check ("slime-lisp-package-prompt-string is in %S." nicknames) (member (slime-lisp-package-prompt-string) nicknames))))) +(defmacro with-canonicalized-slime-repl-buffer (&rest body) + "Evaluate BODY within a fresh REPL buffer. The REPL prompt is +canonicalized to \"SWANK\"---we do actually switch to that +package, though." + `(let ((.old-prompt. (slime-lisp-package-prompt-string))) + (unwind-protect + (progn (with-current-buffer (slime-output-buffer) + (setf (slime-lisp-package-prompt-string) "SWANK")) + (kill-buffer (slime-output-buffer)) + (with-current-buffer (slime-output-buffer) + , at body)) + (setf (slime-lisp-package-prompt-string) .old-prompt.)))) + +(put 'with-canonicalized-slime-repl-buffer 'lisp-indent-function 0) + (def-slime-test repl-test (input result-contents) "Test simple commands in the minibuffer." @@ -1618,10 +1633,7 @@ (1 . 2) (1 . 2) (1 . 2) (1 . 2) (1 . 2) (1 . 2)) }0 SWANK> *[]")) - (with-current-buffer (slime-output-buffer) - (setf (slime-lisp-package-prompt-string) "SWANK")) - (kill-buffer (slime-output-buffer)) - (with-current-buffer (slime-output-buffer) + (with-canonicalized-slime-repl-buffer (insert input) (slime-check-buffer-contents "Buffer contains input" (concat "{}SWANK> [" input "*]")) @@ -1632,7 +1644,7 @@ (defun slime-check-buffer-contents (msg expected) (let* ((marks '((point . ?*) (slime-output-start . ?{) (slime-output-end . ?}) - (slimerepl-input-start-mark . ?\[) (point-max . ?\]))) + (slime-repl-input-start-mark . ?\[) (point-max . ?\]))) (marks (remove-if-not (lambda (m) (position (cdr m) expected)) marks)) (marks (sort (copy-sequence marks) @@ -1677,10 +1689,7 @@ 2) 3 SWANK> ")) - (with-current-buffer (slime-output-buffer) - (setf (slime-lisp-package-prompt-string) "SWANK")) - (kill-buffer (slime-output-buffer)) - (with-current-buffer (slime-output-buffer) + (with-canonicalized-slime-repl-buffer (insert before) (save-excursion (insert after)) (slime-test-expect "Buffer contains input" @@ -1708,10 +1717,7 @@ 4) \(+ 2 3 4) SWANK> ")) - (with-current-buffer (slime-output-buffer) - (setf (slime-lisp-package-prompt-string) "SWANK")) - (kill-buffer (slime-output-buffer)) - (with-current-buffer (slime-output-buffer) + (with-canonicalized-slime-repl-buffer (insert (format "(values %s)" prompt)) (call-interactively 'slime-repl-return) (slime-wait-condition "reading" #'slime-reading-p 5) @@ -1732,10 +1738,7 @@ c \(\"a\" \"b\" \"c\") SWANK> ")) - (when (slime-output-buffer) - (kill-buffer (slime-output-buffer))) - (with-current-buffer (slime-output-buffer) - (setf (slime-lisp-package-prompt-string) "SWANK") + (with-canonicalized-slime-repl-buffer (insert command) (call-interactively 'slime-repl-return) (dolist (input inputs) @@ -1743,8 +1746,10 @@ (insert input) (call-interactively 'slime-repl-return)) (slime-sync-to-top-level 5) - (slime-check "Buffer contains result" - (equal final-contents (buffer-string))))) + (slime-test-expect "Buffer contains result" + final-contents + (buffer-string) + #'equal))) (def-slime-test repl-type-ahead (command input final-contents) @@ -1759,10 +1764,7 @@ ("(progn (sleep 0.1) (abort))" "*foo" "SWANK> (progn (sleep 0.1) (abort)) {}; Evaluation aborted. SWANK> [*foo]")) - (when (slime-output-buffer) - (kill-buffer (slime-output-buffer))) - (setf (slime-lisp-package-prompt-string) "SWANK") - (with-current-buffer (slime-output-buffer) + (with-canonicalized-slime-repl-buffer (insert command) (call-interactively 'slime-repl-return) (save-excursion (insert (delete* ?* input))) @@ -1776,13 +1778,10 @@ "Let's see what happens if we interrupt a blocking read operation." '(()) (slime-check-top-level) - (when (slime-output-buffer) - (setf (slime-lisp-package-prompt-string) "SWANK") - (kill-buffer (slime-output-buffer))) - (with-current-buffer (slime-output-buffer) + (with-canonicalized-slime-repl-buffer (insert "(read-char)") - (call-interactively 'slime-repl-return)) - (slime-wait-condition "reading" #'slime-reading-p 5) + (call-interactively 'slime-repl-return) + (slime-wait-condition "reading" #'slime-reading-p 5)) (slime-interrupt) (slime-wait-condition "Debugger visible" (lambda () From trittweiler at common-lisp.net Wed Mar 4 17:59:19 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Wed, 04 Mar 2009 17:59:19 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv9587/contrib Modified Files: slime-asdf.el ChangeLog Log Message: * slime-asdf.el: Really do the commit from entry 2009-02-28. --- /project/slime/cvsroot/slime/contrib/slime-asdf.el 2008/12/27 13:21:43 1.7 +++ /project/slime/cvsroot/slime/contrib/slime-asdf.el 2009/03/04 17:59:19 1.8 @@ -10,8 +10,8 @@ ;; ;; Add something like this to your .emacs: ;; -;; (add-to-list 'load-path ".../slime/contrib") -;; (add-hook 'slime-load-hook (lambda () (require 'slime-asdf))) +;; (add-to-list 'load-path "") +;; (slime-setup '(slime-asdf ... possibly other packages ...)) ;; ;; NOTE: `system-name' is a predefined variable in Emacs. Try to @@ -31,26 +31,28 @@ (defvar slime-system-history nil "History list for ASDF system names.") -(defun slime-read-system-name (&optional prompt initial-value) +(defun slime-read-system-name (&optional prompt default-value) "Read a system name from the minibuffer, prompting with PROMPT." - (setq prompt (or prompt "System: ")) (let* ((completion-ignore-case nil) + (prompt (or prompt "System")) (system-names (slime-eval `(swank:list-asdf-systems))) - (alist (slime-bogus-completion-alist system-names))) - (completing-read prompt alist nil nil - (or initial-value (slime-find-asd system-names) "") - 'slime-system-history))) + (default-value (or default-value (slime-find-asd system-names))) + (prompt (concat prompt (if default-value + (format " (default `%s'): " default-value) + ": ")))) + (completing-read prompt (slime-bogus-completion-alist system-names) + nil nil nil + 'slime-system-history default-value))) (defun slime-find-asd (system-names) "Tries to find an ASDF system definition in the default directory or in the directory belonging to the current buffer and returns it if it's in `system-names'." - (let* ((asdf-systems-in-directory - (mapcar #'file-name-sans-extension - (directory-files - (file-name-directory (or default-directory - (buffer-file-name))) - nil "\.asd$")))) + (let ((asdf-systems-in-directory + (directory-files + (file-name-directory (or default-directory + (buffer-file-name))) + nil "\.asd$"))) (loop for system in asdf-systems-in-directory for candidate = (file-name-sans-extension system) when (find candidate system-names :test #'string-equal) --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/03 23:22:05 1.187 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/04 17:59:19 1.188 @@ -1,5 +1,9 @@ 2009-03-04 Tobias C. Rittweiler + * slime-asdf.el: Really do the commit from entry 2009-02-28. + +2009-03-04 Tobias C. Rittweiler + * slime-repl.el (slime-check-buffer-contents): Fix typo. (with-canonicalized-slime-repl-buffer): Refactored from test cases. A lot of test cases implemented this somewhat From trittweiler at common-lisp.net Wed Mar 4 19:43:29 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Wed, 04 Mar 2009 19:43:29 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv28623 Modified Files: slime.el ChangeLog Log Message: * slime.el (slime-wait-condition): Remove `save-excursion'; it made the `repl-test' test case fail because this test tries to set point to the new prompt in vain. --- /project/slime/cvsroot/slime/slime.el 2009/03/03 10:04:09 1.1140 +++ /project/slime/cvsroot/slime/slime.el 2009/03/04 19:43:29 1.1141 @@ -7271,8 +7271,7 @@ (t ;; XXX if a process-filter enters a recursive-edit, we ;; hang forever - (save-excursion - (slime-accept-process-output nil 0.1))))))) + (slime-accept-process-output nil 0.1)))))) (defun slime-sync-to-top-level (timeout) (slime-wait-condition "top-level" #'slime-at-top-level-p timeout)) --- /project/slime/cvsroot/slime/ChangeLog 2009/03/03 10:04:09 1.1706 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/04 19:43:29 1.1707 @@ -1,3 +1,9 @@ +2009-03-04 Tobias C. Rittweiler + + * slime.el (slime-wait-condition): Remove `save-excursion'; it + made the `repl-test' test case fail because this test tries to set + point to the new prompt in vain. + 2009-03-03 Helmut Eller * slime.el (slime-pretty-package-name): Simplify. From trittweiler at common-lisp.net Wed Mar 4 20:40:02 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Wed, 04 Mar 2009 20:40:02 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv2544 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-check-fancy-symbol-name): Use `slime-test-expect' instead of `slime-check'. ([test] fancy-symbol-names): Extend test case; check for "Foo" in #. (slime-symbol-constituent-at-pos): Check for #<. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/04 19:43:29 1.1707 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/04 20:40:01 1.1708 @@ -1,5 +1,13 @@ 2009-03-04 Tobias C. Rittweiler + * slime.el (slime-check-fancy-symbol-name): Use + `slime-test-expect' instead of `slime-check'. + ([test] fancy-symbol-names): Extend test case; check for + "Foo" in #. + (slime-symbol-constituent-at-pos): Check for #<. + +2009-03-04 Tobias C. Rittweiler + * slime.el (slime-wait-condition): Remove `save-excursion'; it made the `repl-test' test case fail because this test tries to set point to the new prompt in vain. --- /project/slime/cvsroot/slime/slime.el 2009/03/04 19:43:29 1.1141 +++ /project/slime/cvsroot/slime/slime.el 2009/03/04 20:40:02 1.1142 @@ -7304,8 +7304,10 @@ (dotimes (pt (length symbol-name)) (setq pt (+ buffer-offset pt)) (goto-char pt) - (slime-check ("Checking `%s' (%d)..." (buffer-string) pt) - (equal (slime-symbol-at-point) symbol-name)))) + (slime-test-expect (format "Check `%s' (at %d)..." (buffer-string) pt) + symbol-name + (slime-symbol-at-point) + #'equal))) (def-slime-test fancy-symbol-names (symbol-name) "Check that we can cope with idiosyncratic symbol names." @@ -7314,7 +7316,7 @@ ("|asdf||foo||bar|") ("\\|foo|bar|@asdf:foo|\\||") ("\\\\\\\\foo|barfo\\\\|asdf") - ) + ("\\#") ("|#<|Foo at Bar|>|") ("|#|")) (slime-check-top-level) (with-temp-buffer (lisp-mode) @@ -7339,10 +7341,20 @@ (slime-check-fancy-symbol-name (+ (point-min) 2) symbol-name) (erase-buffer) + (slime-test-message "*** fancy symbol-name with leading `:") + (insert "`") (insert symbol-name) + (slime-check-fancy-symbol-name (+ (point-min) 1) symbol-name) + (erase-buffer) + (slime-test-message "*** fancy symbol-name wrapped in ():") (insert "(") (insert symbol-name) (insert ")") (slime-check-fancy-symbol-name (+ (point-min) 1) symbol-name) (erase-buffer) + + (slime-test-message "*** fancy symbol-name wrapped in #<>:") + (insert "#<") (insert symbol-name) (insert " {DEADBEEF}>") + (slime-check-fancy-symbol-name (+ (point-min) 2) symbol-name) + (erase-buffer) )) (def-slime-test narrowing () @@ -8146,17 +8158,20 @@ (defun slime-symbol-constituent-at (pos) "Is the character at position POS a valid symbol constituent?" + ;; We assume we're not within vertical bars, otherwise boringly + ;; everything would be a constituent. (when-let (char (char-after pos)) ; nil when at eob. (let* ((char-before (or (char-before pos) ?\a)) ; nil when at bob. (syntax (char-syntax char)) (syntax-before (char-syntax char-before))) - ;; We assume we're not within vertical bars. - (or - (memq syntax '(?\w ?\_ ?\\)) ; usual suspects? - (eq char ?\|) - (eq syntax-before ?\\) ; escaped? - (and (eq char ?\@) ; ,@@foobar or foo at bar? - (not (eq char-before ?\,))))))) + (if (and (eq char-before ?\#) (eq char ?\<)) ; #< ? + nil + (or + (memq syntax '(?\w ?\_ ?\\)) ; usual suspects? + (eq char ?\|) ; |foo|::|bar|? + (eq syntax-before ?\\) ; escaped? + (and (eq char ?\@) ; ,@@foobar or foo at bar? + (not (eq char-before ?\,)))))))) ;;; `slime-beginning-of-symbol', and `slime-end-of-symbol' are written ;;; to get a lot of funky CL-style symbol names right (see From trittweiler at common-lisp.net Fri Mar 6 23:23:53 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Fri, 06 Mar 2009 23:23:53 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv5623 Modified Files: ChangeLog slime.el Log Message: * slime.el ([portability] getf): Redefine `getf' on Emacs21 to work on malformed plists like it does on later Emacsen. This made the `find-local-definitions' test case fail on Emacs21. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/04 20:40:01 1.1708 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/06 23:23:52 1.1709 @@ -1,3 +1,9 @@ +2009-03-07 Tobias C. Rittweiler + + * slime.el ([portability] getf): Redefine `getf' on Emacs21 to + work on malformed plists like it does on later Emacsen. This made + the `find-local-definitions' test case fail on Emacs21. + 2009-03-04 Tobias C. Rittweiler * slime.el (slime-check-fancy-symbol-name): Use --- /project/slime/cvsroot/slime/slime.el 2009/03/04 20:40:02 1.1142 +++ /project/slime/cvsroot/slime/slime.el 2009/03/06 23:23:52 1.1143 @@ -8270,8 +8270,12 @@ (when (featurep 'xemacs) (require 'overlay)) +(defun slime-emacs-21-p () + (and (not (featurep 'xemacs)) + (= emacs-major-version 21))) + (if (and (featurep 'emacs) (>= emacs-major-version 22)) - ;;; N.B. The 2nd, and 6th return value cannot be relied upon. + ;; N.B. The 2nd, and 6th return value cannot be relied upon. (defun slime-current-parser-state () ;; `syntax-ppss' does not save match data as it invokes ;; `beginning-of-defun' implicitly which does not save match @@ -8284,6 +8288,18 @@ (beginning-of-defun) (parse-partial-sexp (point) original-pos))))) +;;; `getf', `get', `symbol-plist' do not work on malformed plists +;;; on Emacs21. On later versions they do. +(when (slime-emacs-21-p) + ;; Perhaps we should rather introduce a new `slime-getf' than + ;; redefining. But what about (setf getf)? (A redefinition is not + ;; necessary, except for consistency.) + (defun getf (plist property &optional default) + (loop for (prop . val) on plist + when (eq prop property) return (car val) + finally (return default)))) + + (defun slime-split-string (string &optional separators omit-nulls) "This is like `split-string' in Emacs22, but also works in 21." (let ((splits (split-string string separators))) @@ -8636,9 +8652,6 @@ (select-window ,window) , at body)) -(defun slime-emacs-21-p () - (and (not (featurep 'xemacs)) - (= emacs-major-version 21))) (when (featurep 'xemacs) (add-hook 'sldb-hook 'sldb-xemacs-emulate-point-entered-hook)) From trittweiler at common-lisp.net Sat Mar 7 10:14:42 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 10:14:42 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv12238 Modified Files: swank-sbcl.lisp ChangeLog Log Message: * swank-sbcl.lisp (compiling-from-buffer-p), (compiling-from-file-p) (compiling-from-generated-code-p): New helpers; extracted from LOCATE-COMPILER-NOTE. (locate-compiler-note): Use them. (compiler-note-location): Use them, too, to handle reader-errors when compiling from file. This completes 2009-02-27. Reported by Christian Lynbech. --- /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/02/26 23:41:41 1.235 +++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/03/07 10:14:42 1.236 @@ -408,27 +408,40 @@ (compiler-source-path context) (sb-c::compiler-error-context-original-source context))) ((typep condition 'reader-error) - (let ((stream (stream-error-stream condition))) - (unless (open-stream-p stream) (bailout)) - (make-location (list :buffer *buffer-name*) - (list :offset *buffer-offset* - (file-position stream))))) + (let* ((stream (stream-error-stream condition)) + (file (pathname stream))) + (unless (open-stream-p stream) + (bailout)) + (if (compiling-from-buffer-p file) + (make-location (list :buffer *buffer-name*) + (list :offset *buffer-offset* + (file-position stream))) + (progn + (assert (compiling-from-file-p file)) + (make-location (list :file (namestring file)) + (list :position (file-position stream))))))) (t (bailout))))) +(defun compiling-from-buffer-p (filename) + (and (not (eq filename :lisp)) *buffer-name*)) + +(defun compiling-from-file-p (filename) + (and (pathnamep filename) (null *buffer-name*))) + +(defun compiling-from-generated-code-p (filename source) + (and (eq filename :lisp) (stringp source))) + (defun locate-compiler-note (file source-path source) - (cond ((and (not (eq file :lisp)) *buffer-name*) - ;; Compiling from a buffer + (cond ((compiling-from-buffer-p file) (make-location (list :buffer *buffer-name*) (list :offset *buffer-offset* (source-path-string-position source-path *buffer-substring*)))) - ((and (pathnamep file) (null *buffer-name*)) - ;; Compiling from a file + ((compiling-from-file-p file) (make-location (list :file (namestring file)) (list :position (1+ (source-path-file-position source-path file))))) - ((and (eq file :lisp) (stringp source)) - ;; Compiling macro generated code + ((compiling-from-generated-code-p file source) (make-location (list :source-form source) (list :position 1))) (t --- /project/slime/cvsroot/slime/ChangeLog 2009/03/06 23:23:52 1.1709 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/07 10:14:42 1.1710 @@ -1,3 +1,15 @@ +2009-03-08 Tobias C. Rittweiler + + * swank-sbcl.lisp (compiling-from-buffer-p), + (compiling-from-file-p) + (compiling-from-generated-code-p): New helpers; extracted from + LOCATE-COMPILER-NOTE. + (locate-compiler-note): Use them. + (compiler-note-location): Use them, too, to handle reader-errors + when compiling from file. This completes 2009-02-27. + + Reported by Christian Lynbech. + 2009-03-07 Tobias C. Rittweiler * slime.el ([portability] getf): Redefine `getf' on Emacs21 to From trittweiler at common-lisp.net Sat Mar 7 19:08:03 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 19:08:03 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv26931 Modified Files: swank-sbcl.lisp slime.el ChangeLog Log Message: * slime.el (slime-choose-overlay-region): Special case :read-error notes regardless of position kind. * swank-sbcl.lisp (signal-compiler-condition): Return :READ-ERROR as severity for reader-errors. (compiler-note-location): Fix off-by-one when compiling from buffer. --- /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/03/07 10:14:42 1.236 +++ /project/slime/cvsroot/slime/swank-sbcl.lisp 2009/03/07 19:08:03 1.237 @@ -382,6 +382,7 @@ (sb-ext:compiler-note :note) (style-warning :style-warning) (warning :warning) + (reader-error :read-error) (error :error)) :short-message (brief-compiler-message-for-emacs condition) :references (condition-references (real-condition condition)) @@ -413,11 +414,15 @@ (unless (open-stream-p stream) (bailout)) (if (compiling-from-buffer-p file) + ;; The stream position for e.g. "comma not inside backquote" + ;; is at the character following the comma, :offset is 0-based, + ;; hence the 1-. (make-location (list :buffer *buffer-name*) (list :offset *buffer-offset* - (file-position stream))) + (1- (file-position stream)))) (progn (assert (compiling-from-file-p file)) + ;; No 1- because :position is 1-based. (make-location (list :file (namestring file)) (list :position (file-position stream))))))) (t (bailout))))) --- /project/slime/cvsroot/slime/slime.el 2009/03/06 23:23:52 1.1143 +++ /project/slime/cvsroot/slime/slime.el 2009/03/07 19:08:03 1.1144 @@ -3006,14 +3006,11 @@ ((:error _) _ nil) ; do nothing ((:location file pos _hints) (cond ((eq (car file) ':source-form) nil) - (t - (destructure-case pos - ((:position pos &optional alignp) - (if (eq (slime-note.severity note) :read-error) - (values pos (1+ pos)) - (slime-choose-overlay-for-sexp location))) - (t - (slime-choose-overlay-for-sexp location)))))))))) + ((eq (slime-note.severity note) :read-error) + (let ((pos (slime-location-offset location))) + (values pos (1+ pos)))) + (t + (slime-choose-overlay-for-sexp location)))))))) (defun slime-choose-overlay-for-sexp (location) (slime-goto-source-location location) @@ -6347,12 +6344,12 @@ (t (error "No clickable part here"))))) -;;(defun slime-inspector-copy-down (number) -;; "Evaluate the slot at point via the REPL (to set `*')." -;; (interactive (list (or (get-text-property (point) 'slime-part-number) -;; (error "No part at point")))) -;; (slime-repl-send-string (format "%s" `(swank:inspector-nth-part ,number))) -;; (slime-repl)) +;; (defun slime-inspector-copy-down (number) +;; "Evaluate the slot at point via the REPL (to set `*')." +;; (interactive (list (or (get-text-property (point) 'slime-part-number) +;; (error "No part at point")))) +;; (slime-repl-send-string (format "%s" `(swank:inspector-nth-part ,number))) +;; (slime-repl)) (defun slime-inspector-pop () (interactive) --- /project/slime/cvsroot/slime/ChangeLog 2009/03/07 10:14:42 1.1710 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/07 19:08:03 1.1711 @@ -1,5 +1,15 @@ 2009-03-08 Tobias C. Rittweiler + * slime.el (slime-choose-overlay-region): Special case :read-error + notes regardless of position kind. + + * swank-sbcl.lisp (signal-compiler-condition): Return :READ-ERROR + as severity for reader-errors. + (compiler-note-location): Fix off-by-one when compiling from + buffer. + +2009-03-08 Tobias C. Rittweiler + * swank-sbcl.lisp (compiling-from-buffer-p), (compiling-from-file-p) (compiling-from-generated-code-p): New helpers; extracted from From trittweiler at common-lisp.net Sat Mar 7 19:10:06 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 19:10:06 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv27016/contrib Modified Files: swank-fancy-inspector.lisp ChangeLog Log Message: * swank-fancy-inspector.lisp (make-visit-file-thunk): New helper; extracted from emacs-inspect [file-stream]. ([method] emacs-inspect file-stream): Use it. ([method] emacs-inspect stream-error): Use it, too. --- /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2009/02/26 22:48:15 1.18 +++ /project/slime/cvsroot/slime/contrib/swank-fancy-inspector.lisp 2009/03/07 19:10:06 1.19 @@ -657,6 +657,12 @@ (label-value-line "Digits" (float-digits f)) (label-value-line "Precision" (float-precision f))))))) +(defun make-visit-file-thunk (stream) + (let ((pathname (pathname stream)) + (position (file-position stream))) + (lambda () + (ed-in-emacs `(,pathname :charpos ,position))))) + (defmethod emacs-inspect ((stream file-stream)) (multiple-value-bind (content) (call-next-method) @@ -664,13 +670,11 @@ `("Pathname: " (:value ,(pathname stream)) (:newline) " " - (:action "[visit file and show current position]" - ,(let ((pathname (pathname stream)) - (position (file-position stream))) - (lambda () - (ed-in-emacs `(,pathname :charpos ,position)))) - :refreshp nil) - (:newline)) + ,@(when (open-stream-p stream) + `((:action "[visit file and show current position]" + ,(make-visit-file-thunk stream) + :refreshp nil) + (:newline)))) content))) (defmethod emacs-inspect ((condition stream-error)) @@ -684,12 +688,9 @@ (:newline) " " ,@(when (open-stream-p stream) `((:action "[visit file and show current position]" - ,(let ((pathname (pathname stream)) - (position (file-position stream))) - (lambda () - (ed-in-emacs `(,pathname :charpos ,position)))) - :refreshp nil))) - (:newline)) + ,(make-visit-file-thunk stream) + :refreshp nil) + (:newline)))) content) content)))) --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/04 17:59:19 1.188 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/07 19:10:06 1.189 @@ -1,3 +1,10 @@ +2009-03-08 Tobias C. Rittweiler + + * swank-fancy-inspector.lisp (make-visit-file-thunk): New helper; + extracted from emacs-inspect [file-stream]. + ([method] emacs-inspect file-stream): Use it. + ([method] emacs-inspect stream-error): Use it, too. + 2009-03-04 Tobias C. Rittweiler * slime-asdf.el: Really do the commit from entry 2009-02-28. From trittweiler at common-lisp.net Sat Mar 7 19:29:43 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 19:29:43 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv29698 Modified Files: slime.el ChangeLog Log Message: * slime.el (make-slime-buffer-location, make-slime-file-location): Do not default to (:hints), but to nil, as expected in the slime-side source-location machinery. --- /project/slime/cvsroot/slime/slime.el 2009/03/07 19:08:03 1.1144 +++ /project/slime/cvsroot/slime/slime.el 2009/03/07 19:29:42 1.1145 @@ -3808,11 +3808,11 @@ (defun make-slime-buffer-location (buffer-name position &optional hints) `(:location (:buffer ,buffer-name) (:position ,position) - ,(if hints `(:hints ,hints) `(:hints)))) + ,(when hints `(:hints ,hints)))) (defun make-slime-file-location (file-name position &optional hints) `(:location (:file ,file-name) (:position ,position) - ,(if hints `(:hints ,hints) `(:hints)))) + ,(when hints `(:hints ,hints)))) ;;; The hooks are tried in order until one succeeds, otherwise the ;;; default implementation involving `slime-find-definitions-function' --- /project/slime/cvsroot/slime/ChangeLog 2009/03/07 19:08:03 1.1711 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/07 19:29:43 1.1712 @@ -1,5 +1,11 @@ 2009-03-08 Tobias C. Rittweiler + * slime.el (make-slime-buffer-location, make-slime-file-location): + Do not default to (:hints), but to nil, as expected in the + slime-side source-location machinery. + +2009-03-08 Tobias C. Rittweiler + * slime.el (slime-choose-overlay-region): Special case :read-error notes regardless of position kind. From trittweiler at common-lisp.net Sat Mar 7 20:08:13 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 20:08:13 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv2832/contrib Modified Files: slime-repl.el ChangeLog Log Message: * slime-repl.el ([test] interrupt-in-blocking-read): Wrap `with-canonicalized-slime-repl-buffer' around the whole test. Otherwise the changed repl prompt doesn't extend to the actual `slime-test-expect'. --- /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/03/03 23:22:05 1.16 +++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/03/07 20:08:13 1.17 @@ -1781,25 +1781,25 @@ (with-canonicalized-slime-repl-buffer (insert "(read-char)") (call-interactively 'slime-repl-return) - (slime-wait-condition "reading" #'slime-reading-p 5)) - (slime-interrupt) - (slime-wait-condition "Debugger visible" - (lambda () - (and (slime-sldb-level= 1) - (get-buffer-window (sldb-get-default-buffer)))) - 5) - (with-current-buffer (sldb-get-default-buffer) - (sldb-continue)) - (slime-wait-condition "reading" #'slime-reading-p 5) - (with-current-buffer (slime-output-buffer) - (insert "X") - (call-interactively 'slime-repl-return) - (slime-sync-to-top-level 5) - (slime-test-expect "Buffer contains result" - "SWANK> (read-char) + (slime-wait-condition "reading" #'slime-reading-p 5) + (slime-interrupt) + (slime-wait-condition "Debugger visible" + (lambda () + (and (slime-sldb-level= 1) + (get-buffer-window (sldb-get-default-buffer)))) + 5) + (with-current-buffer (sldb-get-default-buffer) + (sldb-continue)) + (slime-wait-condition "reading" #'slime-reading-p 5) + (with-current-buffer (slime-output-buffer) + (insert "X") + (call-interactively 'slime-repl-return) + (slime-sync-to-top-level 5) + (slime-test-expect "Buffer contains result" + "SWANK> (read-char) X #\\X -SWANK> " (buffer-string)))) +SWANK> " (buffer-string))))) (let ((byte-compile-warnings '())) (mapc #'byte-compile --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/07 19:10:06 1.189 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/07 20:08:13 1.190 @@ -1,5 +1,12 @@ 2009-03-08 Tobias C. Rittweiler + * slime-repl.el ([test] interrupt-in-blocking-read): Wrap + `with-canonicalized-slime-repl-buffer' around the whole + test. Otherwise the changed repl prompt doesn't extend to the + actual `slime-test-expect'. + +2009-03-08 Tobias C. Rittweiler + * swank-fancy-inspector.lisp (make-visit-file-thunk): New helper; extracted from emacs-inspect [file-stream]. ([method] emacs-inspect file-stream): Use it. From trittweiler at common-lisp.net Sat Mar 7 21:12:34 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Sat, 07 Mar 2009 21:12:34 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv11076 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-choose-overlay-for-read-error): Extraced and extended from `slime-choose-overlay-region'. Differentiate between symbol-related reader-errors (package not found &c) and character-related reader-errors. (slime-choose-overlay-region): Use it. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/07 19:29:43 1.1712 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/07 21:12:33 1.1713 @@ -1,5 +1,13 @@ 2009-03-08 Tobias C. Rittweiler + * slime.el (slime-choose-overlay-for-read-error): Extraced and + extended from `slime-choose-overlay-region'. Differentiate between + symbol-related reader-errors (package not found &c) and + character-related reader-errors. + (slime-choose-overlay-region): Use it. + +2009-03-08 Tobias C. Rittweiler + * slime.el (make-slime-buffer-location, make-slime-file-location): Do not default to (:hints), but to nil, as expected in the slime-side source-location machinery. --- /project/slime/cvsroot/slime/slime.el 2009/03/07 19:29:42 1.1145 +++ /project/slime/cvsroot/slime/slime.el 2009/03/07 21:12:33 1.1146 @@ -3007,10 +3007,20 @@ ((:location file pos _hints) (cond ((eq (car file) ':source-form) nil) ((eq (slime-note.severity note) :read-error) - (let ((pos (slime-location-offset location))) - (values pos (1+ pos)))) + (slime-choose-overlay-for-read-error location)) (t (slime-choose-overlay-for-sexp location)))))))) + +(defun slime-choose-overlay-for-read-error (location) + (let ((pos (slime-location-offset location))) + (save-excursion + (goto-char pos) + (let ((symbol (slime-symbol-at-point))) + (if symbol + ;; package not found, &c. + (values (slime-symbol-start-pos) (slime-symbol-end-pos)) + ;; comma not inside backquote, unmatched right parenthesis, &c. + (values pos (1+ pos))))))) (defun slime-choose-overlay-for-sexp (location) (slime-goto-source-location location) From heller at common-lisp.net Mon Mar 9 11:06:12 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:06:12 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv8379/contrib Modified Files: ChangeLog swank-kawa.scm Log Message: * swank-kawa.scm: Use foo: style keywords because :foo is now a symbol. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/07 20:08:13 1.190 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/09 11:06:12 1.191 @@ -1,3 +1,8 @@ +2009-03-09 Helmut Eller + + * swank-kawa.scm: Use foo: style keywords because :foo is now + a symbol.x + 2009-03-08 Tobias C. Rittweiler * slime-repl.el ([test] interrupt-in-blocking-read): Wrap --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2008/12/09 18:29:06 1.11 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/03/09 11:06:12 1.12 @@ -39,8 +39,8 @@ (module-static #t) (module-compile-options - :warn-invoke-unknown-method #t - :warn-undefined-variable #t + warn-invoke-unknown-method: #t + warn-undefined-variable: #t ) (require 'hash-table) @@ -310,10 +310,10 @@ (define-alias ) (define-simple-class () - (owner :: :init (java.lang.Thread:currentThread)) + (owner :: init: (java.lang.Thread:currentThread)) (peer :: ) - (queue :: :init ()) - (lock :init ())) + (queue :: init: ()) + (lock init: ())) ;;;; Entry Points @@ -479,7 +479,7 @@ (%read port rt))))) (df read-chunk ((in ) (len ) => ) - (let ((chars ( :length len))) + (let ((chars ( length: len))) (let loop ((offset :: 0)) (cond ((= offset len) ( chars)) (#t (let ((count (! read in chars offset (- len offset)))) @@ -517,7 +517,7 @@ (cond ((null? obj) (++ "nil")) ((string? obj) (pr obj)) ((number? obj) (pr obj)) - ((keyword? obj) (++ ":") (! append out (to-str obj))) + ;;((keyword? obj) (++ ":") (! append out (to-str obj))) ((symbol? obj) (pr obj)) ((pair? obj) (++ "(") @@ -606,6 +606,9 @@ (log "listener-abort: ~s ~a\n" ex flag)) (restart))))))) +(defslimefun create-repl (env #!rest _) + (list "user" "user")) + (defslimefun interactive-eval (env str) (values-for-echo-area (eval (read-from-string str) env))) @@ -643,7 +646,8 @@ ;;;; Compilation -(defslimefun compile-file-for-emacs (env (filename ) load?) +(defslimefun compile-file-for-emacs (env (filename ) load? + #!optional options) (let ((zip (cat (path-sans-extension (filepath filename)) ".zip"))) (wrap-compilation (fun ((m )) @@ -785,8 +789,8 @@ (('error msg) `((,name (:error ,msg)))))) (define-simple-class () - (file :init #f) - (line :init #f) + (file init: #f) + (line init: #f) ((*init* file name) (set (@ file (this)) file) (set (@ line (this)) line)) @@ -1021,10 +1025,10 @@ ;;;; Inspector (define-simple-class () - (object :init #!null) - (parts :: :init () ) - (stack :: :init '()) - (content :: :init '())) + (object init: #!null) + (parts :: init: () ) + (stack :: init: '()) + (content :: init: '())) (df make-inspector (env (vm ) => ) (car (spawn/chan (fun (c) (inspector c env vm))))) @@ -1062,12 +1066,12 @@ `("class: " (:value ,(! getClass obj)) "\n" ,@(inspect obj vm)) state)) - (cond ((nul? obj) (list :title "#!null" :id 0 :content `())) + (cond ((nul? obj) (list ':title "#!null" ':id 0 ':content `())) (#t - (list :title (pprint-to-string obj) - :id (assign-index obj state) - :content (let ((c (@ content state))) - (content-range c 0 (len c))))))) + (list ':title (pprint-to-string obj) + ':id (assign-index obj state) + ':content (let ((c (@ content state))) + (content-range c 0 (len c))))))) (df inspect (obj vm) (let* ((obj (as (vm-mirror vm obj)))) @@ -1120,7 +1124,7 @@ ;;;; IO redirection (define-simple-class () - (q :: :init ( (as 100))) + (q :: init: ( (as 100))) ((*init*) (invoke-special (this) '*init*)) ((write (buffer ) (from ) (to )) :: (synchronized (this) @@ -1431,7 +1435,7 @@ (call-with-abort (fun () (vm-demirror vm x))))))) (map (fun (x) (mlet ((name value) x) - (list :name name :value (p value) :id 0))) + (list ':name name ':value (p value) ':id 0))) (%frame-locals tid n state))))) (df frame-local-var ((tid ) (frame ) (var ) state => ) @@ -1625,7 +1629,7 @@ (! invokeMethod o t met '() o:INVOKE_SINGLE_THREADED)))))) (define-simple-class () - (var :allocation 'static)) + (var allocation: 'static)) (define-variable *global-get-mirror* #!null) (define-variable *global-set-mirror* #!null) @@ -2088,7 +2092,7 @@ ( (apply vector (! sub-list s from to))) ( (! substring s from to)) ( (let* ((len (as (- to from))) - (t ( :length len))) + (t ( length: len))) (java.lang.System:arraycopy s from t 0 len) t)))) From heller at common-lisp.net Mon Mar 9 11:06:16 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:06:16 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv8419/contrib Modified Files: swank-kawa.scm Log Message: More :FOO -> ':FOO substitutions. --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/03/09 11:06:12 1.12 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/03/09 11:06:16 1.13 @@ -447,7 +447,7 @@ ))))) (df find-thread (id threads listener (vm )) - (cond ((== id :repl-thread) listener) + (cond ((== id ':repl-thread) listener) ((== id 't) listener ;;(if (null? threads) ;; listener @@ -704,12 +704,12 @@ (pack (source-error>elisp e))))) (df source-error>elisp ((e ) => ) - (list :message (to-string (@ message e)) - :severity (case (integer->char (@ severity e)) - ((#\e #\f) :error) - ((#\w) :warning) - (else :note)) - :location (error-loc>elisp e))) + (list ':message (to-string (@ message e)) + ':severity (case (integer->char (@ severity e)) + ((#\e #\f) ':error) + ((#\w) ':warning) + (else ':note)) + ':location (error-loc>elisp e))) (df error-loc>elisp ((e )) (cond ((nul? (@ filename e)) `(:error "No source location")) From heller at common-lisp.net Mon Mar 9 11:06:24 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:06:24 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv8450 Modified Files: ChangeLog swank.lisp Log Message: Make fasl-pathname fully customizable not only the direcrory part. * swank.lisp (*fasl-pathname-function*): New variable. (*fasl-directory*): Deleted. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/07 21:12:33 1.1713 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:06:24 1.1714 @@ -1,3 +1,10 @@ +2009-03-09 Helmut Eller + + Make fasl-pathname fully customizable not only the direcrory part. + + * swank.lisp (*fasl-pathname-function*): New variable. + (*fasl-directory*): Deleted. + 2009-03-08 Tobias C. Rittweiler * slime.el (slime-choose-overlay-for-read-error): Extraced and --- /project/slime/cvsroot/slime/swank.lisp 2009/02/26 21:19:45 1.638 +++ /project/slime/cvsroot/slime/swank.lisp 2009/03/09 11:06:24 1.639 @@ -29,7 +29,7 @@ ;; These are user-configurable variables: #:*communication-style* #:*dont-close* - #:*fasl-directory* + #:*fasl-pathname-function* #:*log-events* #:*log-output* #:*use-dedicated-output-stream* @@ -2758,17 +2758,17 @@ (declare (ignore output-pathname warnings?)) (not failure?))))))) -(defvar *fasl-directory* nil - "Directory where swank should place fasl files.") +(defvar *fasl-pathname-function* nil + "In non-nil, use this function to compute the name for fasl-files.") (defun fasl-pathname (input-file options) - (cond ((getf options :fasl-directory) + (cond (*fasl-pathname-function* + (funcall *fasl-pathname-function* input-file options)) + ((getf options :fasl-directory) (let* ((str (getf options :fasl-directory)) (dir (filename-to-pathname str))) (assert (char= (aref str (1- (length str))) #\/)) (compile-file-pathname input-file :output-file dir))) - (*fasl-directory* - (compile-file-pathname input-file :output-file *fasl-directory*)) (t (compile-file-pathname input-file)))) From heller at common-lisp.net Mon Mar 9 11:06:30 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:06:30 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv8500/contrib Modified Files: ChangeLog swank-kawa.scm Log Message: swank-kawa.scm (copy-stack): Use null to mark absent src-loc information. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/09 11:06:12 1.191 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/09 11:06:30 1.192 @@ -1,7 +1,8 @@ 2009-03-09 Helmut Eller * swank-kawa.scm: Use foo: style keywords because :foo is now - a symbol.x + a symbol. + (copy-stack): Use null to mark absent src-loc information. 2009-03-08 Tobias C. Rittweiler --- /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/03/09 11:06:16 1.13 +++ /project/slime/cvsroot/slime/contrib/swank-kawa.scm 2009/03/09 11:06:30 1.14 @@ -1299,7 +1299,7 @@ (fun ((f )) (let ((vars (ignore-errors (! visibleVariables f)))) (pack ( - (ignore-errors (! location f)) + (or (ignore-errors (! location f)) #!null) (ignore-errors (! getArgumentValues f)) (or vars #!null) (or (and vars (ignore-errors (! get-values f vars))) From heller at common-lisp.net Mon Mar 9 11:06:38 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:06:38 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv8527 Modified Files: ChangeLog hyperspec.el Log Message: * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): Use case-insensitive completion. (hyperspec-lookup-reader-macro): New alias. Suggested by Stas Boukarev. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:06:24 1.1714 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:06:38 1.1715 @@ -1,5 +1,12 @@ 2009-03-09 Helmut Eller + * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): Use + case-insensitive completion. + (hyperspec-lookup-reader-macro): New alias. + Suggested by Stas Boukarev. + +2009-03-09 Helmut Eller + Make fasl-pathname fully customizable not only the direcrory part. * swank.lisp (*fasl-pathname-function*): New variable. --- /project/slime/cvsroot/slime/hyperspec.el 2009/03/03 10:03:59 1.14 +++ /project/slime/cvsroot/slime/hyperspec.el 2009/03/09 11:06:38 1.15 @@ -1177,13 +1177,18 @@ (defun common-lisp-hyperspec-lookup-reader-macro (macro) "Browse the CLHS entry for the reader-macro MACRO." (interactive - (list (completing-read "Look up reader-macro: " - common-lisp-hyperspec-reader-macros nil t - (common-lisp-hyperspec-reader-macro-at-point)))) + (list + (let ((completion-ignore-case t)) + (completing-read "Look up reader-macro: " + common-lisp-hyperspec-reader-macros nil t + (common-lisp-hyperspec-reader-macro-at-point))))) (browse-url (concat common-lisp-hyperspec-root "Body/" (gethash macro common-lisp-hyperspec-reader-macros)))) +(defalias 'hyperspec-lookup-reader-macro + 'common-lisp-hyperspec-lookup-reader-macro) + (defun common-lisp-hyperspec-reader-macro-at-point () (let ((regexp "\\(#.?\\)\\|\\([\"',`';()]\\)")) (when (looking-back regexp nil t) From heller at common-lisp.net Mon Mar 9 11:07:21 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:07:21 +0000 Subject: [slime-cvs] CVS slime/doc Message-ID: Update of /project/slime/cvsroot/slime/doc In directory cl-net:/tmp/cvs-serv8622 Modified Files: slime.texi Log Message: Add entry for hyperspec-lookup-reader-macro. --- /project/slime/cvsroot/slime/doc/slime.texi 2009/02/26 21:50:00 1.69 +++ /project/slime/cvsroot/slime/doc/slime.texi 2009/03/09 11:07:20 1.70 @@ -12,7 +12,7 @@ @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2009/02/26 21:50:00 $} + at set UPDATED @code{$Date: 2009/03/09 11:07:20 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -1007,10 +1007,13 @@ Note: this is one case where @kbd{C-c C-d h} is @emph{not} the same as @kbd{C-c C-d C-h}. - at kbditem{C-c C-d ~, common-lisp-hyperspec-format} + at kbditem{C-c C-d ~, hyperspec-lookup-format} Lookup a @emph{format character} in the @cite{Common Lisp Hyperspec}. @end table + at kbditem{C-c C-d #, hyperspec-lookup-reader-macro} +Lookup a @emph{reader macro} in the @cite{Common Lisp Hyperspec}. + at end table @c ----------------------- @node Cross-reference From heller at common-lisp.net Mon Mar 9 11:34:29 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:34:29 +0000 Subject: [slime-cvs] CVS slime/doc Message-ID: Update of /project/slime/cvsroot/slime/doc In directory cl-net:/tmp/cvs-serv11958 Modified Files: slime.texi Log Message: Fix key for slime-describe-function. Reported by Pierre Riteau. --- /project/slime/cvsroot/slime/doc/slime.texi 2009/03/09 11:07:20 1.70 +++ /project/slime/cvsroot/slime/doc/slime.texi 2009/03/09 11:34:29 1.71 @@ -12,7 +12,7 @@ @set EDITION 3.0-alpha @set SLIMEVER 3.0-alpha @c @set UPDATED @today{} - at set UPDATED @code{$Date: 2009/03/09 11:07:20 $} + at set UPDATED @code{$Date: 2009/03/09 11:34:29 $} @set TITLE SLIME User Manual @settitle @value{TITLE}, version @value{EDITION} @@ -980,7 +980,7 @@ @kbditem{C-c C-d d, slime-describe-symbol} Describe the symbol at point. - at kbditem{C-c C-f, slime-describe-function} + at kbditem{C-c C-d f, slime-describe-function} Describe the function at point. @kbditem{C-c C-d a, slime-apropos} From heller at common-lisp.net Mon Mar 9 11:52:37 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:52:37 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv14945 Modified Files: ChangeLog Log Message: Use correct encoding and eol conventions for socket streams. * swank-abcl.lisp (accept-connection): Honor external-format argument. (*external-format-to-coding-system*, find-external-format): New. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:06:38 1.1715 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:52:37 1.1716 @@ -1,3 +1,17 @@ +2009-03-09 Anton Vodonosov + + Use correct encoding and eol conventions for socket streams. + + * swank-abcl.lisp (accept-connection): Honor external-format + argument. + (*external-format-to-coding-system*, find-external-format): New. + +2009-03-09 Helmut Eller + + * slime.el (slime-with-xref-buffer): Use buffer-names like + "*slime xref...*" so that slime-kill-all-buffers can pick + it up easily. + 2009-03-09 Helmut Eller * hyperspec.el (common-lisp-hyperspec-lookup-reader-macro): Use From heller at common-lisp.net Mon Mar 9 11:55:21 2009 From: heller at common-lisp.net (CVS User heller) Date: Mon, 09 Mar 2009 11:55:21 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv15076 Modified Files: slime.el Log Message: * slime.el (slime-with-xref-buffer): Use buffer-names like "*slime xref...*" so that slime-kill-all-buffers can pick it up easily. --- /project/slime/cvsroot/slime/slime.el 2009/03/07 21:12:33 1.1146 +++ /project/slime/cvsroot/slime/slime.el 2009/03/09 11:55:21 1.1147 @@ -1,4 +1,3 @@ - ;;; slime.el --- Superior Lisp Interaction Mode for Emacs ;; ;;;; License @@ -4704,10 +4703,12 @@ ;;;;; XREF results buffer and window management -(defmacro* slime-with-xref-buffer ((xref-type symbol &optional package emacs-snapshot) +(defmacro* slime-with-xref-buffer ((xref-type symbol &optional package + emacs-snapshot) &body body) "Execute BODY in a xref buffer, then show that buffer." - `(let ((xref-buffer-name% (format "*XREF[%s: %s]*" ,xref-type ,symbol))) + `(let ((xref-buffer-name% (format "*slime xref[%s: %s]*" + ,xref-type ,symbol))) (slime-with-popup-buffer (xref-buffer-name% ,package t t ,emacs-snapshot) (slime-xref-mode) (slime-set-truncate-lines) From trittweiler at common-lisp.net Mon Mar 9 22:40:21 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Mon, 09 Mar 2009 22:40:21 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv24536/contrib Modified Files: ChangeLog slime-autodoc.el slime-enclosing-context.el Added Files: slime-indentation-fu.el swank-indentation-fu.lisp Log Message: * slime-autodoc.el (slime-compute-autodoc-rpc-form): New. Extracted from `slime-autodoc-thing-at-point'. (slime-compute-autodoc-internal): New. Extracted from `slime-compute-autodoc'. (slime-compute-autodoc): Explicitly save match data. (slime-autodoc-hook): New. Run everytime autodoc is computed. * slime-enclosing-context.el (slime-enclosing-bound-macros): New. (slime-find-bound-macros): New, too. * slime-indentation-fu.el, swank-indentation-fu.lisp: New contrib to properly indent &BODY arguments of local macro definitions. Suggested by Lorenz Moesenlechner. --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/09 11:06:30 1.192 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/09 22:40:21 1.193 @@ -1,3 +1,19 @@ +2009-03-09 Tobias C. Rittweiler + + * slime-autodoc.el (slime-compute-autodoc-rpc-form): + New. Extracted from `slime-autodoc-thing-at-point'. + (slime-compute-autodoc-internal): New. Extracted from + `slime-compute-autodoc'. + (slime-compute-autodoc): Explicitly save match data. + (slime-autodoc-hook): New. Run everytime autodoc is computed. + + * slime-enclosing-context.el (slime-enclosing-bound-macros): New. + (slime-find-bound-macros): New, too. + + * slime-indentation-fu.el, swank-indentation-fu.lisp: New contrib + to properly indent &BODY arguments of local macro definitions. + Suggested by Lorenz Moesenlechner. + 2009-03-09 Helmut Eller * swank-kawa.scm: Use foo: style keywords because :foo is now --- /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2009/02/27 21:38:20 1.14 +++ /project/slime/cvsroot/slime/contrib/slime-autodoc.el 2009/03/09 22:40:21 1.15 @@ -48,15 +48,19 @@ ;;;; Autodocs (automatic context-sensitive help) (defun slime-autodoc-thing-at-point () + "Not used; for debugging purposes." + (multiple-value-bind (operators arg-indices points) + (slime-enclosing-form-specs) + (slime-compute-autodoc-rpc-form operators arg-indices points))) + +(defun slime-compute-autodoc-rpc-form (operators arg-indices points) "Return a cache key and a swank form." (let ((global (slime-autodoc-global-at-point))) (if global (values (slime-qualify-cl-symbol-name global) `(swank:variable-desc-for-echo-area ,global)) - (multiple-value-bind (operators arg-indices points) - (slime-enclosing-form-specs) - (values (slime-make-autodoc-cache-key operators arg-indices points) - (slime-make-autodoc-swank-form operators arg-indices points)))))) + (values (slime-make-autodoc-cache-key operators arg-indices points) + (slime-make-autodoc-swank-form operators arg-indices points))))) (defun slime-autodoc-global-at-point () "Return the global variable name at point, if any." @@ -192,24 +196,39 @@ ;;;; slime-autodoc-mode -(defun slime-compute-autodoc () +(defvar slime-autodoc-hook '() + "If autodoc is enabled, this hook is run periodically in the +background everytime a new autodoc is computed. The hook is +applied to the result of `slime-enclosing-form-specs'.") + +(defun slime-compute-autodoc-internal () "Returns the cached arglist information as string, or nil. If it's not in the cache, the cache will be updated asynchronously." - (multiple-value-bind (cache-key retrieve-form) (slime-autodoc-thing-at-point) - (let ((cached (slime-get-cached-autodoc cache-key))) - (if cached - cached - ;; If nothing is in the cache, we first decline, and fetch - ;; the arglist information asynchronously. - (prog1 nil - (slime-eval-async retrieve-form - (lexical-let ((cache-key cache-key)) - (lambda (doc) - (let ((doc (if doc (slime-format-autodoc doc) ""))) - ;; Now that we've got our information, get it to - ;; the user ASAP. - (eldoc-message doc) - (slime-store-into-autodoc-cache cache-key doc)))))))))) + (multiple-value-bind (ops arg-indices points) + (slime-enclosing-form-specs) + (run-hook-with-args 'slime-autodoc-hook ops arg-indices points) + (multiple-value-bind (cache-key retrieve-form) + (slime-compute-autodoc-rpc-form ops arg-indices points) + (let ((cached (slime-get-cached-autodoc cache-key))) + (if cached + cached + ;; If nothing is in the cache, we first decline, and fetch + ;; the arglist information asynchronously. + (prog1 nil + (slime-eval-async retrieve-form + (lexical-let ((cache-key cache-key)) + (lambda (doc) + (let ((doc (if doc (slime-format-autodoc doc) ""))) + ;; Now that we've got our information, get it to + ;; the user ASAP. + (eldoc-message doc) + (slime-store-into-autodoc-cache cache-key doc))))))))))) + +(defun slime-compute-autodoc () + (save-excursion + (save-match-data + (slime-compute-autodoc-internal)))) + (make-variable-buffer-local (defvar slime-autodoc-mode nil)) @@ -260,6 +279,8 @@ (slime-require :swank-arglists) + + ;;;; Test cases (defun slime-check-autodoc-at-point (arglist) --- /project/slime/cvsroot/slime/contrib/slime-enclosing-context.el 2009/02/27 17:37:14 1.5 +++ /project/slime/cvsroot/slime/contrib/slime-enclosing-context.el 2009/03/09 22:40:21 1.6 @@ -94,6 +94,15 @@ (nreverse start-points))))) +(defun slime-enclosing-bound-macros () + (multiple-value-call #'slime-find-bound-macros (slime-enclosing-form-specs))) + +(defun slime-find-bound-macros (ops indices points) + ;; Kludgy! + (let ((slime-function-binding-ops-alist '((macrolet &bindings &body)))) + (slime-find-bound-functions ops indices points))) + + (def-slime-test enclosing-context.1 (buffer-sexpr wished-bound-names wished-bound-functions) "Check that finding local definitions work." --- /project/slime/cvsroot/slime/contrib/slime-indentation-fu.el 2009/03/09 22:40:21 NONE +++ /project/slime/cvsroot/slime/contrib/slime-indentation-fu.el 2009/03/09 22:40:21 1.1 ;;; slime-indentation-fu.el --- Correct indentation of local macros. ;; ;; Author: Tobias C. Rittweiler ;; ;; License: GNU GPL (same license as Emacs) ;; (require 'slime-autodoc) (slime-require :swank-indentation-fu) (defun slime-indentation-spec (arglist-string) (slime-eval `(swank:arglist-indentation ,arglist-string))) (defun slime-enclosing-macro-arglist (name) (multiple-value-bind (macro-names arglists arglist-pts) (slime-enclosing-bound-macros) (when-let (pos (position name macro-names :test 'equal)) (nth pos arglists)))) ;;; This was copied straight from the aweful cruft that is ;;; cl-indent.el (Emacs 23.0.91.2) (defun slime-compute-indentation-column (method path containing-form-start sexp-column normal-indent) (cond ((cdr path) normal-indent) ((<= (car path) method) ;; `distinguished' form (list (+ sexp-column 4) containing-form-start)) ((= (car path) (1+ method)) ;; first body form. (+ sexp-column lisp-body-indent)) (t ;; other body form normal-indent))) (defun slime-indent-fu (path state indent-point sexp-column normal-indent) (let* ((containing-form-start (nth 1 state)) (form-operator (save-excursion (goto-char (1+ containing-form-start)) (slime-symbol-at-point)))) (assert form-operator) (let* ((local-arglist (slime-enclosing-macro-arglist form-operator)) (indent-spec (if local-arglist (slime-indentation-spec local-arglist) (get (intern-soft form-operator) 'slime-indent)))) (slime-compute-indentation-column indent-spec path containing-form-start sexp-column normal-indent)))) (defun slime-update-local-indentation (ops arg-indices points) (loop for name in (car (slime-find-bound-macros ops arg-indices points)) do (put (intern name) 'slime-local-indent t) (put (intern name) 'common-lisp-indent-function 'slime-indent-fu))) (defun slime-indentation-fu-init () (add-hook 'slime-autodoc-hook 'slime-update-local-indentation)) (defun slime-indentation-fu-unload () (remove-hook 'slime-autodoc-hook 'slime-update-local-indentation)) ;;; Tests. (def-slime-test local-indentation.1 (buffer-content) "Check that indentation of MACROLET bound macros work." '((" \(in-package :swank) \(defmacro zurp (x &body body) `(progn ,x , at body)) \(defun quux (foo) (zurp foo 12 *HERE1* 14)) \(defun foo (x y) (let ((bar 42)) (macrolet ((zurp (a b &body body) `(progn ,a ,b , at body))) (zurp x y bar *HERE2* 14))))")) (with-temp-buffer (lisp-mode) (slime-mode 1) (slime-autodoc-mode 1) (insert buffer-content) (slime-compile-region (point-min) (point-max)) (search-backward "*HERE2*") (slime-compute-autodoc) ; updates indentation implicitly (slime-sync-to-top-level 3) (beginning-of-defun) (indent-sexp) (search-backward "*HERE1*") (beginning-of-defun) (indent-sexp) (slime-test-expect "Correct buffer content" buffer-content (substring-no-properties (buffer-string)))) ) (provide 'slime-indentation-fu)--- /project/slime/cvsroot/slime/contrib/swank-indentation-fu.lisp 2009/03/09 22:40:21 NONE +++ /project/slime/cvsroot/slime/contrib/swank-indentation-fu.lisp 2009/03/09 22:40:21 1.1 (in-package :swank) (defslimefun arglist-indentation (arglist) (with-buffer-syntax () (macro-indentation (from-string arglist)))) (provide :swank-indentation-fu) From trittweiler at common-lisp.net Mon Mar 9 22:51:24 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Mon, 09 Mar 2009 22:51:24 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv26355 Modified Files: ChangeLog slime.el Log Message: * slime.el (slime-define-channel-type): Indulge in pretty colors. (slime-define-channel-method): You, too! (slime-handle-indentation-update): Always put an indentation update on 'slime-indent; for slime-indentation-fu. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/09 11:52:37 1.1716 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/09 22:51:24 1.1717 @@ -1,3 +1,11 @@ +2009-03-09 Tobias C. Rittweiler + + * slime.el (slime-define-channel-type): Indulge in pretty colors. + (slime-define-channel-method): You, too! + + (slime-handle-indentation-update): Always put an indentation + update on 'slime-indent; for slime-indentation-fu. + 2009-03-09 Anton Vodonosov Use correct encoding and eol conventions for socket streams. @@ -28,7 +36,7 @@ 2009-03-08 Tobias C. Rittweiler - * slime.el (slime-choose-overlay-for-read-error): Extraced and + * slime.el (slime-choose-overlay-for-read-error): Extracted and extended from `slime-choose-overlay-region'. Differentiate between symbol-related reader-errors (package not found &c) and character-related reader-errors. --- /project/slime/cvsroot/slime/slime.el 2009/03/09 11:55:21 1.1147 +++ /project/slime/cvsroot/slime/slime.el 2009/03/09 22:51:24 1.1148 @@ -2471,12 +2471,16 @@ (defvar ,tab) (setq ,tab (make-hash-table :size 10))))) +(put 'slime-indulge-pretty-colors 'slime-define-channel-type t) + (defmacro slime-define-channel-method (type method args &rest body) `(puthash ',method (lambda (self . ,args) . ,body) ,(slime-channel-method-table-name type))) (put 'slime-define-channel-method 'lisp-indent-function 3) +(put 'slime-indulge-pretty-colors 'slime-define-channel-method t) + (defun slime-send-to-remote-channel (channel-id msg) (slime-dispatch-event `(:emacs-channel-send ,channel-id ,msg))) @@ -6735,10 +6739,10 @@ (dolist (info alist) (let ((symbol (intern (car info))) (indent (cdr info))) + (put symbol 'slime-indent indent) ;; Does the symbol have an indentation value that we set? (when (equal (get symbol 'common-lisp-indent-function) (get symbol 'slime-indent)) - (put symbol 'slime-indent indent) (put symbol 'common-lisp-indent-function indent)) (run-hook-with-args 'slime-indentation-update-hooks symbol indent)))) From heller at common-lisp.net Thu Mar 12 15:41:15 2009 From: heller at common-lisp.net (CVS User heller) Date: Thu, 12 Mar 2009 15:41:15 +0000 Subject: [slime-cvs] CVS slime/doc Message-ID: Update of /project/slime/c From trittweiler at common-lisp.net Fri Mar 27 20:32:55 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Fri, 27 Mar 2009 20:32:55 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv25660/contrib Modified Files: slime-indentation-fu.el ChangeLog Log Message: * slime-indentantion-fu.el (slime-indent-fu): Correctly deal with MACROLETs that define macros with &BODY in their arglists. ([test] local-indentation.1): Updated to test against this case. --- /project/slime/cvsroot/slime/contrib/slime-indentation-fu.el 2009/03/09 22:40:21 1.1 +++ /project/slime/cvsroot/slime/contrib/slime-indentation-fu.el 2009/03/27 20:32:55 1.2 @@ -45,12 +45,16 @@ (indent-spec (if local-arglist (slime-indentation-spec local-arglist) (get (intern-soft form-operator) 'slime-indent)))) + ;; If no &BODY appeared in the arglist, indent like a casual + ;; function invocation. + (unless indent-spec + (setq indent-spec 0)) (slime-compute-indentation-column indent-spec path containing-form-start sexp-column normal-indent)))) (defun slime-update-local-indentation (ops arg-indices points) (loop for name in (car (slime-find-bound-macros ops arg-indices points)) do - (put (intern name) 'slime-local-indent t) + (put (intern name) 'slime-local-indent t) ; unused at the moment, for debugging. (put (intern name) 'common-lisp-indent-function 'slime-indent-fu))) (defun slime-indentation-fu-init () @@ -62,7 +66,7 @@ ;;; Tests. -(def-slime-test local-indentation.1 (buffer-content) +(def-slime-test local-indentation.1 (buffer-content point-markers) "Check that indentation of MACROLET bound macros work." '((" \(in-package :swank) @@ -84,21 +88,26 @@ y bar *HERE2* - 14))))")) + 14)))) + +\(defun zabing (x y) + (let ((bar 42)) + (macrolet ((barf (a b) `(progn ,a ,b))) + (barf x + *HERE3*))))" + ("*HERE3*" "*HERE2*" "*HERE1*"))) (with-temp-buffer (lisp-mode) (slime-mode 1) (slime-autodoc-mode 1) (insert buffer-content) (slime-compile-region (point-min) (point-max)) - (search-backward "*HERE2*") - (slime-compute-autodoc) ; updates indentation implicitly - (slime-sync-to-top-level 3) - (beginning-of-defun) - (indent-sexp) - (search-backward "*HERE1*") - (beginning-of-defun) - (indent-sexp) + (dolist (marker point-markers) + (search-backward marker) + (slime-compute-autodoc) ; updates indentation implicitly + (slime-sync-to-top-level 3) + (beginning-of-defun) + (indent-sexp)) (slime-test-expect "Correct buffer content" buffer-content (substring-no-properties (buffer-string)))) --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/27 12:58:22 1.196 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/27 20:32:55 1.197 @@ -1,3 +1,9 @@ +2009-03-27 Tobias C. Rittweiler + + * slime-indentantion-fu.el (slime-indent-fu): Correctly deal with + MACROLETs that define macros with &BODY in their arglists. + ([test] local-indentation.1): Updated to test against this case. + 2009-03-25 Helmut Eller * slime-repl.el (slime-repl-event-hook-function): Handle From trittweiler at common-lisp.net Fri Mar 27 20:33:25 2009 From: trittweiler at common-lisp.net (CVS User trittweiler) Date: Fri, 27 Mar 2009 20:33:25 +0000 Subject: [slime-cvs] CVS slime/contrib Message-ID: Update of /project/slime/cvsroot/slime/contrib In directory cl-net:/tmp/cvs-serv25698/contrib Modified Files: ChangeLog Log Message: fix typo --- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/27 20:32:55 1.197 +++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/03/27 20:33:25 1.198 @@ -1,7 +1,7 @@ 2009-03-27 Tobias C. Rittweiler * slime-indentantion-fu.el (slime-indent-fu): Correctly deal with - MACROLETs that define macros with &BODY in their arglists. + MACROLETs that define macros without &BODY in their arglists. ([test] local-indentation.1): Updated to test against this case. 2009-03-25 Helmut Eller From heller at common-lisp.net Fri Mar 27 20:49:41 2009 From: heller at common-lisp.net (CVS User heller) Date: Fri, 27 Mar 2009 20:49:41 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv26637 Modified Files: ChangeLog slime-autoloads.el slime.el Log Message: * slime.el (slime-setup-contribs): Moved over from slime-autoloads.el --- /project/slime/cvsroot/slime/ChangeLog 2009/03/27 12:58:45 1.1721 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/27 20:49:41 1.1722 @@ -1,5 +1,9 @@ 2009-03-27 Helmut Eller + * slime.el (slime-setup-contribs): Moved over from + slime-autoloads.el + +2009-03-27 Helmut Eller * swank-openmcl.lisp (toggle-trace): Replace ccl::%trace with ccl:trace-function. (kill-thread): Use an implementation that doesn't raise a --- /project/slime/cvsroot/slime/slime-autoloads.el 2008/02/22 14:24:52 1.5 +++ /project/slime/cvsroot/slime/slime-autoloads.el 2009/03/27 20:49:41 1.6 @@ -27,6 +27,9 @@ (autoload 'slime-scheme-mode-hook "slime") (defvar slime-lisp-modes '(lisp-mode)) +(defvar slime-setup-contribs nil + "List of contribst to load. +Modified my slime-setup.") (defun slime-setup (&optional contribs) "Setup Emacs so that lisp-mode buffers always use SLIME. @@ -36,17 +39,6 @@ (setq slime-setup-contribs contribs) (add-hook 'slime-load-hook 'slime-setup-contribs)) -(defvar slime-setup-contribs nil) - -(defun slime-setup-contribs () - (when slime-setup-contribs - (add-to-list 'load-path (expand-file-name "contrib" slime-path)) - (dolist (c slime-setup-contribs) - (require c) - (let ((init (intern (format "%s-init" c)))) - (when (fboundp init) - (funcall init)))))) - (provide 'slime-autoloads) ;;; slime-autoloads.el ends here --- /project/slime/cvsroot/slime/slime.el 2009/03/27 12:58:31 1.1150 +++ /project/slime/cvsroot/slime/slime.el 2009/03/27 20:49:41 1.1151 @@ -82,15 +82,21 @@ Emacs Lisp package.")) (defvar slime-lisp-modes '(lisp-mode)) +(defvar slime-setup-contribs nil) (defun slime-setup (&optional contribs) "Setup Emacs so that lisp-mode buffers always use SLIME. CONTRIBS is a list of contrib packages to load." (when (member 'lisp-mode slime-lisp-modes) (add-hook 'lisp-mode-hook 'slime-lisp-mode-hook)) - (when contribs + (setq slime-setup-contribs contribs) + (slime-setup-contribs)) + +(defun slime-setup-contribs () + "Load and initialize contribs." + (when slime-setup-contribs (add-to-list 'load-path (expand-file-name "contrib" slime-path)) - (dolist (c contribs) + (dolist (c slime-setup-contribs) (require c) (let ((init (intern (format "%s-init" c)))) (when (fboundp init) From heller at common-lisp.net Fri Mar 27 20:49:49 2009 From: heller at common-lisp.net (CVS User heller) Date: Fri, 27 Mar 2009 20:49:49 +0000 Subject: [slime-cvs] CVS slime Message-ID: Update of /project/slime/cvsroot/slime In directory cl-net:/tmp/cvs-serv26674 Modified Files: ChangeLog swank.lisp Log Message: * swank.lisp (encode-message): Handle errors during write, e.g. closed sockets. --- /project/slime/cvsroot/slime/ChangeLog 2009/03/27 20:49:41 1.1722 +++ /project/slime/cvsroot/slime/ChangeLog 2009/03/27 20:49:49 1.1723 @@ -1,5 +1,10 @@ 2009-03-27 Helmut Eller + * swank.lisp (encode-message): Handle errors during write, e.g. + closed sockets. + +2009-03-27 Helmut Eller + * slime.el (slime-setup-contribs): Moved over from slime-autoloads.el --- /project/slime/cvsroot/slime/swank.lisp 2009/03/09 11:06:24 1.639 +++ /project/slime/cvsroot/slime/swank.lisp 2009/03/27 20:49:49 1.640 @@ -1330,16 +1330,18 @@ (defun simple-serve-requests (connection) (unwind-protect - (call-with-user-break-handler - (lambda () - (invoke-or-queue-interrupt #'dispatch-interrupt-event)) - (lambda () - (with-simple-restart (close-connection "Close SLIME connection") - ;;(handle-requests connection) - (let* ((stdin (real-input-stream *standard-input*)) - (*standard-input* (make-repl-input-stream connection - stdin))) - (simple-repl))))) + (with-connection (connection) + (call-with-user-break-handler + (lambda () + (invoke-or-queue-interrupt #'dispatch-interrupt-event)) + (lambda () + (with-simple-restart (close-connection "Close SLIME connection") + ;;(handle-requests connection) + (let* ((stdin (real-input-stream *standard-input*)) + (*standard-input* (make-repl-input-stream connection + stdin))) + (with-swank-error-handler (connection) + (simple-repl))))))) (close-connection connection nil (safe-backtrace)))) (defun simple-repl () @@ -1360,18 +1362,24 @@ (defun make-repl-input-stream (connection stdin) (make-input-stream (lambda () + (log-event "pull-input: ~a ~a ~a~%" + (connection.socket-io connection) + (if (open-stream-p (connection.socket-io connection)) + :socket-open :socket-closed) + (if (open-stream-p stdin) + :stdin-open :stdin-closed)) (loop - (with-connection (connection) - (let* ((socket (connection.socket-io connection)) - (inputs (list socket stdin)) - (ready (wait-for-input inputs))) - (cond ((eq ready :interrupt) - (check-slime-interrupts)) - ((member socket ready) - (handle-requests connection t)) - ((member stdin ready) - (return (read-non-blocking stdin))) - (t (assert (null ready)))))))))) + + (let* ((socket (connection.socket-io connection)) + (inputs (list socket stdin)) + (ready (wait-for-input inputs))) + (cond ((eq ready :interrupt) + (check-slime-interrupts)) + ((member socket ready) + (handle-requests connection t)) + ((member stdin ready) + (return (read-non-blocking stdin))) + (t (assert (null ready))))))))) (defun read-non-blocking (stream) (with-output-to-string (str) @@ -1775,16 +1783,15 @@ (send-to-emacs object)) (defun encode-message (message stream) - (let* ((string (prin1-to-string-for-emacs message)) - (length (length string))) - (assert (<= length #xffffff)) - (log-event "WRITE: ~A~%" string) - (let ((*print-pretty* nil)) - (format stream "~6,'0x" length)) - (write-string string stream) - ;;(terpri stream) - (finish-output stream))) - + (handler-bind ((error (lambda (c) (error (make-swank-error c))))) + (let* ((string (prin1-to-string-for-emacs message)) + (length (length string))) + (log-event "WRITE: ~A~%" string) + (let ((*print-pretty* nil)) + (format stream "~6,'0x" length)) + (write-string string stream) + (finish-output stream)))) + (defun prin1-to-string-for-emacs (object) (with-standard-io-syntax (let ((*print-case* :downcase)