diff options
| author | Glenn Morris | 2007-10-13 20:08:01 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-10-13 20:08:01 +0000 |
| commit | 19530b36bfa2ce280b9355d60f94f1110d2e42a8 (patch) | |
| tree | fd7bf1a2588f45e74c29e469e9c05ec168e37279 | |
| parent | f5b54e3190f7f88921ed89f072f9d0dcec4769d9 (diff) | |
| download | emacs-19530b36bfa2ce280b9355d60f94f1110d2e42a8.tar.gz emacs-19530b36bfa2ce280b9355d60f94f1110d2e42a8.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/octave-mod.el | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4a83eb217cf..3db1727d334 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2007-10-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/octave-mod.el (octave-looking-at-kw): Add doc string. | ||
| 4 | (octave-re-search-forward-kw, octave-re-search-backward-kw): | ||
| 5 | Add doc string, and an explicit COUNT argument. | ||
| 6 | (octave-scan-blocks, octave-beginning-of-defun): Explicitly pass | ||
| 7 | `inc' to search functions. | ||
| 8 | |||
| 1 | 2007-10-13 John W. Eaton <jwe@octave.org> | 9 | 2007-10-13 John W. Eaton <jwe@octave.org> |
| 2 | 10 | ||
| 3 | * progmodes/octave-mod.el (octave-looking-at-kw) | 11 | * progmodes/octave-mod.el (octave-looking-at-kw) |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 72b605e6d59..dc550a202e2 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -599,16 +599,19 @@ to end after the end keyword." | |||
| 599 | (< pos (point))))) | 599 | (< pos (point))))) |
| 600 | 600 | ||
| 601 | (defun octave-looking-at-kw (regexp) | 601 | (defun octave-looking-at-kw (regexp) |
| 602 | "Like `looking-at', but sets `case-fold-search' nil." | ||
| 602 | (let ((case-fold-search nil)) | 603 | (let ((case-fold-search nil)) |
| 603 | (looking-at regexp))) | 604 | (looking-at regexp))) |
| 604 | 605 | ||
| 605 | (defun octave-re-search-forward-kw (regexp) | 606 | (defun octave-re-search-forward-kw (regexp count) |
| 607 | "Like `re-search-forward', but sets `case-fold-search' nil, and moves point." | ||
| 606 | (let ((case-fold-search nil)) | 608 | (let ((case-fold-search nil)) |
| 607 | (re-search-forward regexp nil 'move inc))) | 609 | (re-search-forward regexp nil 'move count))) |
| 608 | 610 | ||
| 609 | (defun octave-re-search-backward-kw (regexp) | 611 | (defun octave-re-search-backward-kw (regexp count) |
| 612 | "Like `re-search-backward', but sets `case-fold-search' nil, and moves point." | ||
| 610 | (let ((case-fold-search nil)) | 613 | (let ((case-fold-search nil)) |
| 611 | (re-search-backward regexp nil 'move inc))) | 614 | (re-search-backward regexp nil 'move count))) |
| 612 | 615 | ||
| 613 | (defun octave-in-defun-p () | 616 | (defun octave-in-defun-p () |
| 614 | "Return t if point is inside an Octave function declaration. | 617 | "Return t if point is inside an Octave function declaration. |
| @@ -884,7 +887,7 @@ an error is signaled." | |||
| 884 | (while (/= count 0) | 887 | (while (/= count 0) |
| 885 | (catch 'foo | 888 | (catch 'foo |
| 886 | (while (or (octave-re-search-forward-kw | 889 | (while (or (octave-re-search-forward-kw |
| 887 | octave-block-begin-or-end-regexp) | 890 | octave-block-begin-or-end-regexp inc) |
| 888 | (if (/= depth 0) | 891 | (if (/= depth 0) |
| 889 | (error "Unbalanced block"))) | 892 | (error "Unbalanced block"))) |
| 890 | (if (octave-not-in-string-or-comment-p) | 893 | (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." | |||
| 1054 | (skip-syntax-forward "w")) | 1057 | (skip-syntax-forward "w")) |
| 1055 | (while (and (/= arg 0) | 1058 | (while (and (/= arg 0) |
| 1056 | (setq found | 1059 | (setq found |
| 1057 | (octave-re-search-backward-kw "\\<function\\>"))) | 1060 | (octave-re-search-backward-kw "\\<function\\>" inc))) |
| 1058 | (if (octave-not-in-string-or-comment-p) | 1061 | (if (octave-not-in-string-or-comment-p) |
| 1059 | (setq arg (- arg inc)))) | 1062 | (setq arg (- arg inc)))) |
| 1060 | (if found | 1063 | (if found |