Andreas Röhler writes:
Am 22.10.2010 12:17, schrieb Uwe Brauer:
> However when I mark a word with mark-word and then again
> execute the function its continues to mark the next word etc
> till I am pleased with the result.
OK, what happens is that mark-something assumes that if (> (point)
(mark)), forward motion was used to mark, and otherwise backward
motion. It then negates the argument in the latter case to preserve
the backward motion. To work around this, you need to manipulate the
argument passed to backward-word:
(defun mark-word-backward (&optional count)
(interactive "p")
(mark-something 'mark-word-backward
(lambda (x)
(and (mark)
;; this is tricky: if we get here, then
;; mark-something has already done (goto-char (mark))
(= (mark) (point))
(setq x (- x)))
(backward-word x))
count))
Does GNU have a mark-word-backward that works?
Ok, but than push-mark -- CRTL-SPACE -- followed by a
forward-/backward-word should do all you need (?)
*snort*
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta