diff options
author | Richard M. Stallman <rms@gnu.org> | 2006-01-05 16:05:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2006-01-05 16:05:49 +0000 |
commit | b0dd5bf5f42c2f657d0d335028025160286fbae5 (patch) | |
tree | d14f68d69e39c8ceaea54bb68a563b5a43859dac /lisp/info.el | |
parent | bf2c10895e031d1938faa4f541a9c734a65b3ea5 (diff) | |
download | emacs-b0dd5bf5f42c2f657d0d335028025160286fbae5.tar.gz |
(Info-find-node): Don't record previous node if have none.
(info): Go to directory only if history is empty.
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/info.el b/lisp/info.el index e3ca18e0ede..386f549d3e2 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -568,8 +568,10 @@ in all the directories in that path." (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 @@ it says do not attempt further (recursive) error recovery." (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 |