GNU bug report logs - #1593
ruby-mode: problems with font-lock

Previous Next

Package: emacs;

Reported by: "Pietro Giorgianni" <giorgian <at> gmail.com>

Date: Wed, 17 Dec 2008 06:57:12 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 1593 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Phil Hagelberg  <phil <at> evri.com>
Cc: "Pietro Giorgianni" <giorgian <at> gmail.com>, 1593 <at> debbugs.gnu.org
Subject: Re: ruby-mode: problems with font-lock
Date: Sat, 20 Dec 2008 02:37:38 -0500
Hi Phil,

If you have time, could you take a look at this bug report?  Thanks.

"Pietro Giorgianni" <giorgian <at> 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__




This bug report was last modified 13 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.