From ee90fe92139cea8ecd5700a0e0099f6e47d38c9f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 27 Dec 2005 21:11:50 +0000 Subject: [PATCH] (help-insert-string): New function. Save buffer contents in cases where it is impossible to recompute the old contents. --- lisp/help-mode.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 9941f0604bd..2e5bbb9315b 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -648,6 +648,15 @@ For the cross-reference format, see `help-make-xrefs'." (fboundp sym) (facep sym)) (help-do-xref pos #'help-xref-interned (list sym)))))) +(defun help-insert-string (string) + "Insert STRING to the help buffer and install xref info for it. +This function can be used to restore the old contents of the help buffer +when going back to the previous topic in the xref stack. It is needed +in case when it is impossible to recompute the old contents of the +help buffer by other means." + (setq help-xref-stack-item (list #'help-insert-string string)) + (with-output-to-temp-buffer (help-buffer) + (insert string))) (provide 'help-mode) -- 2.11.4.GIT