Skip to content

Commit 6051bf1

Browse files
committed
既に tmp という名前のバッファが存在すると、エラーになるバグを修正。
1 parent 9ff8142 commit 6051bf1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scratch-log.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858
(let* ((time (format-time-string "* %Y/%m/%d-%H:%m" (current-time)))
5959
(buf-str (buffer-substring-no-properties (point-min) (point-max)))
6060
(contents (concat "\n" time "\n" buf-str)))
61-
(with-current-buffer (get-buffer-create "tmp")
62-
(erase-buffer)
61+
(with-temp-buffer
6362
(insert contents)
6463
(append-to-file (point-min) (point-max) sl-scratch-log-file))))
6564

0 commit comments

Comments
 (0)