From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mohammed Sadik Newsgroups: gmane.emacs.bugs Subject: bug#23298: 25.0.92; electric-pair-delete-pair doesn't check if parens are balanced Date: Sat, 16 Apr 2016 07:08:50 +0530 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1460770832 18266 80.91.229.3 (16 Apr 2016 01:40:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2016 01:40:32 +0000 (UTC) To: 23298@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 03:40:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1arFDZ-00057B-2y for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Apr 2016 03:40:13 +0200 Original-Received: from localhost ([::1]:45869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFDY-0000Zc-GE for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2016 21:40:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFDT-0000Sa-Oa for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:40:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arFDO-0002Do-OB for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:40:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFDO-0002Dk-LI for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1arFDO-0002Gc-Ew for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mohammed Sadik Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Apr 2016 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23298 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14607707478640 (code B ref -1); Sat, 16 Apr 2016 01:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Apr 2016 01:39:07 +0000 Original-Received: from localhost ([127.0.0.1]:36976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arFCV-0002FH-6x for submit@debbugs.gnu.org; Fri, 15 Apr 2016 21:39:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arFCT-0002Eo-G4 for submit@debbugs.gnu.org; Fri, 15 Apr 2016 21:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arFCN-0002A3-Ey for submit@debbugs.gnu.org; Fri, 15 Apr 2016 21:39:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFCN-00029z-BU for submit@debbugs.gnu.org; Fri, 15 Apr 2016 21:38:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFCM-0006rF-60 for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:38:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arFCH-00029U-7A for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:38:58 -0400 Original-Received: from md-77.webhostbox.net ([199.79.62.63]:42574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arFCH-00029P-2P for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2016 21:38:53 -0400 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:36970) by md-77.webhostbox.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1arFCF-000t2k-4Q for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2016 01:38:51 +0000 Original-Received: by mail-wm0-f48.google.com with SMTP id n3so53950133wmn.0 for ; Fri, 15 Apr 2016 18:38:51 -0700 (PDT) X-Gm-Message-State: AOPr4FVeXjSxXmUaFQyBurAuLifEn0c9AkFi2nj0rD8+NFyzH5sH/YHkJ/PCpUCF+7II+X1GxPoeyESJg/OPaQ== X-Received: by 10.194.6.36 with SMTP id x4mr24474433wjx.122.1460770730384; Fri, 15 Apr 2016 18:38:50 -0700 (PDT) Original-Received: by 10.194.74.227 with HTTP; Fri, 15 Apr 2016 18:38:50 -0700 (PDT) X-Gmail-Original-Message-ID: X-Authenticated_sender: sadiq@sadiqpk.org X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - md-77.webhostbox.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sadiqpk.org X-Get-Message-Sender-Via: md-77.webhostbox.net: authenticated_id: sadiq@sadiqpk.org X-Authenticated-Sender: md-77.webhostbox.net: sadiq@sadiqpk.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116513 Archived-At: When pressing Backspace key, with electric-pair-mode enabled, it unconditionally deletes the following char, if its the matching pair. Ideally, it may better check if it breaks the equilibrium of braces/quotes. Eg: code: (char-before (point)) |_ point location If my point (cursor) is just before the last paren (the cursor is blinking on the last paren), and I press backspace until the beginning of "point"[0], and then one char back[1], it just deletes the bracket, without checking if the parens are balanced. code: [0] (char-before () |_point location [1] (char-before |_ point location This could be the case of quotes, braces, etc. In GNU Emacs 25.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-04-13 built on fedora.localdomain Windowing system distributor 'Fedora Project', version 11.0.11800000 Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: en_IN.UTF-8 value of $LC_NUMERIC: en_IN.UTF-8 value of $LC_TIME: en_IN.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: electric-pair-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit Electric-Pair mode enabled 41 (#o51, #x29, ?\)) Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils cus-start cus-load elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 93411 4512) (symbols 48 20513 0) (miscs 40 79 146) (strings 32 15817 4612) (string-bytes 1 434978) (vectors 16 11738) (vector-slots 8 421568 5007) (floats 8 166 249) (intervals 56 218 10) (buffers 976 12) (heap 1024 46579 1042))