1
55emacs.diff by Sergei Golovan <sgolovan@nes.ru>
3
Fixes bug with clause arrow syntah highlighting
4
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413052).
6
Also, fixes (somewhat) $' and $" patterns syntax highlighting.
8
Also, adds support of compressed manual pages search.
10
--- erlang-12.b.3-dfsg.orig/lib/tools/emacs/erlang.el
11
+++ erlang-12.b.3-dfsg/lib/tools/emacs/erlang.el
13
Should the flag the nil, the directory is absolute, should it be non-nil
14
the directory is relative to the variable `erlang-root-dir'.")
16
-(defvar erlang-man-max-menu-size 20
17
+(defvar erlang-man-max-menu-size 35
18
"*The maximum number of menu items in one menu allowed.")
20
(defvar erlang-man-display-function 'erlang-man-display
23
(defvar erlang-font-lock-keywords-arrow
25
- (list "\\(->\\|:-\\)\\(\\s \\|$\\)" 2 'font-lock-function-name-face))
26
+ (list "\\(->\\|:-\\)\\(\\s \\|$\\)" 1 'font-lock-function-name-face))
27
"Font lock keyword highlighting clause arrow.")
29
(defvar erlang-font-lock-keywords-lc
31
(modify-syntax-entry ?\n ">" table)
32
(modify-syntax-entry ?\" "\"" table)
33
(modify-syntax-entry ?# "." table)
34
- (modify-syntax-entry ?$ "'" table)
35
+ (modify-syntax-entry ?$ "/" table)
36
(modify-syntax-entry ?% "<" table)
37
(modify-syntax-entry ?& "." table)
38
(modify-syntax-entry ?\' "\"" table)
41
(defun erlang-man-make-menu-item (file)
42
"Create a menu item containing the name of the man page."
43
- (and (string-match ".*/\\([^/]+\\)\\.[^.]$" file)
44
+ (and (string-match ".*/\\([^/]+\\)\\.\\([124-9]\\|3erl\\)?\\(\\.gz\\)?$" file)
45
(let ((page (substring file (match-beginning 1) (match-end 1))))
46
(list (capitalize page)
50
(defun erlang-man-get-files (dir)
51
"Return files in directory DIR."
52
- (directory-files dir t ".*\\.[0-9]\\'"))
53
+ (directory-files dir t ".*\\.\\([124-9]\\|3erl\\)?\\(\\.gz\\)?\\'"))
56
(defun erlang-man-module (&optional module)
58
(if (or (null module) (string= module ""))
59
(error "No Erlang module name given"))
60
(let ((dir-list erlang-man-dirs)
61
- (pat (concat "/" (regexp-quote module) "\\.[^.]$"))
62
+ (pat (concat "/" (regexp-quote module) "\\.\\([124-9]\\|3erl\\)?\\(\\.gz\\)?$"))
65
(while (and dir-list (null file))
69
(let ((process-environment (copy-sequence process-environment)))
70
- (if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file)
71
+ (if (string-match "\\(.*\\)/man[^/]*/\\([^.]+\\)\\.\\([124-9]\\|3erl\\)?\\(\\.gz\\)?$" file)
72
(let ((dir (substring file (match-beginning 1) (match-end 1)))
73
(page (substring file (match-beginning 2) (match-end 2))))