emacs-devel
[Top][All Lists]
Advanced

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

Re: mark-word


From: Andreas Röhler
Subject: Re: mark-word
Date: Wed, 14 Nov 2007 12:27:43 +0100
User-agent: KMail/1.9.5

Am Mittwoch, 14. November 2007 09:26 schrieb David Kastrup:
> "Stephen J. Turnbull" <address@hidden> writes:
> > Andreas Röhler writes:
> >  > If mark-word is called while inside a word, it marks
> >  > from this point until the end of word first AFAIS, thus
> >  > leaving the first part of the word unmarked.
> >  >
> >  > IMO marking the word-at-point completely then would be
> >  > a more convenient behaviour.
> >
> > `mark-word' itself should remain compatible with `kill-word' and
> > `mark-sexp'.  I think it would be a good idea to have a
> > `mark-entire-word' command and bind it to M-@, especially since C-@
> > doesn't mark a character.  Ditto `mark-entire-sexp' and address@hidden
>
> Since "mark whole ..." for both directions is useful for more than
> words, I think it would be more useful to have a prefix for that.
>
> C-u C-u feels natural for "both directions", but to make it
> non-surprising, one would likely have to assign separate meaning to C-u
> (as opposed to C-u 4).  So probably rather C-u address@hidden


What about this?

(defun mark-word-at-point ()
  " "
  (interactive)
  (beginning-of-thing 'word)
  (push-mark nil nil t)
  (end-of-thing 'word))

Andreas Röhler




reply via email to

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