emacs-devel
[Top][All Lists]
Advanced

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

--eval (was: emacsclient proposal)


From: Juri Linkov
Subject: --eval (was: emacsclient proposal)
Date: Sat, 21 Jul 2007 21:34:28 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Uh, -f was a typo.  I really meant --eval in my example.

BTW, a pity that Emacs doesn't provide a short option for the `--eval'
command line argument!

By analogy with `--funcall' that have the corresponding `-f',
the short option for `--eval' and `--execute' would be `-e'.

Even though startup.el currently treats `-e' as a shorthand of `-funcall',
it seems that such use of `-e' is obsolete and we are free to reassign it
to `--eval' and `--execute' because the manual doesn't document it:

Index: lisp/startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.440
diff -c -r1.440 startup.el
*** lisp/startup.el     3 Jul 2007 02:54:42 -0000       1.440
--- lisp/startup.el     21 Jul 2007 18:30:09 -0000
***************
*** 1834,1846 ****
  
                  ((member argi '("-f"  ; what the manual claims
                                  "-funcall"
!                                 "-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)))
  
!                 ((member argi '("-eval" "-execute"))
                   (eval (read (or argval (pop command-line-args-left)))))
  
                  ((member argi '("-L" "-directory"))
--- 1874,1886 ----
  
                  ((member argi '("-f"  ; what the manual claims
                                  "-funcall"
!                                 ))
                   (setq tem (intern (or argval (pop command-line-args-left))))
                   (if (commandp tem)
                       (command-execute tem)
                     (funcall tem)))
  
!                 ((member argi '("-e" "-eval" "-execute"))
                   (eval (read (or argval (pop command-line-args-left)))))
  
                  ((member argi '("-L" "-directory"))

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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