all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Pietro Giorgianni" <giorgian@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#1593: ruby-mode: problems with font-lock
Date: Tue, 16 Dec 2008 12:06:43 +0100	[thread overview]
Message-ID: <50177d450812160306v70f3661tabbe7eabd0c1545b@mail.gmail.com> (raw)

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__


---

In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

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: ITA
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Ruby

Minor modes in effect:
  erc-log-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-highlight-nicknames-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-readonly-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  display-time-mode: t
  encoded-kbd-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
c e n s o r e d


Recent messages:
censored...
Loading emacsbug...done







             reply	other threads:[~2008-12-16 11:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16 11:06 Pietro Giorgianni [this message]
2011-10-04 22:01 ` bug#1593: ruby-mode: problems with font-lock Glenn Morris
  -- strict thread matches above, loose matches on Subject: below --
2008-12-20  7:37 Chong Yidong

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=50177d450812160306v70f3661tabbe7eabd0c1545b@mail.gmail.com \
    --to=giorgian@gmail.com \
    --cc=1593@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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.