changeset 67854:eb33196c14d7

(help-insert-string): New function. Save buffer contents in cases where it is impossible to recompute the old contents.
author Nick Roberts <nickrob@snap.net.nz>
date Tue, 27 Dec 2005 21:11:50 +0000
parents b197dff66cd2
children d6290d5c2df4
files lisp/help-mode.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-mode.el	Tue Dec 27 21:10:19 2005 +0000
+++ b/lisp/help-mode.el	Tue Dec 27 21:11:50 2005 +0000
@@ -648,6 +648,15 @@
 		(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)