From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Date: Wed, 23 Sep 2020 11:17:35 +0200 Message-ID: References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87k0wri5xq.fsf@gnus.org> <87imcbds81.fsf@gnus.org> <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> <874kntsvm7.fsf@gnus.org> <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> <87tuvsjkax.fsf@gnus.org> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22154"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43489@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 23 11:34:52 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL1Aq-0005h6-7Z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Sep 2020 11:34:52 +0200 Original-Received: from localhost ([::1]:34096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL1Ap-0004bP-9T for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Sep 2020 05:34:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL0uZ-0001tR-PC for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 05:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kL0uY-0003JJ-BJ for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 05:18:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kL0uY-0000hj-7V for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 05:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Sep 2020 09:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43489-submit@debbugs.gnu.org id=B43489.16008526702673 (code B ref 43489); Wed, 23 Sep 2020 09:18:02 +0000 Original-Received: (at 43489) by debbugs.gnu.org; 23 Sep 2020 09:17:50 +0000 Original-Received: from localhost ([127.0.0.1]:34536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL0uF-0000gl-DD for submit@debbugs.gnu.org; Wed, 23 Sep 2020 05:17:50 -0400 Original-Received: from mail153c50.megamailservers.eu ([91.136.10.163]:41238 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL0uC-0000gT-7i for 43489@debbugs.gnu.org; Wed, 23 Sep 2020 05:17:41 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1600852658; bh=YiFO0dVARZPPz02fju1+c+utr6tF7L9kqCJB0R4LjH4=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=HqhJPu8GVktYghFyGXxOqIfgSwNnYIuTX1qBtSQVEBWOHNTsScy6KGEoASs8TIHXQ CspfcBaRzITMxfeqn74dmS6kPjYP9Xwhy9yeKAr04mJ+o4xcRgsFmYiizYUBFd4Iau y7SOhi206yzLGHCA9d43NDxKBrNXi89NK08QY9k0= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 08N9Hang021218; Wed, 23 Sep 2020 09:17:37 +0000 In-Reply-To: <87d02dj312.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1C.5F6B12B2.003E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=NoevjPVJ c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=JRwuhjd_G1tPwf8hF14A:9 a=CjuIK1q_8ugA:10 a=UhrNgycqYWA2tRdLRY8A:9 a=B2y7HmGcmWMA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188769 Archived-At: --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 22 sep. 2020 kl. 16.32 skrev Lars Ingebrigtsen : > Yeah, that makes sense to me. Apologies for my indecision, but I'm not sure if they make sense to me. But my personal flaws should not impede progress. How about I push what = I've got (latest patch attached for reference) since we seem to agree = that it's an improvement over what's in master, and if then you or = anyone else want to further adjust the messages then I have no = objections. --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4 Content-Disposition: attachment; filename=0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Don-t-signal-scan-error-when-moving-by-sexp-interact.patch" Content-Transfer-Encoding: quoted-printable =46rom=203249aeba659d636d6344a7ab0e3b1ecbb83da160=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2018=20Sep=202020=2012:49:33=20+0200=0A= Subject:=20[PATCH]=20Don't=20signal=20scan-error=20when=20moving=20by=20= sexp=20interactively=0A=0A*=20lisp/emacs-lisp/lisp.el=20(forward-sexp,=20= backward-sexp,=20forward-list)=0A(backward-list,=20down-list,=20up-list,=20= mark-sexp,=20kill-sexp)=0A(backward-kill-sexp):=20Remove=20unsightly=20= scan-error=20when=20running=0Ainteractively=20and=20no=20further=20= movement=20by=20sexp=20can=20be=20made.=0A---=0A=20= lisp/emacs-lisp/lisp.el=20|=20134=20= ++++++++++++++++++++++++++--------------=0A=201=20file=20changed,=2089=20= insertions(+),=2045=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/lisp.el=20b/lisp/emacs-lisp/lisp.el=0Aindex=20= ac4ba78897..f74243c890=20100644=0A---=20a/lisp/emacs-lisp/lisp.el=0A+++=20= b/lisp/emacs-lisp/lisp.el=0A@@=20-55,7=20+55,7=20@@=20= forward-sexp-function=0A=20=20=20"If=20non-nil,=20`forward-sexp'=20= delegates=20to=20this=20function.=0A=20Should=20take=20the=20same=20= arguments=20and=20behave=20similarly=20to=20`forward-sexp'.")=0A=20=0A= -(defun=20forward-sexp=20(&optional=20arg)=0A+(defun=20forward-sexp=20= (&optional=20arg=20noerror)=0A=20=20=20"Move=20forward=20across=20one=20= balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20it=20that=20many=20= times.=20=20Negative=20arg=20-N=20means=20move=0A=20backward=20across=20= N=20balanced=20expressions.=20=20This=20command=20assumes=0A@@=20-64,23=20= +64,31=20@@=20forward-sexp=0A=20If=20unable=20to=20move=20over=20a=20= sexp,=20signal=20`scan-error'=20with=20three=0A=20arguments:=20a=20= message,=20the=20start=20of=20the=20obstacle=20(usually=20a=0A=20= parenthesis=20or=20list=20marker=20of=20some=20kind),=20and=20end=20of=20= the=0A-obstacle."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20= (setq=20arg=201))=0A-=20=20(if=20forward-sexp-function=0A-=20=20=20=20=20= =20(funcall=20forward-sexp-function=20arg)=0A-=20=20=20=20(goto-char=20= (or=20(scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A-=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars))))=0A-=0A-(defun=20= backward-sexp=20(&optional=20arg)=0A+obstacle.=20=20If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=0A+do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (forward-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "No=20next=20sexp"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20previous=20= sexp"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20=20=20=20= (if=20forward-sexp-function=0A+=20=20=20=20=20=20=20=20(funcall=20= forward-sexp-function=20arg)=0A+=20=20=20=20=20=20(goto-char=20(or=20= (scan-sexps=20(point)=20arg)=20(buffer-end=20arg)))=0A+=20=20=20=20=20=20= (if=20(<=20arg=200)=20(backward-prefix-chars)))))=0A+=0A+(defun=20= backward-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Move=20backward=20= across=20one=20balanced=20expression=20(sexp).=0A=20With=20ARG,=20do=20= it=20that=20many=20times.=20=20Negative=20arg=20-N=20means=0A=20move=20= forward=20across=20N=20balanced=20expressions.=0A=20This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A-Uses=20= `forward-sexp'=20to=20do=20the=20work."=0A-=20=20(interactive=20"^p")=0A= +Uses=20`forward-sexp'=20to=20do=20the=20work.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(forward-sexp=20(-=20arg)))=0A+=20=20(forward-sexp=20= (-=20arg)=20noerror))=0A=20=0A=20(defun=20mark-sexp=20(&optional=20arg=20= allow-extend)=0A=20=20=20"Set=20mark=20ARG=20sexps=20from=20point.=0A@@=20= -99,50=20+107,75=20@@=20mark-sexp=0A=20=09=20(set-mark=0A=20=09=20=20= (save-excursion=0A=20=09=20=20=20=20(goto-char=20(mark))=0A-=09=20=20=20=20= (forward-sexp=20arg)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (condition-case=20error=0A+=09=20=20=20=20=20=20=20=20(forward-sexp=20= arg)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(scan-error=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(user-error=20(if=20(equal=20(cadr=20= error)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"Containing=20= expression=20ends=20prematurely")=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20more=20= sexp=20to=20select"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cadr=20error)))))=0A=20=09=20=20=20=20= (point))))=0A=20=09(t=0A=20=09=20(push-mark=0A=20=09=20=20= (save-excursion=0A-=09=20=20=20=20(forward-sexp=20(prefix-numeric-value=20= arg))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(condition-case=20error=0A+=09= =20=20=20=20=20=20=20=20(forward-sexp=20(prefix-numeric-value=20arg))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20(scan-error=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(user-error=20(if=20(equal=20(cadr=20= error)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"Containing=20= expression=20ends=20prematurely")=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20sexp=20to=20= select"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(cadr=20error)))))=0A=20=09=20=20=20=20(point))=0A= =20=09=20=20nil=20t))))=0A=20=0A-(defun=20forward-list=20(&optional=20= arg)=0A+(defun=20forward-list=20(&optional=20arg=20noerror)=0A=20=20=20= "Move=20forward=20across=20one=20balanced=20group=20of=20parentheses.=0A=20= This=20command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20it=20that=20many=20times.=0A=20Negative=20arg=20-N=20= means=20move=20backward=20across=20N=20groups=20of=20parentheses.=0A= -This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20arg=20= 1))=0A-=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg))))=0A-=0A-(defun=20backward-list=20(&optional=20arg)=0A= +This=20command=20assumes=20point=20is=20not=20in=20a=20string=20or=20= comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20= do=20not=20signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20= (if=20noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20= =20=20=20=20=20(forward-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20= (scan-error=20(user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"No=20next=20group"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20= previous=20group"))))=0A+=20=20=20=20(or=20arg=20(setq=20arg=201))=0A+=20= =20=20=20(goto-char=20(or=20(scan-lists=20(point)=20arg=200)=20= (buffer-end=20arg)))))=0A+=0A+(defun=20backward-list=20(&optional=20arg=20= noerror)=0A=20=20=20"Move=20backward=20across=20one=20balanced=20group=20= of=20parentheses.=0A=20This=20command=20will=20also=20work=20on=20other=20= parentheses-like=20expressions=0A=20defined=20by=20the=20current=20= language=20mode.=0A=20With=20ARG,=20do=20it=20that=20many=20times.=0A=20= Negative=20arg=20-N=20means=20move=20forward=20across=20N=20groups=20of=20= parentheses.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"^p")=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"^p\nd")=0A=20=20=20(or=20= arg=20(setq=20arg=201))=0A-=20=20(forward-list=20(-=20arg)))=0A+=20=20= (forward-list=20(-=20arg)=20noerror))=0A=20=0A-(defun=20down-list=20= (&optional=20arg)=0A+(defun=20down-list=20(&optional=20arg=20noerror)=0A=20= =20=20"Move=20forward=20down=20one=20level=20of=20parentheses.=0A=20This=20= command=20will=20also=20work=20on=20other=20parentheses-like=20= expressions=0A=20defined=20by=20the=20current=20language=20mode.=0A=20= With=20ARG,=20do=20this=20that=20many=20times.=0A=20A=20negative=20= argument=20means=20move=20backward=20but=20still=20go=20down=20a=20= level.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20string=20= or=20comment."=0A-=20=20(interactive=20"^p")=0A-=20=20(or=20arg=20(setq=20= arg=201))=0A-=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A-=20=20= =20=20(while=20(/=3D=20arg=200)=0A-=20=20=20=20=20=20(goto-char=20(or=20= (scan-lists=20(point)=20inc=20-1)=20(buffer-end=20arg)))=0A-=20=20=20=20=20= =20(setq=20arg=20(-=20arg=20inc)))))=0A+This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20= non-nil,=20as=20it=20is=20interactively,=20do=20not=20signal=20an=20= error."=0A+=20=20(interactive=20"^p\nd")=0A+=20=20(if=20noerror=0A+=20=20= =20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20=20=20=20= (down-list=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20"At=20bottom=20level")))=0A+=20=20=20=20(or=20arg=20(setq=20= arg=201))=0A+=20=20=20=20(let=20((inc=20(if=20(>=20arg=200)=201=20-1)))=0A= +=20=20=20=20=20=20(while=20(/=3D=20arg=200)=0A+=20=20=20=20=20=20=20=20= (goto-char=20(or=20(scan-lists=20(point)=20inc=20-1)=20(buffer-end=20= arg)))=0A+=20=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20inc))))))=0A=20= =0A=20(defun=20backward-up-list=20(&optional=20arg=20escape-strings=20= no-syntax-crossing)=0A=20=20=20"Move=20backward=20out=20of=20one=20level=20= of=20parentheses.=0A@@=20-229,26=20+262,37=20@@=20up-list=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(or=20(<=20inc=200)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(forward-comment=20= 1))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setf=20arg=20= (+=20arg=20inc)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(if=20= no-syntax-crossing=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Assume=20called=20interactively;=20don't=20signal=20an=20error.=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(user-error=20"At=20top=20= level")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(signal=20(car=20= err)=20(cdr=20err)))))))=0A=20=20=20=20=20=20=20(setq=20arg=20(-=20arg=20= inc)))))=0A=20=0A-(defun=20kill-sexp=20(&optional=20arg)=0A+(defun=20= kill-sexp=20(&optional=20arg=20noerror)=0A=20=20=20"Kill=20the=20sexp=20= (balanced=20expression)=20following=20point.=0A=20With=20ARG,=20kill=20= that=20many=20sexps=20after=20point.=0A=20Negative=20arg=20-N=20means=20= kill=20N=20sexps=20before=20point.=0A-This=20command=20assumes=20point=20= is=20not=20in=20a=20string=20or=20comment."=0A-=20=20(interactive=20"p")=0A= -=20=20(let=20((opoint=20(point)))=0A-=20=20=20=20(forward-sexp=20(or=20= arg=201))=0A-=20=20=20=20(kill-region=20opoint=20(point))))=0A-=0A= -(defun=20backward-kill-sexp=20(&optional=20arg)=0A+This=20command=20= assumes=20point=20is=20not=20in=20a=20string=20or=20comment.=0A+If=20= NOERROR=20is=20non-nil,=20as=20it=20is=20interactively,=20do=20not=20= signal=20an=20error."=0A+=20=20(interactive=20"p\nd")=0A+=20=20(if=20= noerror=0A+=20=20=20=20=20=20(condition-case=20_=0A+=20=20=20=20=20=20=20= =20=20=20(kill-sexp=20arg=20nil)=0A+=20=20=20=20=20=20=20=20(scan-error=20= (user-error=20(if=20(>=20arg=200)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "No=20next=20sexp"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"No=20previous=20= sexp"))))=0A+=20=20=20=20(let=20((opoint=20(point)))=0A+=20=20=20=20=20=20= (forward-sexp=20(or=20arg=201))=0A+=20=20=20=20=20=20(kill-region=20= opoint=20(point)))))=0A+=0A+(defun=20backward-kill-sexp=20(&optional=20= arg=20noerror)=0A=20=20=20"Kill=20the=20sexp=20(balanced=20expression)=20= preceding=20point.=0A=20With=20ARG,=20kill=20that=20many=20sexps=20= before=20point.=0A=20Negative=20arg=20-N=20means=20kill=20N=20sexps=20= after=20point.=0A-This=20command=20assumes=20point=20is=20not=20in=20a=20= string=20or=20comment."=0A-=20=20(interactive=20"p")=0A-=20=20(kill-sexp=20= (-=20(or=20arg=201))))=0A+This=20command=20assumes=20point=20is=20not=20= in=20a=20string=20or=20comment.=0A+If=20NOERROR=20is=20non-nil,=20as=20= it=20is=20interactively,=20do=20not=20signal=20an=20error."=0A+=20=20= (interactive=20"p\nd")=0A+=20=20(kill-sexp=20(-=20(or=20arg=201))=20= noerror))=0A=20=0A=20;;=20After=20Zmacs:=0A=20(defun=20= kill-backward-up-list=20(&optional=20arg)=0A--=20=0A2.21.1=20(Apple=20= Git-122.3)=0A=0A= --Apple-Mail=_68A06E81-AFB5-4BF3-B361-CCF2CA1159A4--