1
1
Patch by Balint Reczey <balint@balintreczey.hu> fixes backquote
2
2
syntax (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494823).
3
Also, it fixes manpage name regexp matching only 3erl manpages in
4
--- erlang-13.b.3-dfsg.orig/lib/tools/emacs/erlang.el
5
+++ erlang-13.b.3-dfsg/lib/tools/emacs/erlang.el
6
@@ -2367,23 +2367,22 @@
6
--- erlang-14.b.2-dfsg.orig/lib/tools/emacs/erlang.el
7
+++ erlang-14.b.2-dfsg/lib/tools/emacs/erlang.el
9
(defvar erlang-man-dirs
10
'(("Man - Commands" "/man/man1" t)
11
("Man - Modules" "/man/man3" t)
12
- ("Man - Files" "/man/man4" t)
13
- ("Man - Applications" "/man/man6" t))
14
+ ("Man - Files" "/man/man5" t)
15
+ ("Man - Applications" "/man/man7" t))
16
"*The man directories displayed in the Erlang menu.
18
Each item in the list should be a list with three elements, the first
19
@@ -1179,23 +1179,22 @@
7
20
(or (fboundp 'eval-when-compile)
8
21
(defmacro eval-when-compile (&rest rest) nil))
32
45
;; defvar some obsolete variables, which we still support for
33
46
;; backwardscompatibility reasons.
49
(defun erlang-man-make-menu-item (file)
50
"Create a menu item containing the name of the man page."
51
- (and (string-match ".+/\\([^/]+\\)\\.\\([124-9]\\|3\\(erl\\)?\\)\\(\\.gz\\)?$" file)
52
+ (and (string-match ".+/\\([^/]+\\)\\.\\([124-9]\\|3\\(erl\\)\\)\\(\\.gz\\)?$" file)
53
(let ((page (substring file (match-beginning 1) (match-end 1))))
54
(list (capitalize page)
58
(defun erlang-man-get-files (dir)
59
"Return files in directory DIR."
60
- (directory-files dir t ".+\\.\\([124-9]\\|3\\(erl\\)?\\)\\(\\.gz\\)?\\'"))
61
+ (directory-files dir t ".+\\.\\([124-9]\\|3\\(erl\\)\\)\\(\\.gz\\)?\\'"))
64
(defun erlang-man-module (&optional module)
66
(if (or (null module) (string= module ""))
67
(error "No Erlang module name given"))
68
(let ((dir-list erlang-man-dirs)
69
- (pat (concat "/" (regexp-quote module) "\\.\\([124-9]\\|3\\(erl\\)?\\)\\(\\.gz\\)?$"))
70
+ (pat (concat "/" (regexp-quote module) "\\.\\([124-9]\\|3\\(erl\\)\\)\\(\\.gz\\)?$"))
73
(while (and dir-list (null file))
77
(let ((process-environment (copy-sequence process-environment)))
78
- (if (string-match "\\(.*\\)/man[^/]*/\\([^.]+\\)\\.\\([124-9]\\|3\\(erl\\)?\\)\\(\\.gz\\)?$" file)
79
+ (if (string-match "\\(.*\\)/man[^/]*/\\([^.]+\\)\\.\\([124-9]\\|3\\(erl\\)\\)\\(\\.gz\\)?$" file)
80
(let ((dir (substring file (match-beginning 1) (match-end 1)))
81
- (page (substring file (match-beginning 2) (match-end 2))))
82
+ (page (concat (substring file (match-beginning 2) (match-end 2)) "(" (substring file (match-beginning 3) (match-end 3)) ")")))
84
(setenv "MANPATH" dir)