[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] highlight region only if it is of non-zero length?
From: |
Davis Herring |
Subject: |
Re: [RFC] highlight region only if it is of non-zero length? |
Date: |
Wed, 12 Dec 2012 08:28:08 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110717 Lanikai/3.1.11 |
> + if (!NILP (Vtransient_mark_mode)
> + && !NILP (BVAR (current_buffer, mark_active))
> + && XMARKER (BVAR (current_buffer, mark))->buffer != NULL
> + && (markpos = XMARKER (BVAR (current_buffer, mark))->charpos) != PT)
> + /* nothing */;
> + else
> + markpos = -1;
Since everything in it is negated anyway, I would De Morgan that:
+ if (NILP (Vtransient_mark_mode)
+ || NILP (BVAR (current_buffer, mark_active))
+ || XMARKER (BVAR (current_buffer, mark))->buffer == NULL
+ || (markpos = XMARKER (BVAR (current_buffer, mark))->charpos) == PT)
+ markpos = -1;
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.