Skip to content

Instantly share code, notes, and snippets.

@jmercouris
Created November 25, 2017 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmercouris/998d78521739fc5c356d917b5d541901 to your computer and use it in GitHub Desktop.
Save jmercouris/998d78521739fc5c356d917b5d541901 to your computer and use it in GitHub Desktop.
(defun delete-active-buffer ()
(when (> (length *buffers*) 1)
(let ((former-active-buffer *active-buffer*))
;; switch-buffer-next changes value of *active-buffer*
;; which in turn changes the value of former-active-buffer
(switch-buffer-next)
;; therefore delete actually deletes the new *active-buffer*
(delete former-active-buffer *buffers*)
(interface:delete-view (view former-active-buffer)))))
;Compiler warnings for "/Users/jmercouris/Projects/Next/next/source/buffer.lisp" :
; In DELETE-ACTIVE-BUFFER: Function result ignored in call to DELETE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment