From 6aeafb34372289081799c952bad2b80f19736be3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 5 Sep 2010 00:54:58 +0200 Subject: [PATCH] * lisp/electric.el (electric-indent-post-self-insert-function): Don't reindent with a sloppy indentation function. --- lisp/ChangeLog | 5 ++++- lisp/electric.el | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 020f3237e33..988a584599e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-04 Stefan Monnier + * electric.el (electric-indent-post-self-insert-function): + Don't reindent with a sloppy indentation function. + * emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch border case in change-log-mode. @@ -12,7 +15,7 @@ 2010-09-04 Stefan Monnier - Avoid global recursive calls to kill-buffer-hooks, and fit into 80 cols. + Avoid global recursive calls to kill-buffer-hooks; fit into 80 cols. * textmodes/ispell.el (ispell-process-buffer-name): Remove. (ispell-start-process): Avoid setq and simplify logic. (ispell-init-process): Setup kill-buffer-hook locally when needed. diff --git a/lisp/electric.el b/lisp/electric.el index 48d865d8957..8e9d23be231 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -198,6 +198,10 @@ ;; For newline, we want to reindent both lines and basically behave like ;; reindent-then-newline-and-indent (whose code we hence copied). (when (and (eq last-command-event ?\n) + ;; Don't reindent the previous line if the indentation function + ;; is not a real one. + (not (memq indent-line-function + '(indent-relative indent-relative-maybe))) ;; Sanity check. (eq (char-before) last-command-event)) (let ((pos (copy-marker (1- (point)) t))) -- 2.11.4.GIT