From: Glenn Morris <rgm@gnu.org>
To: "John W. Eaton" <jwe@bevo.che.wisc.edu>
Cc: Kurt.Hornik@wu-wien.ac.at, GAIL <gail@tnp-online.de>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [gail@tnp-online.de: octave-mod.el: wrong indentation for "IF", "FOR", etc.]
Date: Thu, 11 Oct 2007 21:23:08 -0400 [thread overview]
Message-ID: <yp8x69xh1f.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <18188.61920.576598.871247@segfault.lan> (John W. Eaton's message of "Wed, 10 Oct 2007 11:38:08 -0400")
"John W. Eaton" wrote:
> 2007-10-10 John W. Eaton <jwe@octave.org>
>
> * progmodes/octave-mod.el (octave-looking-at-kw,
> octave-re-search-forward-kw, octave-re-search-backward-kw):
> New functions.
Why so complicated - why not just let-bind case-fold search in the
functions that need it?
> +(defun octave-re-search-forward-kw (regexp)
> + (let ((case-fold-search nil))
> + (re-search-forward regexp nil 'move inc)))
> +
> +(defun octave-re-search-backward-kw (regexp)
> + (let ((case-fold-search nil))
> + (re-search-backward regexp nil 'move inc)))
It seems ugly to (ab)use the variable `inc' in this way. If you do
want to do it this way, wouldn't it be nicer to use something like:
(defun octave-re-search-forward (regexp &optional bound noerror count)
"Like `re-search-forward', but sets `case-fold-search' nil."
(let (case-fold-search)
(re-search-forward regexp bound noerror count)))
next prev parent reply other threads:[~2007-10-12 1:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1If3fk-0003hN-Nr@fencepost.gnu.org>
[not found] ` <18188.40056.604794.828796@mithrandir.hornik.net>
2007-10-10 15:38 ` [gail@tnp-online.de: octave-mod.el: wrong indentation for "IF", "FOR", etc.] John W. Eaton
2007-10-11 5:20 ` Richard Stallman
2007-10-12 1:23 ` Glenn Morris [this message]
2007-10-12 1:57 ` John W. Eaton
2007-10-12 15:59 ` Richard Stallman
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=yp8x69xh1f.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=Kurt.Hornik@wu-wien.ac.at \
--cc=emacs-devel@gnu.org \
--cc=gail@tnp-online.de \
--cc=jwe@bevo.che.wisc.edu \
--cc=rms@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.