Function: dictionary-close

dictionary-close is an interactive and byte-compiled function defined in dictionary.el.gz.

Signature

(dictionary-close &rest IGNORED)

Documentation

Close the current dictionary buffer and its connection.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/dictionary.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Dealing with closing the buffer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun dictionary-close (&rest _ignored)
  "Close the current dictionary buffer and its connection."
  (interactive)
  (when (derived-mode-p 'dictionary-mode)
    (setq major-mode nil)
    (if (<= (length (match-buffers '(derived-mode . dictionary-mode))) 0)
        (dictionary-connection-close dictionary-connection))
    (let ((configuration dictionary-window-configuration)
          (selected-window dictionary-selected-window))
      (kill-buffer (current-buffer))
      (set-window-configuration configuration)
      (select-window selected-window))))