[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Re: delete-selection mode and macros
From: |
Piet van Oostrum |
Subject: |
Re: [AUCTeX] Re: delete-selection mode and macros |
Date: |
Mon, 12 Mar 2007 12:11:27 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (darwin) |
>>>>> Ralf Angeli <address@hidden> (RA) wrote:
>RA> * Piet van Oostrum (2007-03-07) writes:
>>>>>>>> Ralf Angeli <address@hidden> (RA) wrote:
>>>
>RA> * Piet van Oostrum (2007-02-28) writes:
>>>>>>
>>>>>> (put 'TeX-insert-backslash 'delete-selection t)
>>>
>RA> Unfortunately this breaks usage of `TeX-insert-backslash' when
>RA> `TeX-electric-escape' is set to t.
>>>
>>> Are you sure? I don't notice any problems.
>RA> Mark a word before typing `\', then you should see the problem.
OK, I see. I think this could be changed by testing in the beginning of
TeX-electric-macro whether there is an empty region active and then
deactivating it.
Something like this:
(defun TeX-electric-macro ()
"Insert TeX macro with completion.
AUCTeX knows of some macros, and may query for extra arguments.
Space will complete and exit."
(interactive)
(if (and (TeX-active-mark)
(= (point) (mark)))
(TeX-deactivate-mark))
....
where TeX-deactivate-mark would be xemacs/emacs specific.
I think for Emacs the implementation would be (setq mark-active nil).
XEmacs I don't know.
What do you think?
--
Piet van Oostrum <address@hidden>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: address@hidden