summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorKathy Gray2014-09-09 14:21:30 +0100
committerKathy Gray2014-09-09 14:21:30 +0100
commitd7f2ad0285fb20cf7c96cccffafdaa22211239c1 (patch)
tree887d415d0614eecab0c2b0517b630149da4ad68c /editors
parent9760b76fde4184b1ff376b347e09fc936dc9bf59 (diff)
Get more constraints resolving in power.sail
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 "*")