[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs-21.1: cwarn-mode doesn't highlight shift assignments >> =, <<=
From: |
Anders Lindgren |
Subject: |
Re: Emacs-21.1: cwarn-mode doesn't highlight shift assignments >> =, <<= |
Date: |
04 Dec 2001 12:47:15 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Broadey Kevin-BKB003 <Kevin.Broadey@motorola.com> writes:
Hi Kevin, and the rest of the world!
> Couldn't resist a bit of elisp hacking! Here's a diff to highlight
> <<= and >>=. It also highlights the whole of the operator rather
> than just the =. This makes it show up better IMHO.
I think that both your suggestions seems very reasonable. I admit to
missing the ">>=" case. Also, I didn't even consider highlighting the
entire operator, but it could easily be done.
> I'm not entirely happy with the regexp. I had to stick "[^!<>=]" at
> the beginning to stop the = in comparison operators being
> highlighted. It works, but I think there should be a cleaner way to
> catch a plain assignment "=".
An alternative is to let the regexp more (including plain comparisons)
and do a more algorithmical check in the "and" clause below the search.
-- Anders (author of cwarn)
--
;; .signature -- File added to the end of mail, containing joke or info.
(defvar me '((profession . "Compiler Designer") (company . "IAR Systems")
(age . 32) (country . "Sweden") (hair . "Long") (lindy-hopper . t)))
;; .signature ends here.