branch: elpa/slime
commit 582682e86db7e2603b1e80abaa2ea06a8703d001
Author: Александар Симић <a...@repl.ist>
Commit: Stas Boukarev <stass...@gmail.com>

    Fix for slime.info path for MELPA package
    
    By default, the function `slime-info' assumes that the location of
    slime.info is to be picked up from a sub-directory where the source
    is. But that doesn't work if the package is packaged & installed via
    MELPA since `slime.info` sits in the top level directory, where `doc'
    directory is omitted.
    
    The fix is to let the user know where to look for slime.info to create
    it, if they are using slime from source. Or to report it upstream, to
    the package manager maintainers, i.e. MELPA.
---
 slime.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/slime.el b/slime.el
index b03396e4130..aa98e85afc2 100644
--- a/slime.el
+++ b/slime.el
@@ -4543,8 +4543,11 @@ With prefix argument include internal symbols."
 (defun slime-info ()
   "Open Slime manual"
   (interactive)
-  (let ((file (expand-file-name "doc/slime.info" slime-path)))
-    (if (file-exists-p file)
+  (let ((file (seq-some (lambda (name)
+                          (let ((f (expand-file-name name slime-path)))
+                            (and (file-exists-p f) f)))
+                        '("doc/slime.info" "slime.info"))))
+    (if file
         (info file)
       (message "No slime.info, run `make slime.info' in %s"
                (expand-file-name "doc/" slime-path)))))

Reply via email to