1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 900_gnuplot.el_fix_indentation.dpatch by Vincent Fourmond <fourmond@debian.org>
4
## DP: Fix the indentation of gnuplot-mode
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 @@
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)))))
22
- (if (looking-at (regexp-quote "\\"))
23
- (setq indent (+ plus indent)))))))
27
+ (if (looking-at "\\([^ \t\n]*[ \t]+\\).*\\\\$")
28
+ (setq indent (length (match-string 1)))
33
(if (= (current-indentation) indent)
36
(delete-horizontal-space)
37
- (insert (make-string indent ? ))))
38
- (if (looking-at "[ \t]+$")
40
+ (insert (make-string indent ? )))
44
;; FWIW, here are all the options which can be negated:
45
;; (insert (format "%s"