Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!mirror!adelie!morgoth!dmb From: dmb@morgoth.UUCP (David M. Brown) Newsgroups: comp.emacs Subject: dired-mode-hook exists - here is the way to setq it Message-ID: <431@morgoth.UUCP> Date: Tue, 18-Aug-87 13:13:43 EDT Article-I.D.: morgoth.431 Posted: Tue Aug 18 13:13:43 1987 Date-Received: Fri, 21-Aug-87 07:23:27 EDT Organization: Goldberg-Zoino and Assoc., Newton, MA Lines: 31 Keywords: dired hook keymap Dave Jones wanted to know how to rebind keys in the dired-mode. The problem was that dired is autoloaded, so dired-mode-map is nil when the .emacs file is eval'ed. John Robinson told him to use dired-mode-hook, but misinformed him that the hook does not exist, and therefore he had to redefine dired-mode to call dired-mode-hook. Dired-mode-hook exists. It's right there in dired.el. Also, I think Dave needed to know how to setq a hook. I have the following in my .emacs because I often get dired-mode and buffer-menu-mode bindings confused: (setq dired-mode-hook (function (lambda nil (define-key dired-mode-map "1" 'dired-find-file)))) (define-key Buffer-menu-mode-map "f" 'Buffer-menu-1-window) Dave: If you copy this style it will work. Just don't ask me why, okay? David Brown {harvard | ll-xn | mirror}!adelie!morgoth!dmb GZA, 320 Needham St., Newton Upper Falls, MA 02164 (617) 969-0050 WE CHALLENGE our traditions BECAUSE we believe TRUTH without questioning IS FALSE