help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] Re: backward-kill-word in minibuffer


From: Roman Belenov
Subject: Re: [h-e-w] Re: backward-kill-word in minibuffer
Date: 19 Dec 2001 16:12:51 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Anders Lindgren <address@hidden> writes:

> Roman Belenov <address@hidden> writes:
> 
> > Does checking "Inviolable" on customization form for
> > minibuffer-prompt-properties help ?
> 
> Nope!
> 
> It only stopped me from walking into the prompt.
> 
> 
> My own electric commands look like the following piece of code.
> 
>       (defun minibuffer-electric-tilde ()
>         (interactive)
>         (if (eq ?/ (preceding-char))
>             (delete-region (point-min) (point)))
>         (insert ?~))
> 
> The commands are added to a minor mode keymap enabled using
> `minibuffer-setup-hook'.
> 
> Oh, well, the problem is that the code assumes that only the file name
> is present in the buffer and hence tries to delete everything from
> `point-min' to the `point'.  In order to make it work for the new
> situation would be to replace `point-min' with something like
> `minibuffer-prompt-end', or similar.

It seems that (field-beginning) is appropriate in this situation.

-- 
                                                        With regards, Roman.




reply via email to

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