]> git.eshelyaron.com Git - emacs.git/commitdiff
(octave-looking-at-kw): Add doc string.
authorGlenn Morris <rgm@gnu.org>
Sat, 13 Oct 2007 20:08:01 +0000 (20:08 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 13 Oct 2007 20:08:01 +0000 (20:08 +0000)
(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.

lisp/ChangeLog
lisp/progmodes/octave-mod.el

index 4a83eb217cf6baca540f7a34520306683d5c5893..3db1727d334fd77159144b905875ea8073b592af 100644 (file)
@@ -1,3 +1,11 @@
+2007-10-13  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/octave-mod.el (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.
+
 2007-10-13  John W. Eaton  <jwe@octave.org>
 
        * progmodes/octave-mod.el (octave-looking-at-kw)
index 72b605e6d59538f11d5e79fed5c2cd52cf38a018..dc550a202e20c4d25ef8c94f22f0a4f96d6aa863 100644 (file)
@@ -599,16 +599,19 @@ to end after the end keyword."
       (< 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 @@ an error is signaled."
       (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 @@ Returns t unless search stops at the beginning or end of the buffer."
         (skip-syntax-forward "w"))
     (while (and (/= arg 0)
                (setq found
-                     (octave-re-search-backward-kw "\\<function\\>")))
+                     (octave-re-search-backward-kw "\\<function\\>" inc)))
       (if (octave-not-in-string-or-comment-p)
          (setq arg (- arg inc))))
     (if found