From: Chong Yidong <cyd@stupidchicken.com>
To: Phil Hagelberg <phil@evri.com>
Cc: 1593@emacsbugs.donarmstrong.com, Pietro Giorgianni <giorgian@gmail.com>
Subject: bug#1593: ruby-mode: problems with font-lock
Date: Sat, 20 Dec 2008 02:37:38 -0500 [thread overview]
Message-ID: <87r6435mbh.fsf@cyd.mit.edu> (raw)
Hi Phil,
If you have time, could you take a look at this bug report? Thanks.
"Pietro Giorgianni" <giorgian@gmail.com> wrote:
The syntax %{#{'?'}} , while legal (it is equivalent to '?'), makes
all the following text appear in font-lock-string-face.
The same happens with %{#{"?"}} , and seems to rise from the ?" or ?'
part: if I put a space (or whatever) after the ? , things work.
Real life example (from the sources of rubyonrails):
self.class_eval %{
def self.#{method_id}(*args)
guard_protected_attributes = false
if args[0].is_a?(Hash)
guard_protected_attributes = true
attributes = args[0].with_indifferent_access
find_attributes =
attributes.slice(*[:#{attribute_names.join(',:')}])
else
find_attributes = attributes = construct_attributes_from_arguments([:#{attribute_names.join(',:')}], args)
end
options = { :conditions => find_attributes }
set_readonly_option!(options)
record = find_initial(options)
if record.nil?
record = self.new { |r| r.send(:attributes=, attributes, guard_protected_attributes) }
#{'yield(record) if block_given?'}
#{'record.save' if instantiator == :create}
record
else
record
end
end
}, __FILE__, __LINE__
next reply other threads:[~2008-12-20 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-20 7:37 Chong Yidong [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-16 11:06 bug#1593: ruby-mode: problems with font-lock Pietro Giorgianni
2011-10-04 22:01 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r6435mbh.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=1593@emacsbugs.donarmstrong.com \
--cc=giorgian@gmail.com \
--cc=phil@evri.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.