emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: David Kastrup
Subject: Re: Shift selection using interactive spec
Date: Wed, 26 Mar 2008 09:09:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

M Jared Finder <address@hidden> writes:

> As an honest-to-god USER of Emacs, I want to say I completely agree
> with Kim, here.  Since I discovered cua-mode, I've had the following
> code in my .emacs:
>
>> (let ((move-fns '(c-forward-conditional c-backward-conditional
>>                   c-down-conditional c-up-conditional
>>                   c-down-conditional-with-else
>>                   c-up-conditional-with-else
>>                   c-beginning-of-statement c-end-of-statement)))
>>   (require 'cua-base)
>>   (dolist (symbol move-fns)
>>     (unless (eq 'move (get symbol 'CUA))
>>       (display-warning 'emacs (format "Adding CUA property to `%s'." symbol))
>>       (setf (get symbol 'CUA) 'move))))
>
> All I have to do to make an existing command support shift-select is
> add its name to the list.  (The move-fns list used to be a lot longer
> when I was using Emacs 21.)

Changing a command's behavior after the thought can be dealt with by
using advice.

Attaching properties is a can of worms that does not work for anonymous
functions.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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