Description: cl-info index search
 Adjust cl-info algorithm to find index
Forwarded: not-needed
Author: Camm Maguire <camm@debian.org>

Index: maxima-5.50.0/src/cl-info.lisp
===================================================================
--- maxima-5.50.0.orig/src/cl-info.lisp
+++ maxima-5.50.0/src/cl-info.lisp
@@ -72,11 +72,13 @@
                        (write-char char out)
                        (setf prev-slash nil))))))))
 
+(defvar maxima::*maxima-index-dir* nil)
+
 (defun load-primary-index ()
   ;; Is with-standard-io-syntax too much for what we want?
   (let*
       ((subdir-bit (or maxima::*maxima-lang-subdir* "."))
-       (path-to-index (maxima::combine-path maxima::*maxima-infodir* subdir-bit "maxima-index.lisp"))
+       (path-to-index (maxima::combine-path (or maxima::*maxima-index-dir* maxima::*maxima-infodir*) subdir-bit "maxima-index.lisp"))
        (path-to-html-index
 	 (maxima::combine-path maxima::*maxima-infodir* subdir-bit "maxima-index-html.lisp")))
     ;; Set the default of the html URL base to be a file URL pointing
@@ -262,7 +264,13 @@
 
 ; --------------- build help topic indices ---------------
 
-(defun load-info-hashtables (dir-name deffn-defvr-pairs section-pairs)
+(defun load-info-hashtables (dir-name deffn-defvr-pairs section-pairs
+			     ;; In Debian, lsp index file must be in different directory from info files
+			     &aux (dir-name
+				   (or (when (equal (pathname (concatenate 'string maxima::*maxima-index-dir* "/"))
+						    dir-name)
+					 (maxima::combine-path maxima::*maxima-infodir* ""))
+				       dir-name)))
   (if (and (zerop (length section-pairs)) 
            (zerop (length deffn-defvr-pairs)))
     (format t (intl:gettext "warning: ignoring an empty documentation index in ~a~%") dir-name)
