diff options
| author | Kevin Ryde | 2009-11-25 22:42:11 +0000 |
|---|---|---|
| committer | Kevin Ryde | 2009-11-25 22:42:11 +0000 |
| commit | 002cbde51f9c5f7a9ea39045c272d129c626f8d2 (patch) | |
| tree | 055ccd699cd1b9f7f77104b47473d86c9063ba72 | |
| parent | 1e2d9ba1ea7906796966e365d1925b62c47276b7 (diff) | |
| download | emacs-002cbde51f9c5f7a9ea39045c272d129c626f8d2.tar.gz emacs-002cbde51f9c5f7a9ea39045c272d129c626f8d2.zip | |
* 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.)
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/man.el | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd586757b34..a7a1d93c286 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-11-25 Kevin Ryde <user42@zip.com.au> | ||
| 2 | |||
| 3 | * man.el (Man-completion-table): default-directory "/" in case | ||
| 4 | doesn't otherwise exist. process-environment COLUMNS=999 so as | ||
| 5 | not to truncate long names. process-connection-type pipe to avoid | ||
| 6 | any chance of hitting the pseudo-tty TIOCGWINSZ. (Further to | ||
| 7 | Bug#3717.) | ||
| 8 | |||
| 1 | 2009-11-25 Juri Linkov <juri@jurta.org> | 9 | 2009-11-25 Juri Linkov <juri@jurta.org> |
| 2 | 10 | ||
| 3 | * man.el (Man-completion-table): Modify regexp to include | 11 | * man.el (Man-completion-table): Modify regexp to include |
diff --git a/lisp/man.el b/lisp/man.el index 25ba3eb0638..cbec29f1250 100644 --- a/lisp/man.el +++ b/lisp/man.el | |||
| @@ -761,14 +761,18 @@ POS defaults to `point'." | |||
| 761 | (unless (and Man-completion-cache | 761 | (unless (and Man-completion-cache |
| 762 | (string-prefix-p (car Man-completion-cache) string)) | 762 | (string-prefix-p (car Man-completion-cache) string)) |
| 763 | (with-temp-buffer | 763 | (with-temp-buffer |
| 764 | (setq default-directory "/") ;; in case inherited doesn't exist | ||
| 764 | ;; Actually for my `man' the arg is a regexp. Don't know how | 765 | ;; Actually for my `man' the arg is a regexp. Don't know how |
| 765 | ;; standard that is. Also, it's not clear what kind of | 766 | ;; standard that is. Also, it's not clear what kind of |
| 766 | ;; regexp are accepted: under GNU/Linux it seems it's ERE-style, | 767 | ;; regexp are accepted: under GNU/Linux it seems it's ERE-style, |
| 767 | ;; whereas under MacOSX it seems to be BRE-style and | 768 | ;; whereas under MacOSX it seems to be BRE-style and |
| 768 | ;; doesn't accept backslashes at all. Let's not bother to | 769 | ;; doesn't accept backslashes at all. Let's not bother to |
| 769 | ;; quote anything. | 770 | ;; quote anything. |
| 771 | (let ((process-connection-type nil) ;; pipe | ||
| 772 | (process-environment (copy-sequence process-environment))) | ||
| 773 | (setenv "COLUMNS" "999") ;; don't truncate long names | ||
| 770 | (call-process manual-program nil '(t nil) nil | 774 | (call-process manual-program nil '(t nil) nil |
| 771 | "-k" (concat "^" string)) | 775 | "-k" (concat "^" string))) |
| 772 | (goto-char (point-min)) | 776 | (goto-char (point-min)) |
| 773 | (while (re-search-forward "^[^ \t\n]+\\(?: (.+?)\\)?" nil t) | 777 | (while (re-search-forward "^[^ \t\n]+\\(?: (.+?)\\)?" nil t) |
| 774 | (push (match-string 0) table))) | 778 | (push (match-string 0) table))) |