Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
バッファが空かどうかを確認する方法は? 0 を与えるかどうかをチェックするcount-linesことは、これを殺すのはやり過ぎだと思います。
count-lines
更新: ええ、phils の答えはうまくいくはずです。それを書いてください:
(defun buffer-empty-p (&optional buffer) (= (buffer-size buffer) 0))
buffer-size is a built-in function in `C source code'. (buffer-size &optional BUFFER) Return the number of characters in the current buffer. If BUFFER, return the number of characters in that buffer instead.