(defun xe/count-buffers (&optional display-anyway) "Display or return the number of buffers." (interactive) (let ((buf-count (length (buffer-list)))) (if (or (interactive-p) display-anyway) (message "%d buffers in this Emacs" buf-count)) buf-count)) (provide 'xe-tools)