I am using \n
so that when printing the list, each element in the list gets a new line when calling message. I am trying to have a go at printing a list where each element does not have a \n
at the end. What commands would achieve printing each element in the list in a separate line?
(defvar hcom '("basic\n"))
(push "+ inix-frame\n" hcom)
(push "+ modust-launch\n" hcom)
(push "+ automode + speedbar\n" hcom)
(push "+ modelin + txscale\n" hcom)
(message "%s" (mapconcat #'identity (reverse hcom)))
Had a go with the following, but this makes an extra empty line between list elements.
(setq animals '(giraffe gazelle lion tiger))
(defun print-elements-of-list (list)
"Print each element of LIST on a line of its own."
(interactive)
(while list
(print (car list))
(setq list (cdr list))))
(print-elements-of-list animals)