[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No relative filenames in getting man pages
From: |
Kai Großjohann |
Subject: |
No relative filenames in getting man pages |
Date: |
Wed, 05 Mar 2003 12:04:27 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux) |
I have a function perldoc that looks like this:
(defun perldoc (man-args)
(interactive "sPerldoc: ")
(require 'man)
(let ((manual-program "perldoc"))
(man man-args)))
And perldoc has a -F switch which extracts documentation from a
file.
It doesn't work to say
M-x perldoc RET -F SPC bla RET
where bla is a relative filename, because of some magic in
Man-getpage-in-background. I've tried the following fix:
--- man.el.~1.115.~ Wed Feb 5 20:46:19 2003
+++ man.el Wed Mar 5 12:01:23 2003
@@ -593,7 +593,12 @@
(if default-enable-multibyte-characters
locale-coding-system 'raw-text-unix))
;; Avoid possible error by using a directory that always exists.
- (default-directory "/"))
+ (default-directory
+ (if (and (file-directory-p default-directory)
+ (not (find-file-name-handler default-directory
+ 'file-directory-p)))
+ default-directory
+ "/")))
;; Prevent any attempt to use display terminal fanciness.
(setenv "TERM" "dumb")
;; In Debian Woody, at least, we get overlong lines under X
It seems to work. What do people think?
--
A preposition is not a good thing to end a sentence with.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- No relative filenames in getting man pages,
Kai Großjohann <=