diff options
| author | Juanma Barranquero | 2014-02-20 11:33:32 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-02-20 11:33:32 +0100 |
| commit | ee0761cad38d5b4319806b04a9bcb081d0bdd993 (patch) | |
| tree | 850f023a7f8e6e02370cfadacd086aeaee14e0af /lisp | |
| parent | 3242f74a7f49661348ee8f76293ed9d445524c4d (diff) | |
| download | emacs-ee0761cad38d5b4319806b04a9bcb081d0bdd993.tar.gz emacs-ee0761cad38d5b4319806b04a9bcb081d0bdd993.zip | |
lisp/elec-pair.el: Fix bug#16799.
(electric-pair-syntax-info): Do not check syntax
before the start of buffer/region.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/elec-pair.el | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b6b370c452..a3d78dcddad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-02-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * elec-pair.el (electric-pair-syntax-info): Do not check syntax | ||
| 4 | before the start of buffer/region (bug#16799). | ||
| 5 | |||
| 1 | 2014-02-20 Glenn Morris <rgm@gnu.org> | 6 | 2014-02-20 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * isearch.el (search-invisible): Doc fix. | 8 | * isearch.el (search-invisible): Doc fix. |
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index bf02e5fa273..8562801979d 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el | |||
| @@ -215,8 +215,9 @@ COMMAND-EVENT's pair. UNCONDITIONAL indicates the variables | |||
| 215 | `electric-pair-pairs' or `electric-pair-text-pairs' were used to | 215 | `electric-pair-pairs' or `electric-pair-text-pairs' were used to |
| 216 | lookup syntax. STRING-OR-COMMENT-START indicates that point is | 216 | lookup syntax. STRING-OR-COMMENT-START indicates that point is |
| 217 | inside a comment of string." | 217 | inside a comment of string." |
| 218 | (let* ((pre-string-or-comment (nth 8 (save-excursion | 218 | (let* ((pre-string-or-comment (or (bobp) |
| 219 | (syntax-ppss (1- (point)))))) | 219 | (nth 8 (save-excursion |
| 220 | (syntax-ppss (1- (point))))))) | ||
| 220 | (post-string-or-comment (nth 8 (syntax-ppss (point)))) | 221 | (post-string-or-comment (nth 8 (syntax-ppss (point)))) |
| 221 | (string-or-comment (and post-string-or-comment | 222 | (string-or-comment (and post-string-or-comment |
| 222 | pre-string-or-comment)) | 223 | pre-string-or-comment)) |