From: João Távora Date: Sat, 28 Dec 2013 19:26:54 +0000 (+0000) Subject: Fix bug #16272 when inserting newline at point-min in electric-pair-mode. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9d6c46ab556fc08101b51dc11d82e2a1f0a42c4;p=emacs.git Fix bug #16272 when inserting newline at point-min in electric-pair-mode. * elec-pair.el (electric-pair-post-self-insert-function): Don't open extra newlines at beginning of buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3c9356fbd7c..910d35afc4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-28 João Távora + + * elec-pair.el (electric-pair-post-self-insert-function): Don't + open extra newlines at beginning of buffer. (Bug#16272) + 2013-12-28 Eli Zaretskii * frame.el (window-system-for-display): Don't allow to create a diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 1691fbbfec3..729132651db 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -513,7 +513,7 @@ happened." (funcall electric-pair-open-newline-between-pairs) electric-pair-open-newline-between-pairs) (eq last-command-event ?\n) - (not (eobp)) + (< (1+ (point-min)) (point) (point-max)) (eq (save-excursion (skip-chars-backward "\t\s") (char-before (1- (point))))