aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/octave-mod.el
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2007-10-13 20:08:01 +0000
committerGlenn Morris <[email protected]>2007-10-13 20:08:01 +0000
commit19530b36bfa2ce280b9355d60f94f1110d2e42a8 (patch)
treefd7bf1a2588f45e74c29e469e9c05ec168e37279 /lisp/progmodes/octave-mod.el
parentf5b54e3190f7f88921ed89f072f9d0dcec4769d9 (diff)
(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.
Diffstat (limited to 'lisp/progmodes/octave-mod.el')
-rw-r--r--lisp/progmodes/octave-mod.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 72b605e6d5..dc550a202e 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -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