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: M Jared Finder
Subject: Re: Shift selection using interactive spec
Date: Thu, 27 Mar 2008 21:05:47 -0700
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080109)

Richard Stallman wrote:
Yes, but the problem here is rather that you may need to redefine which commands should deactivate the mark. Doing that with a symbol property makes it much more flexible.

Why is it important to be able change whether a command deactivates
the mark without changing the command itself?
It'd be a disaster to have to restate the whole command or even just the interactive spec to make commands CUA-mode aware. Right now, if I am using an external package that is not fully CUA-mode aware (like CC-mode), all I need to do is:
(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))))
If I had to restate the interactive spec, this would not be nearly as easy. Please, listen to the users of CUA-mode and do *not* make this any harder.

 -- MJF




reply via email to

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