]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/info.el: Fix bug#8258.
authorRalph Schleicher <rs@ralph-schleicher.de>
Wed, 16 Mar 2011 00:00:58 +0000 (01:00 +0100)
committerJuanma Barranquero <lekktu@gmail.com>
Wed, 16 Mar 2011 00:00:58 +0000 (01:00 +0100)
* info (info-initialize): Replace all uses of `:' with path-separator for
  compatibility with non-Unix systems.  Cache quoting of path-separator.

lisp/ChangeLog
lisp/info.el

index 29b47595eb608afc77c43877a446bc6dea318200..5bd208ba3c8f579f0a65e35ab6c4fd039a358e6e 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-15  Ralph Schleicher  <rs@ralph-schleicher.de>
+
+       * info.el (info-initialize): Replace all uses of `:' with
+       path-separator for compatibility with non-Unix systems.
+       Cache quoting of path-separator.  (Bug#8258)
+
 2011-03-12  Juanma Barranquero  <lekktu@gmail.com>
 
        * avoid.el (mouse-avoidance-mode, mouse-avoidance-nudge-dist)
index c6e20f827c1cb28ac3aa161b6d28e7beaecf0283..8fd0fc700964eea6a03c8140f3dbba7aaca4975f 100644 (file)
@@ -588,15 +588,15 @@ in `Info-file-supports-index-cookies-list'."
 (defun info-initialize ()
   "Initialize `Info-directory-list', if that hasn't been done yet."
   (unless Info-directory-list
-    (let ((path (getenv "INFOPATH")))
+    (let ((path (getenv "INFOPATH"))
+         (sep (regexp-quote path-separator)))
       (setq Info-directory-list
            (prune-directory-list
             (if path
-                (if (string-match ":\\'" path)
-                    (append (split-string (substring path 0 -1)
-                                          (regexp-quote path-separator))
+                (if (string-match-p (concat sep "\\'") path)
+                    (append (split-string (substring path 0 -1) sep)
                             (Info-default-dirs))
-                  (split-string path (regexp-quote path-separator)))
+                  (split-string path sep))
               (Info-default-dirs)))))))
 
 ;;;###autoload