(scan-error nil))
(when (< fill-column (current-column))
(backward-sexp)
- (delete-horizontal-space)
- (insert "\n"))
- (indent-according-to-mode)
+ (if (equal (point) (save-excursion (back-to-indentation) (point)))
+ ;; First expression in this line, a newline won't help.
+ ;; Give up and move back forward.
+ (forward-sexp)
+ ;; Break line.
+ (delete-horizontal-space)
+ (insert "\n")))
(delete-horizontal-space)
(cond
((eq (char-after) ?\;)
(t (insert " "))))
(delete-all-space)
(when (eq (char-after) ?\;)
- (comment-indent))))
+ (comment-indent))
+ (indent-region (car (reverse (nth 9 (syntax-ppss))))
+ (progn (up-list) (point)))))
(defun lisp-slurp-forward (n)
(interactive "p")