emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r116958: Fix bug in Electric Pair mode


From: João Távora
Subject: [Emacs-diffs] emacs-24 r116958: Fix bug in Electric Pair mode
Date: Sun, 13 Apr 2014 10:27:39 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116958
revision-id: address@hidden
parent: address@hidden
committer: João Távora <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-04-13 11:27:32 +0100
message:
  Fix bug in Electric Pair mode
  
  * lisp/elec-pair.el (electric-pair--syntax-ppss): Simplify and fix
  possible bug.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/elec-pair.el              elecpair.el-20131227124533-yaq8recs0j0ggt67-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-13 07:49:23 +0000
+++ b/lisp/ChangeLog    2014-04-13 10:27:32 +0000
@@ -1,3 +1,8 @@
+2014-04-13  João Távora  <address@hidden>
+
+       * elec-pair.el (electric-pair--syntax-ppss): Simplify and fix
+       possible bug.
+
 2014-04-13  Eli Zaretskii  <address@hidden>
 
        * frame.el (blink-cursor-blinks, blink-cursor-blinks-done): Doc fixes.

=== modified file 'lisp/elec-pair.el'
--- a/lisp/elec-pair.el 2014-04-10 19:12:34 +0000
+++ b/lisp/elec-pair.el 2014-04-13 10:27:32 +0000
@@ -226,10 +226,9 @@
 when to fallback to `parse-partial-sexp'."
   (let* ((pos (or pos (point)))
          (where (or where '(string comment)))
-         (quick-ppss (syntax-ppss))
-         (quick-ppss-at-pos (syntax-ppss pos))
-         (in-string (and (nth 3 quick-ppss-at-pos) (memq 'string where)))
-         (in-comment (and (nth 4 quick-ppss-at-pos) (memq 'comment where)))
+         (quick-ppss (syntax-ppss pos))
+         (in-string (and (nth 3 quick-ppss) (memq 'string where)))
+         (in-comment (and (nth 4 quick-ppss) (memq 'comment where)))
          (s-or-c-start (cond (in-string
                               (1+ (nth 8 quick-ppss)))
                              (in-comment
@@ -243,7 +242,7 @@
       ;; HACK! cc-mode apparently has some `syntax-ppss' bugs
       (if (memq major-mode '(c-mode c++ mode))
           (parse-partial-sexp (point-min) pos)
-        quick-ppss-at-pos))))
+        quick-ppss))))
 
 ;; Balancing means controlling pairing and skipping of parentheses
 ;; so that, if possible, the buffer ends up at least as balanced as


reply via email to

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