@kyanny's blog

My life. Opinions are my own.

最後の要素を取り除いたリストを返す butlast

(setq l '(1 2 3 4))
(1 2 3 4)

(last l)
(4)

(butlast l)
(1 2 3)

(butlast l 2)
(1 2)

GNU Emacs Lisp Reference Manual: List Elements