diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-12-13 01:35:21 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-12-13 01:35:21 -0500 |
commit | 7ddeecf637983993eda02740660f2e389040571a (patch) | |
tree | 77376c258d464790b5fb153db1593aba49f89c59 /emacsconf-subed.el | |
parent | 40c90430dbedfc3f2d2f4e5ff139ce983e5772bf (diff) | |
download | emacsconf-el-7ddeecf637983993eda02740660f2e389040571a.tar.xz emacsconf-el-7ddeecf637983993eda02740660f2e389040571a.zip |
more extraction
Diffstat (limited to 'emacsconf-subed.el')
-rw-r--r-- | emacsconf-subed.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emacsconf-subed.el b/emacsconf-subed.el index ec02a9d..250f707 100644 --- a/emacsconf-subed.el +++ b/emacsconf-subed.el @@ -68,7 +68,7 @@ TYPE can be 'end if you want the match end instead of the beginning." (let (pos (found (string-match regexp string after)) result) (while (and found (< found before)) (setq result (if (eq type 'end) (match-end 0) (match-beginning 0))) - (if (string-match regexp string (1+ found)) + (if (and (< found (length string)) (string-match regexp string (1+ found))) (setq found (match-end 0)) (setq found nil))) result)) |