I'm trying to fix Xemacs bindings for the Shell-script major mode to make the return key automatically indent equal to the last line. Sounds simple enough. I can edit a BASH script file and see that the Shell-script major mode is active, and then I can: M-x local-set-key the return key to the sh-newline-and-indent function. This works exactly as I expected. What I can't seem to do is fix the sh-mode-map to make that assignment permanent. I've edited my otherwise empty init.el file and tried various versions of the following, all producing errors seeming to indicate that sh-mode-map is unknown, even though its documented to exist. I'm not certain of what the error is trying to tell me. (define-key sh-mode-map "return" 'sh-newline-and-indent) (define-key sh-mode-map [return] 'sh-newline-and-indent) I then tried assigning the function to an unused function key - f9 and I get the same errors: (define-key sh-mode-map "f9" 'sh-newline-and-indent) (define-key sh-mode-map [f9] 'sh-newline-and-indent) Page 276 of the Xemacs manual states that the less frequently used mode maps are constructed on demand, so I figured that maybe sh-mode-map was one of those and that's why I get the error because at the time it doesn't exist yet. So I tried changing an assignment for the c-mode-map and that also doesn't work. I just want to make the f9 key be equal in functionality to the return key as an experiment. (define-key c-mode-map "f9" 'newline) Can anyone tell me what I'm doing wrong? I'm trying to RTFM, but its describing a version slightly different to the one that ships with RH9. Bill Gradwohl (817) 224-9400 x211 www.ycc.com SPAMstomper Protected Email -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list