Function: rst-toc-mode-return

rst-toc-mode-return is an interactive and byte-compiled function defined in rst.el.gz.

Signature

(rst-toc-mode-return KILL)

Documentation

Leave the current TOC buffer and return to the previous environment.

With prefix argument KILL non-nil, kill the buffer instead of burying it.

Key Bindings

Aliases

rst-toc-quit-window (obsolete since 29.1)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defun rst-toc-mode-return (kill)
  ;; testcover: ok.
  "Leave the current TOC buffer and return to the previous environment.
With prefix argument KILL non-nil, kill the buffer instead of
burying it."
  (interactive "P")
  (unless rst-toc-mode-return-wincfg
    (error "Not in a `toc-mode' buffer"))
  (cl-destructuring-bind
      (wincfg pos
       &aux (toc-buf (current-buffer)))
      rst-toc-mode-return-wincfg
    (set-window-configuration wincfg)
    (goto-char pos)
    (if kill
	(kill-buffer toc-buf)
      (bury-buffer toc-buf))))