Function: electric-help-mode

electric-help-mode is a byte-compiled function defined in ehelp.el.gz.

Signature

(electric-help-mode)

Documentation

with-electric-help temporarily places its buffer in this mode.

(On exit from with-electric-help, the original major-mode is restored.)

Source Code

;; Defined in /usr/src/emacs/lisp/ehelp.el.gz
(defun electric-help-mode ()
  "`with-electric-help' temporarily places its buffer in this mode.
\(On exit from `with-electric-help', the original `major-mode' is restored.)"
  (setq buffer-read-only t)
  (setq electric-help-orig-major-mode major-mode)
  (setq mode-name "Help")
  (setq major-mode 'help-mode)
  (setq mode-line-buffer-identification '(" Help:  %b"))
  (use-local-map electric-help-map)
  (add-hook 'mouse-leave-buffer-hook 'electric-help-retain)
  (view-mode -1)
  ;; this is done below in with-electric-help
  ;(run-hooks 'electric-help-mode-hook)
  )