(electric-pair-syntax-info): Do not check syntax
before the start of buffer/region.
+2014-02-20 Juanma Barranquero <lekktu@gmail.com>
+
+ * elec-pair.el (electric-pair-syntax-info): Do not check syntax
+ before the start of buffer/region (bug#16799).
+
2014-02-20 Glenn Morris <rgm@gnu.org>
* isearch.el (search-invisible): Doc fix.
`electric-pair-pairs' or `electric-pair-text-pairs' were used to
lookup syntax. STRING-OR-COMMENT-START indicates that point is
inside a comment of string."
- (let* ((pre-string-or-comment (nth 8 (save-excursion
- (syntax-ppss (1- (point))))))
+ (let* ((pre-string-or-comment (or (bobp)
+ (nth 8 (save-excursion
+ (syntax-ppss (1- (point)))))))
(post-string-or-comment (nth 8 (syntax-ppss (point))))
(string-or-comment (and post-string-or-comment
pre-string-or-comment))