help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to activate region


From: Samuel Wales
Subject: Re: how to activate region
Date: Fri, 15 May 2009 13:43:39 -0700

Apologies for the noise.  I noticed that the solution was pointed to
in the thread.  (Thank you.)  Somehow I missed it.

Here is the solution to overload c-x c-x to do what I want.  (Although
I would use defadvice if possible.)

;;i would use defadvice, which would be much better, but i don't
;;know how to call the original again with an argument

(setf transient-mark-mode nil)
(substitute-key-definition 'exchange-point-and-mark
                           'alpha-exchange-point-and-mark
                           global-map)
(defun alpha-exchange-point-and-mark ()
  "same as original, but activate region"
  (interactive)
  ;;why this has to be done twice, i don't know; it fails to
  ;;exchange when t
  (exchange-point-and-mark)
  (exchange-point-and-mark t))




reply via email to

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