Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!hal!ncoast!telotech!bsa From: bsa@telotech.uucp (Brandon S. Allbery) Newsgroups: comp.emacs Subject: buffer menu on multiple files: confusion with -f Message-ID: <1989Sep26.124531.16436@telotech.uucp> Date: 26 Sep 89 12:45:31 GMT Organization: Telotech, Inc. Lines: 20 Kyle Jones's code for displaying a buffer menu if there are multiple files on the command line, or two windows if there are only two files, breaks when you start GNU Emacs with a "-funcall". My fix: replace the startup code in .emacs with the following. (Note that I suspect I overuse "mapcar" a bit in my Elisp code; I'd appreciate hints on alternative ways to do this, if any.) (and (cdr command-line-args) ;; this is nice code, but it interferes with -funcall... abort if lisping (or (not (mapcar (function (lambda (arg) (string= arg "-f"))) (cdr command-line-args)))) (setq command-line-args (nconc command-line-args '("-f" "auto-buffer-menu")))) The defun for "auto-buffer-menu" should remain unchanged. ++Brandon -=> Brandon S. Allbery @ telotech, inc. (I do not speak for telotech.) <=- Any comp.sources.misc postings sent to this address will be DISCARDED -- use allbery@uunet.UU.NET instead. My boss doesn't pay me to moderate newsgroups. ** allbery@NCoast.ORG ** uunet!hal.cwru.edu!ncoast!{allbery,telotech!bsa} **