aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kastrup <[email protected]>2007-09-30 20:43:14 +0000
committerDavid Kastrup <[email protected]>2007-09-30 20:43:14 +0000
commitaa5310e43ad28f8955c2c1e10bde32f227950956 (patch)
tree531cd8d2da011f4a2f10875f98987fd57ea1bdea
parentfdc31e1d3897cbfdea861deabd2e813dadd8e66c (diff)
(argv): Alias for `command-line-args-left' to use as
`(pop argv)' inside of --eval command sequences. Allows for passing shell commands into Emacs verbatim without need for Lisp quoting.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/startup.el6
3 files changed, 15 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 63a3797b6d..d6c76df565 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -103,6 +103,10 @@ using several time zones, in a buffer.
after starting Emacs: startup screen, *scratch* buffer, visiting a
file or directory.
+** New alias `argv' for `command-line-args-left'
+This is a convenience alias, so that one can write `(pop argv)'
+inside of --eval command line arguments in order to access
+following arguments.
* Incompatible Editing Changes in Emacs 23.1
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 12eabe46e5..ac151a50bf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2007-09-30 David Kastrup <[email protected]>
+ * startup.el (argv): Alias for `command-line-args-left' to use as
+ `(pop argv)' inside of --eval command sequences. Allows for
+ passing shell commands into Emacs verbatim without need for Lisp
+ quoting.
+
* autorevert.el (auto-revert-handler): In `auto-revert-tail-mode',
check only for changed size.
(auto-revert-tail-handler): Get size from caller. If the file has
diff --git a/lisp/startup.el b/lisp/startup.el
index 395d1673a1..ef0e750d7d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -107,6 +107,12 @@ the remaining command-line args are in the variable `command-line-args-left'.")
(defvar command-line-args-left nil
"List of command-line args not yet processed.")
+(defvaralias 'argv 'command-line-args-left
+ "List of command-line args not yet processed.
+This is a convenience alias, so that one can write \(pop argv\)
+inside of --eval command line arguments in order to access
+following arguments.")
+
(defvar command-line-functions nil ;; lrs 7/31/89
"List of functions to process unrecognized command-line arguments.
Each function should access the dynamically bound variables