[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] Re: Traditional find-file vs. file open dialog?
From: |
John Paul Wallington |
Subject: |
[h-e-w] Re: Traditional find-file vs. file open dialog? |
Date: |
30 Jul 2002 19:55:38 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
I wrote:
> Rob Allen <address@hidden> wrote:
>
> > Unfortunately, use-dialog-box only applies to commands initiated using
> > the mouse.
> >
> > How do I get gnu emacs to use the dialog box for the keyboard command
> > c-x,c-f ?
>
> Maybe you can bind `last-nonmenu-event' to nil at the right moment?
>
> This appears to work in LessTif (lightly tested):
>
> (defadvice read-file-name (around use-dialog activate)
> "Always use file selection dialog, if `use-dialog-box' is non-nil."
> (let ((last-nonmenu-event nil))
> ad-do-it))
Sorry, if you are only interested in `find-file' [1] then the
following would be better:
(defadvice find-file-read-args (around use-dialog activate)
"Always use file selection dialog, if `use-dialog-box' is non-nil."
(let ((last-nonmenu-event nil))
ad-do-it))
[1] I'm the opposite: I like setting `use-dialog-box' to t, then
advising `read-file-name' to avoid the dreaded file selection dialog :-)
--
John Paul Wallington