branch: elpa/gnuplot
commit cabfc6c7b0d191f158cd2bb82b2ce6a44a38eb5e
Author: joddie <[email protected]>
Commit: joddie <[email protected]>
fix annoying delay in indentation with blinking paren mode
---
gnuplot.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index cdfcc2a..f7c99f0 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -2606,10 +2606,15 @@ Add additional indentation for continuation lines."
(let ((point-at-indent (+ (point-at-bol) indent)))
(when (< (point) point-at-indent) (goto-char point-at-indent)))))
+;; Adjust indentation on inserting a close brace
+;; The blink-paren fix is stolen from cc-mode
(defun gnuplot-electric-insert (arg)
(interactive "*p")
- (self-insert-command arg)
- (gnuplot-indent-line))
+ (let ((old-blink-paren blink-paren-function)
+ (blink-paren-function nil))
+ (self-insert-command arg)
+ (gnuplot-indent-line)
+ (when old-blink-paren (funcall old-blink-paren))))
;;
;; Functions for finding the start and end of continuation blocks