]> code.delx.au - gnu-emacs/commitdiff
* man.el (Man-completion-table): default-directory "/" in case
authorKevin Ryde <user42@zip.com.au>
Wed, 25 Nov 2009 22:42:11 +0000 (22:42 +0000)
committerKevin Ryde <user42@zip.com.au>
Wed, 25 Nov 2009 22:42:11 +0000 (22:42 +0000)
doesn't otherwise exist.  process-environment COLUMNS=999 so as
not to truncate long names.  process-connection-type pipe to avoid
any chance of hitting the pseudo-tty TIOCGWINSZ.  (Further to
Bug#3717.)

lisp/ChangeLog
lisp/man.el

index fd586757b34863be871db0a52922b98f25662660..a7a1d93c286344a5153e12cf9a31dd68d206a8cb 100644 (file)
@@ -1,3 +1,11 @@
+2009-11-25  Kevin Ryde  <user42@zip.com.au>
+
+       * man.el (Man-completion-table): default-directory "/" in case
+       doesn't otherwise exist.  process-environment COLUMNS=999 so as
+       not to truncate long names.  process-connection-type pipe to avoid
+       any chance of hitting the pseudo-tty TIOCGWINSZ.  (Further to
+       Bug#3717.)
+
 2009-11-25  Juri Linkov  <juri@jurta.org>
 
        * man.el (Man-completion-table): Modify regexp to include
index 25ba3eb0638c8606c14830616f2f0f3294fc0a90..cbec29f125014e085f9f19a8d808acb04f8a4b5b 100644 (file)
@@ -761,14 +761,18 @@ POS defaults to `point'."
       (unless (and Man-completion-cache
                    (string-prefix-p (car Man-completion-cache) string))
       (with-temp-buffer
+       (setq default-directory "/") ;; in case inherited doesn't exist
         ;; Actually for my `man' the arg is a regexp.  Don't know how
         ;; standard that is.  Also, it's not clear what kind of
         ;; regexp are accepted: under GNU/Linux it seems it's ERE-style,
         ;; whereas under MacOSX it seems to be BRE-style and
         ;; doesn't accept backslashes at all.  Let's not bother to
         ;; quote anything.
+       (let ((process-connection-type nil) ;; pipe
+             (process-environment (copy-sequence process-environment)))
+         (setenv "COLUMNS" "999") ;; don't truncate long names
           (call-process manual-program nil '(t nil) nil
-                        "-k" (concat "^" string))
+                        "-k" (concat "^" string)))
         (goto-char (point-min))
         (while (re-search-forward "^[^ \t\n]+\\(?: (.+?)\\)?" nil t)
           (push (match-string 0) table)))