# HG changeset patch # User Glenn Morris # Date 1192306057 0 # Node ID c766bbd72b1df2b761c820d7a87a03adf733f019 # Parent 3b55dbb52be4be877b79a32c018b79efece8ffb3 (octave-looking-at-kw): Add doc string. (octave-re-search-forward-kw, octave-re-search-backward-kw): Add doc string, and an explicit COUNT argument. (octave-scan-blocks, octave-beginning-of-defun): Explicitly pass INC to search functions. diff -r 3b55dbb52be4 -r c766bbd72b1d lisp/progmodes/octave-mod.el --- a/lisp/progmodes/octave-mod.el Sat Oct 13 20:01:38 2007 +0000 +++ b/lisp/progmodes/octave-mod.el Sat Oct 13 20:07:37 2007 +0000 @@ -599,16 +599,19 @@ (< pos (point))))) (defun octave-looking-at-kw (regexp) + "Like `looking-at', but sets `case-fold-search' nil." (let ((case-fold-search nil)) (looking-at regexp))) -(defun octave-re-search-forward-kw (regexp) +(defun octave-re-search-forward-kw (regexp count) + "Like `re-search-forward', but sets `case-fold-search' nil, and moves point." (let ((case-fold-search nil)) - (re-search-forward regexp nil 'move inc))) + (re-search-forward regexp nil 'move count))) -(defun octave-re-search-backward-kw (regexp) +(defun octave-re-search-backward-kw (regexp count) + "Like `re-search-backward', but sets `case-fold-search' nil, and moves point." (let ((case-fold-search nil)) - (re-search-backward regexp nil 'move inc))) + (re-search-backward regexp nil 'move count))) (defun octave-in-defun-p () "Return t if point is inside an Octave function declaration. @@ -884,7 +887,7 @@ (while (/= count 0) (catch 'foo (while (or (octave-re-search-forward-kw - octave-block-begin-or-end-regexp) + octave-block-begin-or-end-regexp inc) (if (/= depth 0) (error "Unbalanced block"))) (if (octave-not-in-string-or-comment-p) @@ -1054,7 +1057,7 @@ (skip-syntax-forward "w")) (while (and (/= arg 0) (setq found - (octave-re-search-backward-kw "\\"))) + (octave-re-search-backward-kw "\\" inc))) (if (octave-not-in-string-or-comment-p) (setq arg (- arg inc)))) (if found