[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- From: "Stefan Monnier" <monnier@xxxxxxxxxxxxxxxx>
- Date: 19 Sep 2003 12:15:54 -0400
- X-ml-name: emacs-w3m
- X-mail-count: 05766
- References: <firstname.lastname@example.org>
> There's a strange behavior that the recent Emacs calls a
> FUNCTION interactively when the command line arguments
> -f FUNCTION
> are given. How to reproduce it is:
Yes, I changed it because I wanted to be able to say `emacs -f gdb'
and get gdb started rather than get an error.
> Because of this behavior, I can't use the following:
> emacs -f w3m http://some.news.site/daily-news.html&
> Where w3m is yet another web browser command which has the
> interactive spec for prompting a url.
That was not intended.
I'm not sure how best to get both behaviors.
What do people think of a patch like the one below ?
--- startup.el 1 Sep 2003 15:45:15 -0000 1.322
+++ startup.el 19 Sep 2003 16:12:59 -0000
@@ -1634,9 +1644,10 @@
"-e")) ; what the source used to say
(setq tem (intern (or argval (pop command-line-args-left))))
- (if (commandp tem)
- (command-execute tem)
- (funcall tem)))
+ (condition-case nil
+ (funcall tem)
+ ((invalid-function wrong-number-of-arguments)
+ (command-execute tem))))
((member argi '("-eval" "-execute"))
(eval (read (or argval (pop command-line-args-left)))))