unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: iterating over (nonascii) chars
Date: Mon, 14 Oct 2013 22:48:55 +0200	[thread overview]
Message-ID: <87eh7n1sug.fsf@web.de> (raw)
In-Reply-To: 2e26ed82-af12-407a-9780-8916f704ada2@googlegroups.com

Rustom Mody <rustompmody@gmail.com> writes:

> In perl-mode.el I find things like
>
>
>     (modify-syntax-entry ?* "." st)
>     (modify-syntax-entry ?+ "." st)
>     (modify-syntax-entry ?- "." st)
>     (modify-syntax-entry ?/ "." st)
>     (modify-syntax-entry ?< "." st)
>     (modify-syntax-entry ?= "." st)
>     (modify-syntax-entry ?> "." st)
>
>
> Any reason why its not written as follows?
>
> (dolist (v (string-to-list "*+-/<=>")) 
>  (modify-syntax-entry v "." st))

Probably, no.  Many people prefer the first version wrt readability.
While galloping through the code the first version is easier to parse
for your eyes, while the second version is shorter, of course.  Use
whatever suits your style of thinking and coding.


Regards,

Michael.




  reply	other threads:[~2013-10-14 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 14:07 iterating over (nonascii) chars Rustom Mody
2013-10-14 20:48 ` Michael Heerdegen [this message]
     [not found] ` <mailman.3994.1381783767.10748.help-gnu-emacs@gnu.org>
2013-10-15  3:29   ` Rustom Mody

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87eh7n1sug.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).