From unknown Sat Aug 09 12:59:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1593 <1593@debbugs.gnu.org> To: bug#1593 <1593@debbugs.gnu.org> Subject: Status: ruby-mode: problems with font-lock Reply-To: bug#1593 <1593@debbugs.gnu.org> Date: Sat, 09 Aug 2025 19:59:23 +0000 retitle 1593 ruby-mode: problems with font-lock reassign 1593 emacs submitter 1593 "Pietro Giorgianni" severity 1593 normal thanks From giorgian@gmail.com Tue Dec 16 03:06:52 2008 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Dec 2008 11:06:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBGB6mdR026355 for ; Tue, 16 Dec 2008 03:06:50 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCXlH-0007tj-W9 for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2008 06:06:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCXlG-0007sm-02 for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2008 06:06:47 -0500 Received: from [199.232.76.173] (port=47028 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCXlF-0007sc-Q5 for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2008 06:06:45 -0500 Received: from an-out-0708.google.com ([209.85.132.242]:17995) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCXlE-0001l7-W9 for bug-gnu-emacs@gnu.org; Tue, 16 Dec 2008 06:06:45 -0500 Received: by an-out-0708.google.com with SMTP id c38so1258086ana.21 for ; Tue, 16 Dec 2008 03:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=klmTpNRDMA+OrDyKg/eEx/0KLXN8MFGUmAbdrN85MME=; b=O5JbVpazmPFTBQc+F4gOKXu9adkNo1d7EH3GrsUTar5QQ2Y/aEgc3ekUVajohzOq/P 4IH8ZTziNU/k6/wVmnGTQgIK1m/kco3reXpWeC3qFy1xjn0YITwTMSYAKB3lGN++TQol Ha2nqw+j0uHcIyDSnF1qQIrjq+3Fnm3277oKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=UDP7NwBPRT1aNSWoFC7K7KwV4afEdbfHqhnjHmAA/HXBrQVYO2xevtM+nWgNZ9GB/W baXePdunSWbJX13d+4ENut5zwZG03SeMTWnkhIO+3vyCwvKW3OhVUGmOBhSlZCe+IPUZ nj1CE8oEhJhsRDOLrVTxmYfTh3xv8Q2/uBPw4= Received: by 10.65.44.11 with SMTP id w11mr7219424qbj.58.1229425603141; Tue, 16 Dec 2008 03:06:43 -0800 (PST) Received: by 10.65.220.16 with HTTP; Tue, 16 Dec 2008 03:06:43 -0800 (PST) Message-ID: <50177d450812160306v70f3661tabbe7eabd0c1545b@mail.gmail.com> Date: Tue, 16 Dec 2008 12:06:43 +0100 From: "Pietro Giorgianni" To: bug-gnu-emacs@gnu.org Subject: ruby-mode: problems with font-lock MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 From cyd@stupidchicken.com Fri Dec 19 23:37:39 2008 Received: (at 1593) by emacsbugs.donarmstrong.com; 20 Dec 2008 07:37:39 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.0 required=4.0 tests=GMAIL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBK7baor014622 for <1593@emacsbugs.donarmstrong.com>; Fri, 19 Dec 2008 23:37:37 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id E610457E204; Sat, 20 Dec 2008 02:37:38 -0500 (EST) From: Chong Yidong To: Phil Hagelberg Cc: "Pietro Giorgianni" , 1593@debbugs.gnu.org Subject: Re: ruby-mode: problems with font-lock Date: Sat, 20 Dec 2008 02:37:38 -0500 Message-ID: <87r6435mbh.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Phil, If you have time, could you take a look at this bug report? Thanks. "Pietro Giorgianni" 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__ From giorgian@gmail.com Mon Dec 29 06:28:58 2008 Received: (at 1593) by emacsbugs.donarmstrong.com; 29 Dec 2008 14:28:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: *** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=3.1 required=4.0 tests=FOURLA,ONEWORD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBTESuqt023553 for <1593@emacsbugs.donarmstrong.com>; Mon, 29 Dec 2008 06:28:57 -0800 Received: by wf-out-1314.google.com with SMTP id 26so5445929wfd.13 for <1593@emacsbugs.donarmstrong.com>; Mon, 29 Dec 2008 06:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=W/FCdlT0F54irHJ/MhLXuKCyB28S2PWmad68zYMmhzY=; b=QBhi+1VOCvKV0qoSTqBnTEeRSzDWQQCTZboC7B+UCyyT8ynmaF6QyXZXVhF3iv86/K melZP3KCcuNxKTbQPO5qtWfdcPAFbJ/zmYNbRNX1XornnjvZV95TUrVEJVbKzcF6azZy vP/G6vfKyHk3QPCPEcxX9uU28eH207Mnzq2P8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=RQgEwRZH/3d9tvKGmAOOISWc3+uvFYV9FegfZXGwGpzcCoCh0iy5p0RaWhWsqcmVbi GC1ZXSZHzTq2Lg5X9hD5tG0MdiHbM05g08CHQBJ52EozQSEZ2PSVv6bdUa3Wjmbt9qjA deeByfojfDhw6Pwj7Bc9w6e1sDPTlUk7+yOLI= Received: by 10.142.104.9 with SMTP id b9mr5675117wfc.160.1230560935649; Mon, 29 Dec 2008 06:28:55 -0800 (PST) Received: by 10.143.37.15 with HTTP; Mon, 29 Dec 2008 06:28:55 -0800 (PST) Message-ID: <50177d450812290628y72cf65bbrf04881a224b00df8@mail.gmail.com> Date: Mon, 29 Dec 2008 15:28:55 +0100 From: "Pietro Giorgianni" To: 1593@debbugs.gnu.org Subject: update MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, The %{} syntax is actually a special case of %[]..., where , optional, can be: q - single quote string, as in 'foo'; Q - double quote string, as in "foo"; x - command output expression, as in `foo`; r - regexp, as in /foo/ can by any non-alphanumeric character, including spaces and newline, or the pairs {}, [], (), <>. This means that things like %|"|, which is equivalent to '"' (or to "\""), can mess up syntax highlight in emacs. thanks again From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 04 18:03:19 2011 Received: (at 1593-done) by debbugs.gnu.org; 4 Oct 2011 22:03:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBD54-0005i5-Vd for submit@debbugs.gnu.org; Tue, 04 Oct 2011 18:03:19 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBD51-0005hx-GW for 1593-done@debbugs.gnu.org; Tue, 04 Oct 2011 18:03:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBD3Y-0005fB-6O; Tue, 04 Oct 2011 18:01:44 -0400 From: Glenn Morris To: 1593-done@debbugs.gnu.org Subject: Re: bug#1593: ruby-mode: problems with font-lock References: <50177d450812160306v70f3661tabbe7eabd0c1545b@mail.gmail.com> X-Spook: cryptanalysis Leitrim Janet Reno Putin Taiwan X-Ran: -/H)5JEadPa~I\@FxcbF[u.zQ>fOQDn=?,myCLHDr.~ihAyA_;}w'rkJx:5I4UIGDVxdrO X-Hue: black X-Attribution: GM Date: Tue, 04 Oct 2011 18:01:44 -0400 In-Reply-To: <50177d450812160306v70f3661tabbe7eabd0c1545b@mail.gmail.com> (Pietro Giorgianni's message of "Tue, 16 Dec 2008 12:06:43 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 1593-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Vesion: 24.1 "Pietro Giorgianni" 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. I see this in Emacs 23.3, but not in the current trunk, so it seems to have been fixed. The other stuff mentioned in your update seems to be the subject of http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6286 From unknown Sat Aug 09 12:59:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 02 Nov 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator