emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116489: lisp/elec-pair.el: Fix bug#16799.


From: Juanma Barranquero
Subject: [Emacs-diffs] trunk r116489: lisp/elec-pair.el: Fix bug#16799.
Date: Thu, 20 Feb 2014 10:33:44 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116489
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16799
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Thu 2014-02-20 11:33:32 +0100
message:
  lisp/elec-pair.el: Fix bug#16799.
  
  (electric-pair-syntax-info): Do not check syntax
  before the start of buffer/region.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/elec-pair.el              elecpair.el-20131227124533-yaq8recs0j0ggt67-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-20 08:14:20 +0000
+++ b/lisp/ChangeLog    2014-02-20 10:33:32 +0000
@@ -1,3 +1,8 @@
+2014-02-20  Juanma Barranquero  <address@hidden>
+
+       * elec-pair.el (electric-pair-syntax-info): Do not check syntax
+       before the start of buffer/region (bug#16799).
+
 2014-02-20  Glenn Morris  <address@hidden>
 
        * isearch.el (search-invisible): Doc fix.

=== modified file 'lisp/elec-pair.el'
--- a/lisp/elec-pair.el 2014-02-03 00:28:57 +0000
+++ b/lisp/elec-pair.el 2014-02-20 10:33:32 +0000
@@ -215,8 +215,9 @@
 `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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]