Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bloom-beacon!husc6!necntc!cullvax!drw From: drw@cullvax.UUCP Newsgroups: comp.emacs Subject: Modifying local Keymaps and other things (Long, sorry) Message-ID: <1473@cullvax.UUCP> Date: Tue, 18-Aug-87 13:30:07 EDT Article-I.D.: cullvax.1473 Posted: Tue Aug 18 13:30:07 1987 Date-Received: Thu, 20-Aug-87 01:49:42 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 48 dmjones@athena.mit.edu (David M. Jones) writes: > Problem 1: (the one with the messy solution) > > I wanted to make the following modifications to the dired-mode keymap: > > (define-key dired-mode-map " " 'scroll-up) > (define-key dired-mode-map "b" 'scroll-down) Well, you can load the dired package first: (load "dired" nil t) and then make the changes. (The additional arguments to load are to make it not print any status messages, so you can start emacs with "emacs &" and have it finish loading without hanging for tty output.) I get stuck doing things like this, because I want to modify some of the functions in some of the packages. A better way would be to have a "load-hook" facility -- you can declare in your .emacs file code you want executed after a specified file is loaded. This would allow you to make all sorts of customizations of existing modes. > Problem 3: > > I have the following alias, which works fine. (I'm using the c-shell, > which may be pertinent information.) > > alias email 'emacs -e mail > > I would like a similar alias for dired. However, emacs -e dired > doesn't work, either because dired is interactive or because dired > wants an argument. Well, you can define a function: (defun dired-here () (interactive) (dired ".")) Then you can start up emacs with "emacs -f dired-here" to have dired invoked automatically. I don't know if you can have a function pick up command line arguments, but if you hack around with the variable 'command-line-args', you might be able to get them. (See startup.el.) Dale -- Dale Worley Cullinet Software ARPA: cullvax!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw OS/2: Yesterday's software tomorrow Nuclear war? There goes my career!