all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: LanX <lanx.perl@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: cperl-mode
Date: Wed, 26 May 2010 05:41:24 -0700 (PDT)	[thread overview]
Message-ID: <2a0a7047-053d-4298-bcc8-c692a833c1fc@i31g2000vbt.googlegroups.com> (raw)
In-Reply-To: slrnhvpbsn.5pn.nospam-abuse@powdermilk.math.berkeley.edu


Hi Ilya

> I'll gladly accept well-coded patches.  (This is a recurring request
> from the users.)


talking about "well coded", I'm still a beginner in elisp and
sometimes wondering about your code.

You use and handle around quite often array like lists where every
index represents something specific which needs to be documented each
time you access it.

for instance in the posted code:
-----------
 ((eq 'in-parens (elt i 0))
...
 (goto-char (elt i 2))            ; old-indent-point
...
 (if (and (elt i 3)         ; is-brace
-----------
where i is the return value from  cperl-sniff-for-indent'

So why don't you use alists or even hashes instead of documenting each
numerical index?

http://www.gnu.org/s/emacs/manual/html_node/elisp/Association-Lists.html

Are there technical reasons for avoiding alists?

And wouldn't calling the variable something like "sniff"  improve the
readability?

Cheers
  Rolf


  reply	other threads:[~2010-05-26 12:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 20:09 cperl-mode Terrence Brannon
     [not found] ` <874ohy7yy1.fsf@castleamber.com>
     [not found]   ` <0964e194-b8a7-4588-b686-d5e4c501262a@b21g2000vbh.googlegroups.com>
     [not found]     ` <87d3wl3ut4.fsf@castleamber.com>
2010-05-24 21:12       ` cperl-mode LanX
2010-05-24 22:11         ` cperl-mode John Bokma
2010-05-25 10:36           ` cperl-mode LanX
2010-05-26  5:20             ` cperl-mode Ilya Zakharevich
2010-05-26 12:41               ` LanX [this message]
2010-05-26 20:33                 ` cperl-mode Ilya Zakharevich
2010-05-26 21:13                   ` cperl-mode LanX
2010-05-27  7:01                     ` cperl-mode Ilya Zakharevich
2010-05-24 21:45 ` cperl-mode Andreas Politz
     [not found] <mailman.133.1188636475.18990.help-gnu-emacs@gnu.org>
2007-09-02  8:28 ` cperl-mode Ilya Zakharevich
2007-09-03  7:41   ` cperl-mode Goran
2007-09-03 20:13     ` cperl-mode Ilya Zakharevich
     [not found]   ` <mailman.222.1188805400.18990.help-gnu-emacs@gnu.org>
2007-09-03 20:19     ` cperl-mode Ilya Zakharevich
2007-09-07  4:43 ` cperl-mode Stefan Monnier
2007-09-07 23:25   ` cperl-mode Ilya Zakharevich
2007-09-08  7:33     ` cperl-mode Eli Zaretskii
     [not found]     ` <mailman.483.1189236797.18990.help-gnu-emacs@gnu.org>
2007-09-10  8:33       ` cperl-mode Ilya Zakharevich
2007-09-10 19:48         ` cperl-mode Eli Zaretskii
     [not found]         ` <mailman.654.1189453685.18990.help-gnu-emacs@gnu.org>
2007-09-11  1:08           ` cperl-mode Ilya Zakharevich
2007-09-11  3:28             ` cperl-mode Eli Zaretskii
     [not found]             ` <mailman.673.1189481287.18990.help-gnu-emacs@gnu.org>
2007-09-11 19:58               ` cperl-mode Ilya Zakharevich
2007-09-12  6:44                 ` cperl-mode Eli Zaretskii
2007-09-11  8:11           ` cperl-mode Tim X
2007-09-11 19:44             ` cperl-mode Eli Zaretskii
2007-09-11 19:53             ` cperl-mode Ilya Zakharevich
2007-09-13  8:48               ` cperl-mode Tim X
     [not found]             ` <mailman.723.1189539876.18990.help-gnu-emacs@gnu.org>
2007-09-13  8:43               ` cperl-mode Tim X
2007-09-13  8:45               ` cperl-mode Tim X
     [not found] <200708312051.l7VKpe2C020707@powdermilk.math.berkeley.edu>
2007-09-01  8:47 ` cperl-mode gordon gordon
     [not found] <200708310325.l7V3PP1e017798@powdermilk.math.berkeley.edu>
2007-08-31  8:04 ` cperl-mode gordon gordon
     [not found] <mailman.5390.1188205514.32220.help-gnu-emacs@gnu.org>
2007-08-31  3:25 ` cperl-mode Ilya Zakharevich
2007-08-31  5:24   ` cperl-mode Tim X
2007-08-31  9:22   ` cperl-mode Goran
2007-08-31 18:19     ` cperl-mode Peter Dyballa
     [not found]   ` <mailman.109.1188567372.18990.help-gnu-emacs@gnu.org>
2007-08-31 20:51     ` cperl-mode Ilya Zakharevich
2007-09-01  4:38       ` cperl-mode Tim X
2007-09-01 10:17         ` cperl-mode rahed
2007-09-02  8:23         ` cperl-mode Ilya Zakharevich
2007-09-29 19:28           ` cperl-mode David Combs
2007-09-30 19:48             ` cperl-mode Ilya Zakharevich
  -- strict thread matches above, loose matches on Subject: below --
2007-08-25 13:02 cperl-mode Goran
2004-03-26 14:47 cperl-mode Stefan Monnier
2004-03-26 18:03 ` cperl-mode Juanma Barranquero
2004-03-26 18:29   ` cperl-mode Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a0a7047-053d-4298-bcc8-c692a833c1fc@i31g2000vbt.googlegroups.com \
    --to=lanx.perl@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.