help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: INFOPATH and emacs


From: Jeremy Gray
Subject: Re: INFOPATH and emacs
Date: Thu, 17 Apr 2003 20:12:24 GMT
User-agent: slrn/0.9.7.4 (Linux)

Jeremy Gray <gray@euthanasia.ath.cx> wrote:  
> Kevin Rodgers <ihs_4664@yahoo.com> wrote:  
>> 
>> So there is a discrepancy between the command line info program and
>> Emacs' M-x info command in how an empty INFOPATH component is
>> interpreted.  I think Emacs should emulate info as closely as
>> possible; if the OP agrees, he should use M-x report-emacs-bug to
>> submit a bug report.
> 
> I think setting the entire path is easier in the long run since it
> works for both info and info-mode.  But, I think this is a easily fixed
> bug.  

This appears to work, at least for me.  

diff -Naur emacs-21.3/lisp/info.el emacs-21.3-jag/lisp/info.el
--- emacs-21.3/lisp/info.el     2001-12-21 13:08:17.000000000 -0600
+++ emacs-21.3-jag/lisp/info.el 2003-04-17 14:08:25.000000000 -0500
@@ -320,7 +320,8 @@
       (insert-file-contents fullname visit))))
 
 (defun info-initialize ()
-  "Initialize `Info-directory-list', if that hasn't been done yet."
+  "Initialize `Info-directory-list', respecting a final colon like
+info standalone, if that hasn't been done yet."
   (unless Info-directory-list
     (let ((path (getenv "INFOPATH"))
          (source (expand-file-name "info/" source-directory))
@@ -341,7 +342,10 @@
       (setq Info-directory-list
            (prune-directory-list
             (if path
-                (split-string path (regexp-quote path-separator))
+                (if (string-match ":$" path)
+                     (append (split-string path (regexp-quote path-separator))
+                             Info-default-directory-list)
+                   (split-string path (regexp-quote path-separator)))
               (if (and sibling (file-exists-p sibling))
                   ;; Uninstalled, Emacs builddir != srcdir.
                   (setq alternative sibling)

-- 
Jeremy A. Gray
gray@metacomet.net

"Remember the Pueblo." -- the Fourth Law of Marvin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]