unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5757: 23.1; String literal parse problem in ruby-mode
@ 2010-03-23 16:21 Rhett Sutphin
  2011-03-30 22:08 ` bug#5757: The line which causes the bug is 1185 Pål de Vibe
  0 siblings, 1 reply; 7+ messages in thread
From: Rhett Sutphin @ 2010-03-23 16:21 UTC (permalink / raw)
  To: 5757

ruby-mode will misunderstand a ruby double-quoted string literal which
contains a single quote and ends with a question mark.  It thinks that
the string literal is unterminated, which contaminates the syntax
highlighting for the remainder of the buffer.

Example ruby code which will demonstrate the problem:

["Is 'this' a string?"], [:something, :else]

If there's anything between the question mark and the terminating
double-quote, the string will be correctly interpreted.

Thanks,
Rhett Sutphin
rhett@detailedbalance.net


In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
  of 2009-08-16 on black.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   value of $XMODIFIERS: nil
   locale-coding-system: nil
   default-enable-multibyte-characters: t

Major mode: Ruby

Minor modes in effect:
   yas/global-mode: t
   yas/minor-mode: t
   auto-fill-function: do-auto-fill
   global-auto-revert-mode: t
   hi-lock-mode: t
   shell-dirtrack-mode: t
   hl-line-mode: t
   global-linum-mode: t
   linum-mode: t
   show-paren-mode: t
   nxhtml-global-minor-mode: t
   recentf-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   global-auto-composition-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
<right> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <left> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <left>
<left> <right> <right> ' <right> <left> " <left> <left>
<left> <left> <right> <left> <right> <right> <left>
<left> <right> <right> <right> <left> <left> <left>
<left> <right> <right> <right> <right> <right> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <right>
<right> <right> <right> <right> <right> <left> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <backspace> <left> <left> <backspace> ' <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> , SPC
[ : a ] <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <backspace> <right>
<right> <right> <right> <right> ' <right> <right> <right>
<right> <right> <right> ' <backspace> <left> <left>
<left> <left> <left> <left> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> ' '
' ' ' ' ' ' ' ' ' ' ' <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> " <right> <right> <right> <right> <right>
<right> ? <backspace> <left> <left> <left> ? <down-mouse-1>
<mouse-1> M-x r e p o r t - e m <tab> <return>

Recent messages:
Auto-saving...done
Quit
Mark set
Undo! [6 times]
Quit
Auto-saving...done
Making completion list...
Quit
ruby-indent-to: invalid nest [2 times]
call-interactively: End of buffer







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-12  3:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-23 16:21 bug#5757: 23.1; String literal parse problem in ruby-mode Rhett Sutphin
2011-03-30 22:08 ` bug#5757: The line which causes the bug is 1185 Pål de Vibe
2011-04-03  0:50   ` bug#5757: String literal parse problem in ruby-mode Chong Yidong
2011-04-04 13:53     ` Stefan Monnier
2011-04-04 13:55       ` Pål de Vibe
2011-04-09 20:34       ` Chong Yidong
2011-04-12  3:16         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).