From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: [gail@tnp-online.de: octave-mod.el: wrong indentation for "IF", "FOR", etc.] Date: Thu, 11 Oct 2007 21:23:08 -0400 Message-ID: References: <18188.40056.604794.828796@mithrandir.hornik.net> <18188.61920.576598.871247@segfault.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192152232 12395 80.91.229.12 (12 Oct 2007 01:23:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 01:23:52 +0000 (UTC) Cc: Kurt.Hornik@wu-wien.ac.at, GAIL , rms@gnu.org, emacs-devel@gnu.org To: "John W. Eaton" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 03:23:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ig9FK-0001JF-P7 for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 03:23:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig9FE-0001Iq-C0 for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 21:23:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ig9FB-0001Ih-BF for emacs-devel@gnu.org; Thu, 11 Oct 2007 21:23:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ig9F8-0001H4-Tc for emacs-devel@gnu.org; Thu, 11 Oct 2007 21:23:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig9F8-0001Gy-Ph for emacs-devel@gnu.org; Thu, 11 Oct 2007 21:23:10 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ig9F8-0004bx-HX for emacs-devel@gnu.org; Thu, 11 Oct 2007 21:23:10 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1Ig9F7-0000pa-0F; Thu, 11 Oct 2007 21:23:09 -0400 X-Spook: BLU-114/B enigma SCUD missile Europol genetic infowar X-Ran: (,LQW/XnhG/p`-pn>$P/I/=-.je:BPt,<}dsK0!noL6{,km5'uAylUF{}k/l6;P.cDmrII X-Hue: green X-Attribution: GM In-Reply-To: <18188.61920.576598.871247@segfault.lan> (John W. Eaton's message of "Wed, 10 Oct 2007 11:38:08 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80682 Archived-At: "John W. Eaton" wrote: > 2007-10-10 John W. Eaton > > * 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)))