From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Frank Terbeck Newsgroups: gmane.emacs.help Subject: emacs24: cperl-mode and which-function-mode oddity Date: Fri, 08 Apr 2011 13:12:46 +0200 Message-ID: <877hb5hu8h.fsf@ft.bewatermyfriend.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1302285217 1645 80.91.229.12 (8 Apr 2011 17:53:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 17:53:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 19:53:34 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8FsD-0003sS-C2 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 19:53:33 +0200 Original-Received: from localhost ([127.0.0.1]:38772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8FiV-0004q1-7p for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 13:43:31 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 Original-X-Trace: news.dfncis.de +t7hi2izd9OLSbkpm1+3cgDAwZ+jWIeJ7reaXdEcFULxWpiTXDdOtvuSKwU3hYWw== X-Orig-Path: bones.voodoo.lan!not-for-mail Cancel-Lock: sha1:ozIbRK3Aho71A9tUePaigvP8qYE= sha1:LAXwDyS/gmCWH3tW1iyXi1jY0Vw= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:186588 X-Mailman-Approved-At: Fri, 08 Apr 2011 13:38:58 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80712 Archived-At: Hey there. I'm encountering odd behaviour when using `which-function-mode' with `cperl-mode' in emacs version 24. It's a fairly recent development build: % emacs --version GNU Emacs 24.0.50.1 [...] Consider these two files: foo.el: [snip] (mapc (lambda (pair) (if (eq (cdr pair) 'perl-mode) (setcdr pair 'cperl-mode))) (append auto-mode-alist interpreter-mode-alist)) (which-function-mode t) [snap] And foo.pl: [snip] $foo = qq{I'm just another Perl Hacker.}; [snap] Now, I'd start emacs like this: % emacs -nw -Q ...and then: M-x load-file RET foo.el RET C-x C-f foo.pl RET Now font locking is screwed up. The "qq" is highlighted as `cperl-nonoverridable-face', which is correct. But "{I" shows up in `default'. Which is wrong. Now, the ' looks like the start of a string and it's highlighted as `font-lock-string-face'. But because the "q{" isn't the start of the string but the single quote, the closing "}" doesn't end the string and so the ";" (and in fact, any following lines would be too, until another single quote would be encountered) is highlighted in `font-lock-string-face', as well. When I'm removing the "(which-function-mode t)" line from "foo.el", the problem goes away. I've been browsing emacs' BTS for a while, but AFAICS this wasn't reported yet. My question is if anybody is seeing this, too. And by extension, whether `which-function-mode' is supposed to work with `cperl-mode', in which case I'd "M-x report-emacs-bug" it. Regards, Frank -- There are no threads in alt.binaries.pictures.erotica, so there's no gain in using a threaded news reader. -- unknown source