@section Quitting Info
@kindex q @r{(Info mode)}
-@findex Info-exit
@cindex quitting Info mode
To get out of Info, back to what you were doing before, type @kbd{q}
-for @dfn{Quit}. This runs @code{Info-exit} in Emacs.
+for @dfn{Quit}. This runs @code{quit-window} in Emacs.
This is the end of the basic course on using Info. You have learned
how to move in an Info document, and how to follow menus and cross
(defun info-standalone ()
"Run Emacs as a standalone Info reader.
Usage: emacs -f info-standalone [filename]
-In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
+In standalone mode, \\<Info-mode-map>\\[quit-window] exits Emacs itself."
(setq Info-standalone t)
(if (and command-line-args-left
(not (string-match "^-" (car command-line-args-left))))
(t
(user-error "No pointer backward from this node")))))
-(defun Info-exit ()
- "Exit Info by selecting some other buffer."
- (interactive)
- (if Info-standalone
- (save-buffers-kill-emacs)
- (quit-window)))
+(define-obsolete-function-alias 'Info-exit #'quit-window "27.1")
(defun Info-next-menu-item ()
"Go to the node of the next menu item."
(define-key map "m" 'Info-menu)
(define-key map "n" 'Info-next)
(define-key map "p" 'Info-prev)
- (define-key map "q" 'Info-exit)
+ (define-key map "q" 'quit-window)
(define-key map "r" 'Info-history-forward)
(define-key map "s" 'Info-search)
(define-key map "S" 'Info-search-case-sensitively)
:help "Copy the name of the current node into the kill ring"]
["Clone Info buffer" clone-buffer
:help "Create a twin copy of the current Info buffer."]
- ["Exit" Info-exit :help "Stop reading Info"]))
+ ["Exit" quit-window :help "Stop reading Info"]))
(defvar info-tool-bar-map
:label "Index")
(tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map
:vert-only t)
- (tool-bar-local-item-from-menu 'Info-exit "exit" map Info-mode-map
+ (tool-bar-local-item-from-menu 'quit-window "exit" map Info-mode-map
:vert-only t)
map))
\\<Info-mode-map>\
\\[Info-help] Invoke the Info tutorial.
-\\[Info-exit] Quit Info: reselect previously selected buffer.
+\\[quit-window] Quit Info: reselect previously selected buffer.
Selecting other nodes:
\\[Info-mouse-follow-nearest-node]
(add-hook 'clone-buffer-hook 'Info-clone-buffer nil t)
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
(add-hook 'isearch-mode-hook 'Info-isearch-start nil t)
+ (when Info-standalone
+ (add-hook 'quit-window-hook 'save-buffers-kill-emacs nil t))
(setq-local isearch-search-fun-function #'Info-isearch-search)
(setq-local isearch-wrap-function #'Info-isearch-wrap)
(setq-local isearch-push-state-function #'Info-isearch-push-state)