emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gnuplot cabfc6c 088/184: fix annoying delay in indentation


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot cabfc6c 088/184: fix annoying delay in indentation with blinking paren mode
Date: Sun, 29 Aug 2021 11:03:21 -0400 (EDT)

branch: elpa/gnuplot
commit cabfc6c7b0d191f158cd2bb82b2ce6a44a38eb5e
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]