diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-02-12 03:10:53 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-02-12 03:10:53 +0000 |
commit | c59b05471804046fdd152a64acc518bd6a18fdbc (patch) | |
tree | c5837d08371d841d5cea3c58ad2573fa92be8b56 | |
parent | c6d0d45e29d74b91e6800f655a4f629639063ccf (diff) | |
download | emacs-c59b05471804046fdd152a64acc518bd6a18fdbc.tar.gz |
(cookie-snarf): Use match-beginning on the delimiter.
(cookie-delimiter): Handle single-% delimiter.
-rw-r--r-- | lisp/play/cookie1.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 3f8087fa2fa..9e8412d17f1 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el @@ -57,7 +57,7 @@ ; Randomize the seed in the random number generator. (random t) -(defconst cookie-delimiter "\n%%\n\\|\0" +(defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0" "Delimiter used to separate cookie file entries.") (defvar cookie-cache (make-vector 511 0) @@ -115,7 +115,7 @@ and subsequent calls on the same file won't go to disk." (while (progn (skip-chars-forward " \t\n\r\f") (not (eobp))) (let ((beg (point))) (re-search-forward cookie-delimiter) - (setq result (cons (buffer-substring beg (1- (point))) + (setq result (cons (buffer-substring beg (match-beginning 0)) result)))) (kill-buffer buf) (message "%s" endmsg) |