]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #16272 when inserting newline at point-min in electric-pair-mode.
authorJoão Távora <joaotavora@gmail.com>
Sat, 28 Dec 2013 19:26:54 +0000 (19:26 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sat, 28 Dec 2013 19:26:54 +0000 (19:26 +0000)
* elec-pair.el (electric-pair-post-self-insert-function): Don't
open extra newlines at beginning of buffer.

lisp/ChangeLog
lisp/elec-pair.el

index 3c9356fbd7cbf41a504dde6fe6a1118742ef928c..910d35afc4b0d24f75c0200bd891070426194dde 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-28  João Távora  <joaotavora@gmail.com>
+
+       * 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  <eliz@gnu.org>
 
        * frame.el (window-system-for-display): Don't allow to create a
index 1691fbbfec3e52bd1eb78916dc2918f68603b0d3..729132651db29b81fa13c1109fb04aa8476cff43 100644 (file)
@@ -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))))