Here is the program I wrote:Use if and get-buffer to write a function that prints a message telling you whether a buffer exists.
(defun buf-exists (bufpos)
"tests to see if the buffer named bufpos exists"
(interactive)
(save-excursion
(if (get-buffer bufpos))
(message "%s def exists" bufpos)
(message "sorry there is no buffer named %s" bufpos)))
It fails for some reason to bind the named buffer passed as an argument to the variable bufpos. Any Advice?? THanks!