summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/sail.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/editors/sail.el b/editors/sail.el
index a9963558..da13c695 100644
--- a/editors/sail.el
+++ b/editors/sail.el
@@ -1694,6 +1694,22 @@ reindent the line."
(and electric
(indent-according-to-mode))))
+(defun sail-electric-lt ()
+ "If inserting a > operator or a comment-end at beginning of line,
+reindent the line."
+ (interactive "*")
+ (let ((electric (and sail-electric-indent
+ (or (sail-in-indentation-p)
+ (char-equal ?* (preceding-char)))
+ (not (sail-in-literal-p))
+ (or (not (sail-in-comment-p))
+ (save-excursion
+ (back-to-indentation)
+ (looking-at "\\*"))))))
+ (self-insert-command 1)
+ (and electric
+ (indent-according-to-mode))))
+
(defun sail-electric-rc ()
"If inserting a } operator at beginning of line, reindent the line."
(interactive "*")