[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: add link to item?
From: |
Dale Smith |
Subject: |
Re: [emacs-wiki-discuss] Re: add link to item? |
Date: |
Tue, 18 Oct 2005 13:52:10 -0400 |
On 10/18/05, Jesse Alama <address@hidden> wrote:
> Hi John,
>
> John SJ Anderson <address@hidden> writes:
>
> > Sacha Chua <address@hidden> 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