~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to debian/patches/55emacs.diff

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-11-04 22:26:12 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081104222612-1uwzavuet6ar35fw
Tags: 1:12.b.3-dfsg-4ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  + debian/patches/glibc2.8_compatibility.patch:
    - Fix FTBFS with new glibc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
55emacs.diff by Sergei Golovan <sgolovan@nes.ru>
2
 
 
3
 
Fixes bug with clause arrow syntah highlighting
4
 
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413052).
5
 
 
6
 
Also, fixes (somewhat) $' and $" patterns syntax highlighting.
7
 
 
8
 
Also, adds support of compressed manual pages search.
9
 
 
10
 
--- erlang-12.b.3-dfsg.orig/lib/tools/emacs/erlang.el
11
 
+++ erlang-12.b.3-dfsg/lib/tools/emacs/erlang.el
12
 
@@ -474,7 +474,7 @@
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'.")
15
 
 
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.")
19
 
 
20
 
 (defvar erlang-man-display-function 'erlang-man-display
21
 
@@ -1664,7 +1664,7 @@
22
 
 
23
 
 (defvar erlang-font-lock-keywords-arrow
24
 
   (list
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.")
28
 
 
29
 
 (defvar erlang-font-lock-keywords-lc
30
 
@@ -2014,7 +2014,7 @@
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)
39
 
@@ -2644,7 +2644,7 @@
40
 
 
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)
47
 
               (list 'lambda '()
48
 
@@ -2655,7 +2655,7 @@
49
 
 
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\\)?\\'"))
54
 
 
55
 
 
56
 
 (defun erlang-man-module (&optional module)
57
 
@@ -2675,7 +2675,7 @@
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\\)?$"))
63
 
        (file nil)
64
 
        file-list)
65
 
     (while (and dir-list (null file))
66
 
@@ -2816,7 +2816,7 @@
67
 
     (error nil))
68
 
   (if 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))))
74
 
              (if (fboundp 'setenv)