]> code.delx.au - gnu-emacs/blobdiff - lisp/elec-pair.el
Spelling fixes.
[gnu-emacs] / lisp / elec-pair.el
index 130ce9f4ca21fe86b2193c61785c340502c35e7b..a2d637e2aea000b12656e9e65a0fc3882344c9f2 100644 (file)
@@ -1,6 +1,6 @@
 ;;; elec-pair.el --- Automatic parenthesis pairing  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
 
 ;; Author: João Távora <joaotavora@gmail.com>
 
@@ -92,8 +92,8 @@ closer."
 
 The default values of `electric-pair-inhibit-predicate' and
 `electric-pair-skip-self' check this variable before delegating to other
-predicates reponsible for making decisions on whether to pair/skip some
-characters based on the actual state of the buffer's parenthesis and
+predicates responsible for making decisions on whether to pair/skip some
+characters based on the actual state of the buffer's parentheses and
 quotes."
   :version "24.4"
   :group 'electricity
@@ -138,7 +138,7 @@ return value is considered instead."
   :group 'electricity
   :type '(choice
           (const :tag "Yes, jump over whitespace" t)
-          (const :tag "Yes, and delete whitespace" 'chomp)
+          (const :tag "Yes, and delete whitespace" chomp)
           (const :tag "No, no whitespace skipping" nil)
           function))
 
@@ -169,7 +169,7 @@ be considered.")
 (defun electric-pair-backward-delete-char (n &optional killflag untabify)
   "Delete characters backward, and maybe also two adjacent paired delimiters.
 
-Remaining behaviour is given by `backward-delete-char' or, if UNTABIFY is
+Remaining behavior is given by `backward-delete-char' or, if UNTABIFY is
 non-nil, `backward-delete-char-untabify'."
   (interactive "*p\nP")
   (let* ((prev (char-before))
@@ -191,7 +191,7 @@ non-nil, `backward-delete-char-untabify'."
 (defun electric-pair-backward-delete-char-untabify (n &optional killflag)
   "Delete characters backward, and maybe also two adjacent paired delimiters.
 
-Remaining behaviour is given by `backward-delete-char-untabify'."
+Remaining behavior is given by `backward-delete-char-untabify'."
   (interactive "*p\nP")
   (electric-pair-backward-delete-char n killflag t))
 
@@ -274,17 +274,17 @@ when to fallback to `parse-partial-sexp'."
 ;; doesn't keep `electric-pair-mode' from balancing your ()'s and your
 ;; []'s.
 (defun electric-pair--balance-info (direction string-or-comment)
-  "Examine lists forward or backward according to DIRECTIONS's sign.
+  "Examine lists forward or backward according to DIRECTION's sign.
 
 STRING-OR-COMMENT is info suitable for running `parse-partial-sexp'.
 
-Return a cons of two descritions (MATCHED-P . PAIR) for the
+Return a cons of two descriptions (MATCHED-P . PAIR) for the
 innermost and outermost lists that enclose point. The outermost
 list enclosing point is either the first top-level or first
-mismatched list found by uplisting.
+mismatched list found by listing up.
 
 If the outermost list is matched, don't rely on its PAIR. If
-point is not enclosed by any lists, return ((T) (T))."
+point is not enclosed by any lists, return ((T) (T))."
   (let* (innermost
          outermost
          (table (if string-or-comment
@@ -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))))