0

I have the code below:

(defun double-print ()
  (print "First text")
  (print "An other text"))

Why is only An other text displayed when I call double-print function ?

NickD
  • 29,717
  • 3
  • 27
  • 44
element
  • 47
  • 5

1 Answers1

2

By default, print prints to the echo area where you are likely to see the last thing printed only. However, the output also goes to the *Messages*buffer (do C-h e to get there fast) where you will see

"First text"

"An other text"

"An other text"

This is the output of your print expressions followed by the return value of your function (which is the value of the last expression executed and thus "An other text" again).

Fran Burstall
  • 3,855
  • 11
  • 18