Function: desktop-truncate

desktop-truncate is a byte-compiled function defined in desktop.el.gz.

Signature

(desktop-truncate LIST N)

Documentation

Truncate LIST to at most N elements destructively.

Source Code

;; Defined in /usr/src/emacs/lisp/desktop.el.gz
;; ----------------------------------------------------------------------------
(defun desktop-truncate (list n)
  "Truncate LIST to at most N elements destructively."
  (let ((here (nthcdr (1- n) list)))
    (when (consp here)
      (setcdr here nil))))