Article View: gnu.emacs.bug
Article #87807backward-up-list confused by commented out double-quote
From: William G. Dubuque
Date: Thu, 25 Aug 1994 14:32
Date: Thu, 25 Aug 1994 14:32
31 lines
2078 bytes
2078 bytes
In GNU Emacs 19.25.1 of Fri Jun 3 1994 on kleph (hppa1.1-hp-hpux9) 'C-M-U' (backward-up-list) within the following string incorrectly moves to the start of the defun. The same bug occurs in 18.57 and lemacs 19.6. The bug happens no matter what the value of parse-sexp-ignore-comments. (defun foo () ; " ) (progn "Bug: a C-M-U within this string goes to start of foo's def") If you delete the commented-out double-quote, or back-slashify it then you instead get an "Unbalanced parenthesis" error. Shouldn't it move to the start of the progn in this case? Note that the lemacs (but not emacs) Info node on "Lists" says: "In Lisp and other languages where comments run until the end of a line, it is very difficult to ignore comments when parsing backwards; therefore, in such languages the sexp commands treat the text of comments as if it were code." Is this comment also supposed to apply to 'list' commands in addition to 'sexp' commands? I guess that would explain the above behavior if so. Its rather ironic that Emacs now has all these fancy tools for doing syntax highlighting yet it still cannot even parse backwards correctly. Perhaps extents and or text-properties could be used to fix this. Note: the above example is not artificially contrived: it was narrowed-down from an actual piece of code.
Technical Details
Message-ID:
<9408251430.AA04819@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!martigny.ai.mit.edu!wgdShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,2b4176e7447cae96,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-25 08:28:37 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!martigny.ai.mit.edu!wgd From: wgd@martigny.ai.mit.edu (William G. Dubuque) Newsgroups: gnu.emacs.bug Subject: backward-up-list confused by commented out double-quote Date: 25 Aug 1994 10:32:57 -0400 Organization: GNUs Not Usenet Lines: 31 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408251430.AA04819@life.ai.mit.edu>