[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs24: cperl-mode and which-function-mode oddity

From: Frank Terbeck
Subject: emacs24: cperl-mode and which-function-mode oddity
Date: Fri, 08 Apr 2011 13:12:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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

% emacs --version
GNU Emacs

Consider these two files:


  (lambda (pair)
    (if (eq (cdr pair) 'perl-mode)
      (setcdr pair 'cperl-mode)))
  (append auto-mode-alist interpreter-mode-alist))

(which-function-mode t)


$foo = qq{I'm just another Perl Hacker.};

Now, I'd start emacs like this:

% emacs -nw -Q

...and then:

M-x load-file RET foo.el RET
C-x C-f 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,
so there's no gain in using a threaded news reader.
                                     -- unknown source

reply via email to

[Prev in Thread] Current Thread [Next in Thread]