Function: dictionary-mode

dictionary-mode is an autoloaded and byte-compiled function defined in dictionary.el.gz.

Signature

(dictionary-mode)

Documentation

Mode for searching a dictionary.

This is a mode for searching a dictionary server implementing the protocol defined in RFC 2229.

This is a quick reference to this mode describing the default key bindings:
* q (dictionary-close) close the dictionary buffer
* h (describe-mode) display this help information
* s (dictionary-search) ask for a new word to search
* d (dictionary-lookup-definition) search the word at point
* n (forward-button) or TAB place point to the next link
* p (backward-button) or S-TAB place point to the prev link

* m (dictionary-match-words) ask for a pattern and list all matching words.
* D (dictionary-select-dictionary) select the default dictionary
* M (dictionary-select-strategy) select the default search strategy

* \RET or \<mouse-2> visit that link

Source Code

;; Defined in /usr/src/emacs/lisp/net/dictionary.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Basic function providing startup actions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;###autoload
(defun dictionary-mode ()
  ;; FIXME: Use define-derived-mode.
  "Mode for searching a dictionary.
This is a mode for searching a dictionary server implementing the
protocol defined in RFC 2229.

This is a quick reference to this mode describing the default key bindings:
\\<dictionary-mode-map>
* \\[dictionary-close] close the dictionary buffer
* \\[describe-mode] display this help information
* \\[dictionary-search] ask for a new word to search
* \\[dictionary-lookup-definition] search the word at point
* \\[forward-button] or TAB place point to the next link
* \\[backward-button] or S-TAB place point to the prev link

* \\[dictionary-match-words] ask for a pattern and list all matching words.
* \\[dictionary-select-dictionary] select the default dictionary
* \\[dictionary-select-strategy] select the default search strategy

* \\`RET' or \\`<mouse-2>' visit that link"

  (unless (eq major-mode 'dictionary-mode)
    (cl-incf dictionary-instances))

  (kill-all-local-variables)
  (buffer-disable-undo)
  (use-local-map dictionary-mode-map)
  (setq major-mode 'dictionary-mode)
  (setq mode-name "Dictionary")

  (setq-local dictionary-data-stack nil)
  (setq-local dictionary-position-stack nil)

  (make-local-variable 'dictionary-current-data)
  (make-local-variable 'dictionary-positions)

  (make-local-variable 'dictionary-default-dictionary)
  (make-local-variable 'dictionary-default-strategy)

  (add-hook 'kill-buffer-hook #'dictionary-close t t)
  (run-hooks 'dictionary-mode-hook))