~ubuntu-branches/ubuntu/oneiric/gnuplot-mode/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/900_gnuplot.el_fix_indentation.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Fourmond
  • Date: 2011-02-13 01:24:14 UTC
  • Revision ID: james.westby@ubuntu.com-20110213012414-xuoonjyb6s888a3y
Tags: 1:0.6.0-7
* Update to newer location of the homepage
* Switching to 3.0 (quilt)
  - dropping build-dep on dpatch
  - and debian/README.source, now useless
* Switching to dh 7
* Fix links to gnuplot info, thanks to Kevin Ryde <user42@zip.com.au>
  (closes: 602557) -> 901_gnuplot.el.info-look.diff
* Try to apply the suggestion of Kevin Ryde to get rid of the need for
  gnuplot-setup-info-look (closes: 602561) 
  -> 902_automatic_info_look.diff
  (and it seems I even got it right !)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 900_gnuplot.el_fix_indentation.dpatch by Vincent Fourmond <fourmond@debian.org>
3
 
##
4
 
## DP: Fix the indentation of gnuplot-mode
5
 
 
6
 
@DPATCH@
7
 
diff -urNad gnuplot-mode~/gnuplot.el gnuplot-mode/gnuplot.el
8
 
--- gnuplot-mode~/gnuplot.el    2010-02-01 22:31:00.096603264 +0100
9
 
+++ gnuplot-mode/gnuplot.el     2010-02-01 22:31:41.928609093 +0100
10
 
@@ -2051,23 +2051,21 @@
11
 
     (save-excursion
12
 
       (save-excursion
13
 
        (end-of-line 0)
14
 
-       (if (bobp) ()
15
 
-         (re-search-backward "^[ \t]*." (point-min) "to_limit")
16
 
-         (back-to-indentation)
17
 
-         (setq indent (current-column))
18
 
-         (if (looking-at "s?pl\\(o?\\|\\(ot\\)?\\)[ \t]+.?")
19
 
-             (let ((plus (1- (length (match-string 0)))))
20
 
-               (end-of-line)
21
 
-               (backward-char 1)
22
 
-               (if (looking-at (regexp-quote "\\"))
23
 
-                   (setq indent  (+ plus indent)))))))
24
 
+       (if (bobp) 
25
 
+           (set indent 0)
26
 
+         (beginning-of-line)
27
 
+         (if (looking-at "\\([^ \t\n]*[ \t]+\\).*\\\\$")
28
 
+             (setq indent (length (match-string 1)))
29
 
+           (setq indent 0))
30
 
+         )
31
 
+       )
32
 
+      (beginning-of-line)
33
 
       (if (= (current-indentation) indent)
34
 
          ()
35
 
-       (beginning-of-line)
36
 
        (delete-horizontal-space)
37
 
-       (insert (make-string indent ? ))))
38
 
-    (if (looking-at "[ \t]+$")
39
 
-       (end-of-line))))
40
 
+       (insert (make-string indent ? )))
41
 
+      )
42
 
+    ))
43
 
 
44
 
 ;; FWIW, here are all the options which can be negated:
45
 
 ;; (insert (format "%s"