On 10/18/05, Jesse Alama <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> John SJ Anderson <[EMAIL PROTECTED]> writes:
>
> > Sacha Chua <[EMAIL PROTECTED]> writes:
> >
> >> C-u M-x planner-replan-task might also help. It picks up the current list.
> >
> >   Yep, that's what I wanted, thanks.
> >
> >   Silly Elisp question: how do I indicate that I want to bind a key to
> >   the prefixed version of a function? That is, if I currently have this:
> >
> > (global-set-key (kbd "<f8> e")  'planner-replan-task)
> >
> >   and I instead want F8-e to call planner-replan-task with a prefix
> >   argument, what do I need to change the binding to? (I've looked at the
> >   Emacs documentation, but can't seem to find the proper incantation...)
>
> How about `C-u <prefix> <f8> e'?

I had a similar problem with grep.  I wanted to bind a key to what
"C-u M-x grep" does.  Here is what I ended up using, thanks to the
kind folks on #emacs.

(defun grep-current-word ()
  "Grep for the current word"
  (interactive)
  (let ((current-prefix-arg t))
    (call-interactively 'grep)))

So something like (untested):

(defun planner-replan-task-with-edit ()
  "Call planner-replan-task with a prefix argument"
  (interactive)
  (let ((current-prefix-arg t))
    (call-interactively 'planner-replan-task)))

-Dale


_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to