From d7f2ad0285fb20cf7c96cccffafdaa22211239c1 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Tue, 9 Sep 2014 14:21:30 +0100 Subject: Get more constraints resolving in power.sail --- editors/sail.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'editors') 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 "*") -- cgit v1.2.3