emacs-devel
[Top][All Lists]
Advanced

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

Re: rampant region highlighting


From: Stefan Monnier
Subject: Re: rampant region highlighting
Date: Mon, 07 Apr 2008 11:22:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> If `(transient-mark-mode -1)' isn't enough to completely disable tmm,
> then please tell we what is. I already have this from some time back:

> (defadvice set-mark-command (after no-bloody-t-m-m activate)
>   "Prevent consecutive marks activating bloody `transient-mark-mode'."
>   (if (eq transient-mark-mode 'lambda)
>       (setq transient-mark-mode nil)))

> (defadvice mouse-set-region-1 (after no-bloody-t-m-m activate)
>   "Prevent mouse commands activating bloody `transient-mark-mode'."
>   (if (eq transient-mark-mode 'only)
>       (setq transient-mark-mode nil)))

I'm surprised: if you don't like transient-mark-mode, why didn't you write:

(defadvice set-mark-command (after no-bloody-t-m-m activate)
  "Prevent consecutive marks activating bloody `transient-mark-mode'."
  (if transient-mark-mode (setq transient-mark-mode nil)))

(defadvice mouse-set-region-1 (after no-bloody-t-m-m activate)
  "Prevent mouse commands activating bloody `transient-mark-mode'."
  (if transient-mark-mode (setq transient-mark-mode nil)))

Or even do away with the `if'?  That would not suffer from the problem
you're seeing.


        Stefan




reply via email to

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