From xemacs-m  Tue Aug 12 19:55:40 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA06716
	for <xemacs-beta@xemacs.org>; Tue, 12 Aug 1997 19:55:38 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.6/8.8.6/Debian/GNU) id RAA10866;
	Tue, 12 Aug 1997 17:55:53 -0700
To: XEmacs Beta <xemacs-beta@xemacs.org>
Subject: [patch] `info.el': reverse `Info-default-directory-list'...
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Tue_Aug_12_17:55:53_1997-1"
Content-Transfer-Encoding: 7bit
From: karlheg@inetarena.com (Karl M. Hegbloom)
Date: 12 Aug 1997 17:55:53 -0700
Message-ID: <87u3guyk86.fsf@bittersweet.inetarena.com>
Lines: 81
X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta17) - "Bucharest"

--Multipart_Tue_Aug_12_17:55:53_1997-1
Content-Type: text/plain; charset=US-ASCII

 You can specify the directories in `Info-default-directory-list' in
natural order now, and underline your "Local" topic heading if you like.

1997-08-12  Karl M. Hegbloom  <karlheg@inetarena.com>

	* packages/info.el (Info-directory-list): reverse the
 	`Info-default-directory-list' when using it to initialize the
 	`Info-directory-list'.
	(Info-insert-dir): make it so the insertion of a locadir file at a
 	"^[ \t]*Local.*\n[ \t]*[-=]+" line works correctly.


--Multipart_Tue_Aug_12_17:55:53_1997-1
Content-Type: text/plain; charset=US-ASCII

Index: lisp/packages/info.el
===================================================================
RCS file: /usr/local/cvsroot/xemacs-20/lisp/packages/info.el,v
retrieving revision 1.1.1.2.2.12
diff -u -r1.1.1.2.2.12 info.el
--- info.el	1997/08/13 00:21:29	1.1.1.2.2.12
+++ info.el	1997/08/13 00:55:09
@@ -370,7 +370,9 @@
 (defcustom Info-default-directory-list nil
   "*List of default directories to search for Info documentation
 files.  This value is used as the default for `Info-directory-list'.
-It is set in startup.el."
+It is set in startup.el.  The first directory in this list must
+contain a `dir' file that will become the basis for the toplevel Info
+directory."
   :type '(repeat directory)
   :group 'info)
 
@@ -393,7 +395,7 @@
 		  path (substring path (min (1+ idx)
 					    (length path)))))
 	  (nreverse list))
-      Info-default-directory-list))
+      (reverse Info-default-directory-list)))
   "List of directories to search for Info documentation files.
 Default is to use the environment variable INFOPATH if it exists,
 else to use Info-default-directory-list.")
@@ -812,13 +814,21 @@
 		(cond
 		 ((re-search-backward "^ *\\* *Locals *: *\n" nil t)
 		  (delete-region (match-beginning 0) (match-end 0)))
-		 ((re-search-backward "^Local" nil t)
-		  (end-of-line))
+		 ((re-search-backward "^[ \t]*Local" nil t)
+		  ;; This is for people who underline topic headings with
+		  ;; equal signs or dashes.
+		  (when (save-excursion
+			  (forward-line 1)
+			  (beginning-of-line)
+			  (looking-at "^[ \t]*[-=]+"))
+		    (forward-line 1))
+		  (forward-line 1)
+		  (beginning-of-line))
 		 (t (search-backward "\^L" nil t)))
 		;; Insert menu part of the file
 		(let* ((pt (point))
 		       (len (length (buffer-string nil nil other))))
-		  (insert "\n" (buffer-string nil nil other))
+		  (insert (buffer-string nil nil other))
 		  (goto-char (+ pt len))
 		  (save-excursion
 		    (goto-char pt)


--Multipart_Tue_Aug_12_17:55:53_1997-1
Content-Type: text/plain; charset=US-ASCII

mailto:karlheg+sig@inetarena.com (Karl M. Hegbloom)
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.3  Linux 2.0.30+parport AMD K5 PR-133

--Multipart_Tue_Aug_12_17:55:53_1997-1--

