Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bfaef6dc
Commit
bfaef6dc
authored
Feb 12, 1998
by
Richard M. Stallman
Browse files
(cookie-snarf): Use match-beginning on the delimiter.
(cookie-delimiter): Handle single-% delimiter.
parent
0775c032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lisp/play/cookie1.el
lisp/play/cookie1.el
+2
-2
No files found.
lisp/play/cookie1.el
View file @
bfaef6dc
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment