Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!indetech.COM!lrs From: lrs@indetech.COM (Lynn Slater) Newsgroups: comp.emacs Subject: Passing arguments to function on command line? Message-ID: Date: 21 Sep 90 19:28:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 27 > There is a special case of my application > which some users would like to access as a separate program. I have small changes to startup.el that allow loaded function to define command line options. I do this all the time to package elisp to non emacs users. Examples: emacs -batch -l microplanner -plan file file file .. -analyse -plan file ... emacs -batch -l headers -update *.[ch]xx -table_of_contents Makefile Use is as simple as the following. > (setq command-line-hooks (cons 'do-uplan-strip command-line-hooks)) > (defun do-uplan-strip () > (if (string= argi "-strip") > (let ((trim-versions-without-asking t) > . > . > . Write for the changes. =============================================================== Lynn Slater -- lrs@indetech.com or {sun, ames, pacbell}!indetech!lrs 42075 Lawrence Place, Fremont Ca 94538 Office (415) 438-2048; Home (415) 793-1864; Fax (415) 438-2034 ===============================================================