Deutsch English Français Italiano |
<vqb1jm$2mem7$3@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Thu, 6 Mar 2025 02:34:30 -0000 (UTC) Organization: A noiseless patient Spider Lines: 28 Message-ID: <vqb1jm$2mem7$3@dont-email.me> References: <vpkmq0$21php$1@dont-email.me> <20250304175602.c9fe683d678d3a2ed101a4ac@g{oogle}mail.com> <vq75k8$1t6ut$2@dont-email.me> <vq785i$1u7v7$1@dont-email.me> <20250304101022.154@kylheku.com> <vq7shq$226p3$1@dont-email.me> <vq7u5u$21gol$2@dont-email.me> <vq8kul$29gdt$1@dont-email.me> <vq8sul$2af0l$1@dont-email.me> <vq92c7$2bdt3$1@dont-email.me> <vq92kr$2b8tc$1@dont-email.me> <vq93o7$2bkpr$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 06 Mar 2025 03:34:30 +0100 (CET) Injection-Info: dont-email.me; posting-host="5fed1e3e41d7a92fa0a0e33e61fef7d8"; logging-data="2833095"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zoxq3Thl+HYi+HCcgsEmm" User-Agent: Pan/0.162 (Pokrosvk) Cancel-Lock: sha1:zjAms5uoCiVmNQ/7bU+Yfd7B0EA= Bytes: 2321 On Wed, 5 Mar 2025 09:58:45 +0100, Janis Papanagnou wrote: > With my first glimpse of lithp code I immediately felt repelled ... I suspect at least part of that is down to the traditional code layout, where an accumulation of opening parentheses from various prior lines are all closed at once on a single line. I call this the “parenthesis pileup” layout. Here’s a sample of how I prefer to layout my Lisp code: (global-set-key [?\s-o] (lambda () "open a file named in the region if there is one, else prompt for a file name." (interactive) (cond ((use-region-p) (let (beg end) (get-cur-line nil beg end) (find-file (buffer-substring beg end)) ) ; let ) (t (call-interactively 'find-file) ) ) ; cond ) ; lambda ) ; global-set-key