Commit bfaef6dc authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(cookie-snarf): Use match-beginning on the delimiter.

(cookie-delimiter): Handle single-% delimiter.
parent 0775c032
......@@ -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))
(kill-buffer buf)
(message "%s" endmsg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment