Commit ee0761ca authored by Juanma Barranquero's avatar Juanma Barranquero

lisp/elec-pair.el: Fix bug#16799.

(electric-pair-syntax-info): Do not check syntax
before the start of buffer/region.
parent 3242f74a
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.
......
......@@ -215,8 +215,9 @@ COMMAND-EVENT's pair. UNCONDITIONAL indicates the variables
`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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment