all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: help-gnu-emacs@gnu.org
Subject: emacs24: cperl-mode and which-function-mode oddity
Date: Fri, 08 Apr 2011 13:12:46 +0200	[thread overview]
Message-ID: <877hb5hu8h.fsf@ft.bewatermyfriend.org> (raw)

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


                 reply	other threads:[~2011-04-08 11:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=877hb5hu8h.fsf@ft.bewatermyfriend.org \
    --to=ft@bewatermyfriend.org \
    --cc=help-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.