|
|
| Author |
Message |
< Erlang patches mailing list ~ Support for compressed manpages when looking up documentatio |
| tpatro at gmail.com |
Posted: Thu Mar 03, 2005 8:28 am |
|
|
|
Guest
|
On Debian the Erlang manpages are compressed and are put into a
separate "erl" section like this
/usr/share/man/man3/snmp.3erl.gz
Here's a simple patch which modifies the regexps used for looking up
manpages, so that documentation lookup works with these kind of man
pages too.
I'm not a member of the list, so please CC me if you have a question.
regards,
Tamas
--- /usr/share/emacs/site-lisp/erlang/erlang.el 2004-11-25
05:48:48.000000000 +0100
+++ erlang.el 2005-03-03 09:07:44.000000000 +0100
_at__at_ -2529,7 +2529,7 _at__at_
(defun erlang-man-get-files (dir)
"Return files in directory DIR."
- (directory-files dir t ".*\\.[0-9]\\'"))
+ (directory-files dir t ".*\\.[0-9]\\([a-z]+\\)?\\(\\.gz\\)?\\'"))
(defun erlang-man-module (&optional module)
_at__at_ -2549,7 +2549,7 _at__at_
(if (or (null module) (string= module ""))
(error "No Erlang module name given"))
(let ((dir-list erlang-man-dirs)
- (pat (concat "\\b" (regexp-quote module) "\\.[^.]$"))
+ (pat (concat "\\b" (regexp-quote module)
"\\.[^.]\\([a-z]+\\)?\\(\\.gz\\)?$"))
(file nil)
file-list)
(while (and dir-list (null file))
_at__at_ -2690,7 +2690,7 _at__at_
(error nil))
(if file
(let ((process-environment (copy-sequence process-environment)))
- (if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file)
+ (if (string-match
"\\(.*\\)/man[^/]*/\\([^.]+\\)\\.[^.]\\([a-z]+\\)?\\(\\.gz\\)?$" file)
(let ((dir (substring file (match-beginning 1) (match-end 1)))
(page (substring file (match-beginning 2) (match-end 2))))
(if (fboundp 'setenv)
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|