Function: electric-icon-brace
electric-icon-brace is an interactive and byte-compiled function
defined in icon.el.gz.
Signature
(electric-icon-brace ARG)
Documentation
Insert character and correct line's indentation.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/icon.el.gz
(defun electric-icon-brace (arg)
"Insert character and correct line's indentation."
(interactive "P")
(let (insertpos)
(if (and (not arg)
(eolp)
(or (save-excursion
(skip-chars-backward " \t")
(bolp))
(if icon-auto-newline
(progn (icon-indent-line) (newline) t)
nil)))
(progn
(insert last-command-event)
(icon-indent-line)
(when icon-auto-newline
(newline)
;; (newline) may have done auto-fill
(setq insertpos (- (point) 2))
(icon-indent-line))
(save-excursion
(if insertpos (goto-char (1+ insertpos)))
(delete-char -1))))
(if insertpos
(save-excursion
(goto-char insertpos)
(self-insert-command (prefix-numeric-value arg)))
(self-insert-command (prefix-numeric-value arg)))))