branch: elpa/inf-ruby
commit 524a86c90b8ef97683f8efa5f6095ee25268d2b2
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    Set PAGER locally unless it's set, fixes #33
    
    Also related to dgutov/robe#9
---
 inf-ruby.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 3fb3d2371d..dbbfc06fc4 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -272,7 +272,11 @@ of `ruby-program-name').  Runs the hooks 
`inferior-ruby-mode-hook'
   (setq name (or name "ruby"))
 
   (if (not (comint-check-proc inf-ruby-buffer))
-      (let ((commandlist (split-string-and-unquote command)))
+      (let ((commandlist (split-string-and-unquote command))
+            (process-environment process-environment))
+        ;; http://debbugs.gnu.org/15775
+        (unless (getenv "PAGER")
+          (setenv "PAGER" (executable-find "cat")))
         (set-buffer (apply 'make-comint name (car commandlist)
                            nil (cdr commandlist)))
         (inf-ruby-mode)))

Reply via email to