This is a multi-part message in MIME format.
--------------A20F1CF13D6CCA3FFA3E5D21
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
I'm using CMUCL, Emacs and ILISP.
Two questions if you pleased.
1) I can't enter something like the following in the ILISP
(Source file buffer):
[= [slot-value 'orders 'orderid] 10]
After I press ']' all brackets changed to parens. Who does that ?
Can I change that behavior ?
2) I don't like some formatting ILISP does for me.
E.g.
(with-open-file (str "data.in" :direction :output :if-exists :error)
(print 1 str) (print '(setq a 888) str) t)
It'd better be
(with-open-file (str "data.in" :direction :output :if-exists :error)
(print 1 str) (print '(setq a 888) str) t)
:db-info (:join-class company
:home-key companyid
:foreign-key companyid
:set nil))
Looks better in the following manner
:db-info (:join-class company
:home-key companyid
:foreign-key companyid
:set nil))
I prefer brances of the IF on the same level, but ILISP has another
preference:
(if (null choises)
(list phrase)
(generate2 (random-elt choises)))
Can I tell ILISP someway about my preferences ?
Thanks.
--
Vladimir Zolotych ······@eurocom.od.ua
--------------A20F1CF13D6CCA3FFA3E5D21
Content-Type: text/x-vcard; charset=us-ascii;
name="gsmith.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir V. Zolotych
Content-Disposition: attachment;
filename="gsmith.vcf"
begin:vcard
n:Zolotych;Valdimir V.
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
·····················@eurocom.od.ua
x-mozilla-cpt:;0
fn:Valdimir V. Zolotych
end:vcard
--------------A20F1CF13D6CCA3FFA3E5D21--
"Vladimir V. Zolotych" a �crit :
>
> Hello,
>
> I'm using CMUCL, Emacs and ILISP.
>
> Two questions if you pleased.
>
> 1) I can't enter something like the following in the ILISP
> (Source file buffer):
>
> [= [slot-value 'orders 'orderid] 10]
>
> After I press ']' all brackets changed to parens. Who does that ?
> Can I change that behavior ?
You may insert that in your .emacs:
(setq lisp-mode-hook
(lambda ()
(require 'ilisp)
;;(font-lock-mode 1)
(local-unset-key "]")
))
--
----------------------------
Bailleul Jonathan
DEA Informatique
LaBRI, Universite Bordeaux I
Jonathan BAILLEUL <········@labri.u-bordeaux.fr> writes:
| You may insert that in your .emacs:
|
| (setq lisp-mode-hook
| (lambda ()
| (require 'ilisp)
| ;;(font-lock-mode 1)
| (local-unset-key "]")
| ))
Please don't advice people to use setq on hooks; tell them to use
add-hook instead. My suggestion to Vladimir on the use of tabs in
mails applies to you too.
--
Hannu
"Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
| I'm using CMUCL, Emacs and ILISP.
Specify also versions next time, thanks.
| After I press ']' all brackets changed to parens. Who does that ?
| Can I change that behavior ?
ILISP does that. You can unset that binding with local-unset-key
in the lisp-mode-hook. In the ILISP development version from CVS
the special binding of right bracket is controlled by the variable
ilisp-bindings-*bind-right-bracket-p* and its default value is nil.
| 2) I don't like some formatting ILISP does for me.
ILISP doesn't do indentation.
| E.g.
|
| (with-open-file (str "data.in" :direction :output :if-exists :error)
| (print 1 str) (print '(setq a 888) str) t)
|
| It'd better be
|
| (with-open-file (str "data.in" :direction :output :if-exists :error)
| (print 1 str) (print '(setq a 888) str) t)
That's because you are using generic Lisp indentation. You should
set lisp-indent-function to common-lisp-indent-function. Something
like this should work (including unsetting of ] binding; not
tested):
(defun my-lisp-mode-hook ()
(require 'ilisp)
(make-local-variable lisp-indent-function)
(setq lisp-indent-function 'common-lisp-indent-function)
(local-unset-key [?\]]))
(add-hook 'lisp-mode-hook 'my-lisp-mode-hook)
| I prefer brances of the IF on the same level, but ILISP has another
| preference:
|
| (if (null choises)
| (list phrase)
| (generate2 (random-elt choises)))
I suggest you don't use tabs in your mails like that because, for
example, indentation of that code broke when I quoted your mail.
| Can I tell ILISP someway about my preferences ?
No, but you can tell cl-indent about your preferences. Something
like this should work:
(defun my-cl-indent-settings ()
(put 'if 'common-lisp-indent-function 3))
(eval-after-load "cl-indent" '(my-cl-indent-settings))
Use 1 in place of 3 if you want
(if foo
bar
baz)
instead of
(if foo
bar
baz)
See cl-indent.el's default indentation patterns for how to define
more complex patterns of your own.
--
Hannu
Hannu Koivisto <·····@iki.fi> writes:
> "Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
>
> | I'm using CMUCL, Emacs and ILISP.
>
...much deleted...
>
> See cl-indent.el's default indentation patterns for how to define
> more complex patterns of your own.
Thanks Hannu.
BTW, does anybody know of good indentation patterns for
HANDLER-*
RESTART-*
DEFINE-CONDITION
and other amenities?
Cheers
--
Marco Antoniotti =============================================================
NYU Bioinformatics Group tel. +1 - 212 - 998 3488
719 Broadway 12th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://galt.mrl.nyu.edu/valis
Like DNA, such a language [Lisp] does not go out of style.
Paul Graham, ANSI Common Lisp
* "Marco" == Marco Antoniotti <·······@cs.nyu.edu> writes:
Marco> BTW, does anybody know of good indentation patterns for
Marco> HANDLER-* RESTART-* DEFINE-CONDITION
Marco> and other amenities?
I'd vote to take indentations from the spec for entries that has
examples there, if no other common convention exists.
--
Eugene
Eugene Zaikonnikov <······@cit.org.by> writes:
> * "Marco" == Marco Antoniotti <·······@cs.nyu.edu> writes:
>
> Marco> BTW, does anybody know of good indentation patterns for
>
> Marco> HANDLER-* RESTART-* DEFINE-CONDITION
>
> Marco> and other amenities?
>
> I'd vote to take indentations from the spec for entries that has
> examples there, if no other common convention exists.
Sounds good to me.
Another tricky issue is method qualifiers.
(defmethod foo :before ((x zut)) (code))
gets indented as
(defmethod foo :before ((x zut))
(code))
Not good. But I don't know how to fix this.
Cheers
--
Marco Antoniotti =============================================================
NYU Bioinformatics Group tel. +1 - 212 - 998 3488
719 Broadway 12th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://galt.mrl.nyu.edu/valis
Like DNA, such a language [Lisp] does not go out of style.
Paul Graham, ANSI Common Lisp
Marco Antoniotti <·······@cs.nyu.edu> writes:
| Another tricky issue is method qualifiers.
|
| (defmethod foo :before ((x zut)) (code))
|
| gets indented as
|
| (defmethod foo :before ((x zut))
| (code))
|
| Not good. But I don't know how to fix this.
There is some code in XEmacs' cl-indent that, as far as I can see
just by skimming through the code, handles that.
--
Hannu
Marco Antoniotti <·······@cs.nyu.edu> writes:
> BTW, does anybody know of good indentation patterns for
>
> HANDLER-*
> RESTART-*
> DEFINE-CONDITION
>
> and other amenities?
That's what I use on XEmacs:
;; Better indentation for CL and ELisp
(load "cl-indent")
(setq lisp-indent-function (function common-lisp-indent-function))
;; Better indentation patterns for ANSI CL:
(put 'with-slots 'common-lisp-indent-function 2)
(put 'with-accessors 'common-lisp-indent-function 2)
(put 'with-output-to-string 'common-lisp-indent-function 1)
(put 'restart-case 'common-lisp-indent-function
'(4 &rest (&whole 2 (&whole 4 &rest 1) &body)))
(put 'handler-case 'common-lisp-indent-function
'(4 &rest (&whole 2 (&whole 4 &rest 1) &body)))
(put 'restart-bind 'common-lisp-indent-function 1)
(put 'handler-bind 'common-lisp-indent-function 1)
(put 'print-unreadable-object 'common-lisp-indent-function 1)
What's the problem with define-condition? It indents just like
defclass, which seems Ok to me?
Regs, Pierre.
--
Pierre R. Mai <····@acm.org> http://www.pmsf.de/pmai/
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein
"Pierre R. Mai" <····@acm.org> writes:
> Marco Antoniotti <·······@cs.nyu.edu> writes:
>
> > BTW, does anybody know of good indentation patterns for
> >
> > HANDLER-*
...
>
> That's what I use on XEmacs:
>
> ;; Better indentation for CL and ELisp
...
> What's the problem with define-condition? It indents just like
> defclass, which seems Ok to me?
>
Thanks. After I sent the message I just went back and found - deep in
the thick of my Emacs setup - the culprit making DEFINE-CONDITION not
indent properly.
Cheers
--
Marco Antoniotti =============================================================
NYU Bioinformatics Group tel. +1 - 212 - 998 3488
719 Broadway 12th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://galt.mrl.nyu.edu/valis
Like DNA, such a language [Lisp] does not go out of style.
Paul Graham, ANSI Common Lisp
This is a multi-part message in MIME format.
--------------92FCAFCFC84C0AEDE3A1360A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hannu Koivisto wrote:
>
> ... In the ILISP development version from CVS
> the special binding of right bracket is controlled by the variable
> ilisp-bindings-*bind-right-bracket-p* and its default value is nil.
Would you mind tell me location of ILISP CVS ?
I've only found the location of the tar files
(http://ilisp.cons.org/download.html ).
I should mention very high quality and detalization
of answers in comp.lang.lisp. Thanks.
--
Vladimir Zolotych ······@eurocom.od.ua
--------------92FCAFCFC84C0AEDE3A1360A
Content-Type: text/x-vcard; charset=us-ascii;
name="gsmith.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Vladimir V. Zolotych
Content-Disposition: attachment;
filename="gsmith.vcf"
begin:vcard
n:Zolotych;Valdimir V.
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
·····················@eurocom.od.ua
x-mozilla-cpt:;0
fn:Valdimir V. Zolotych
end:vcard
--------------92FCAFCFC84C0AEDE3A1360A--
Vladimir V. Zolotych wrote:
> Would you mind tell me location of ILISP CVS ?
> I've only found the location of the tar files
> (http://ilisp.cons.org/download.html ).
For details try sourceforge.net/cvs/?group_id=3957
Cheers,
Will
"Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
| Would you mind tell me location of ILISP CVS ?
ILISP CVS repository is hosted by Sourceforge. The project page is
at <URL:http://sourceforge.net/projects/ilisp/>. Follow the "CVS
Repository" link near the bottom of the page and you'll get
instructions on how to obtain ILISP via CVS.
| I've only found the location of the tar files
| (http://ilisp.cons.org/download.html ).
Right, I think those pages should have a link to the Sourceforge.
I'll inform Marco about this (he probably ends up reading this
article too but just in case...)
--
Hannu