Mercurial > emacs
changeset 68045:84897e4dbe0c
(Info-find-node): Don't record previous node if have none.
(info): Go to directory only if history is empty.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 05 Jan 2006 16:05:49 +0000 |
parents | 39029da4541b |
children | 16fcb8fc6930 |
files | lisp/info.el |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Thu Jan 05 16:00:09 2006 +0000 +++ b/lisp/info.el Thu Jan 05 16:05:49 2006 +0000 @@ -568,8 +568,10 @@ (if (and (stringp file-or-node) (string-match "(.*)" file-or-node)) file-or-node (concat "(" file-or-node ")"))) - (if (zerop (buffer-size)) - (Info-directory)))) + (if (and (zerop (buffer-size)) + (null Info-history)) + ;; If we just created the Info buffer, go to the directory. + (Info-directory)))) ;;;###autoload (defun info-emacs-manual () @@ -688,11 +690,12 @@ (setq filename (Info-find-file filename)) ;; Go into Info buffer. (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) - ;; Record the node we are leaving. - (if (not no-going-back) - (setq Info-history - (cons (list Info-current-file Info-current-node (point)) - Info-history))) + ;; Record the node we are leaving, if we were in one. + (and (not no-going-back) + Info-current-file + (setq Info-history + (cons (list Info-current-file Info-current-node (point)) + Info-history))) (Info-find-node-2 filename nodename no-going-back)) ;;;###autoload