Am 21.10.2010 15:06, schrieb Uwe Brauer:
Hello
I usually use mark-word quite often and I have bound it to a
key. Now repeating the key allows me to mark the following
word etc etc.
So I thought of defining my own mark-word-backwards:
The original code is:
(defun mark-word (&optional count)
"Mark the text from point until encountering the beginnin of a word.
With optional argument COUNT, mark COUNT words."
(interactive "p")
(mark-something 'mark-word 'forward-word count))
Which I modified to
(defun mark-word-back (&optional count)
"Mark the text from point until encountering the beginnin of a word.
With optional argument COUNT, mark COUNT words."
(interactive "p")
(mark-something 'mark-word 'backward-word count))
That works fine for marking one word backwards.
However when I bind this to a key and repeat it then it does
not repeat in the way mark-word does.
I presume the reason is how the function mark-something is
implemented or is there something I am missing?
Uwe Brauer
_______________________________________________
Hi Uwe,
can't you use mark-word with negative numerical argument simply?
If not, suggest to sync up with GNU version rather than writing extra stuff.
Cheers
Andreas
--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta