brian@fritz.UUCP (Brian Meyette) (08/09/84)
Does anyone out there know how to get Unipress emacs version 264 running on 4.2 BSD to come up in text-mode, rather than normal? I've tried: (autoload "text-mode" "text-mode") (autoload "text-mode" "text-mode.ml") (setq text-mode 1) (autoexecute "text-mode" "text-mode.ml") The setq and autoexecute bombed and the autoload did nothing. We have an emacs macro library with text-mode.ml and text-mode.mo in it. Thanks for any help you can give me. Brian Meyette
chris@umcp-cs (08/12/84)
Say what? Try this: (autoload "text-mode" <whatever file you keep yours in>) (auto-execute "text-mode" "*.nr") (auto-execute "text-mode" "/tmp/Re*") The auto-execute function takes a function name and a ``pattern'' (which must be either an asterisk followed by non-asterisk text or non-asterisk text followed by an asterisk or just an asterisk, whew!) and runs the named function whenever you visit a file whose name matches the ``pattern''. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690 UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland
jpm@calmasd.UUCP (John McNally) (08/14/84)
< how to set up emacs to enter text mode on entry> Yes, I can answer that one. I have customized emacs quite a bit and have actually bound text-mode to a key so I can go back and forth between C and text (I find normal mode pretty much useless). You can also set it up to go into text mode when you enter the editor. The autoload commands you created are (probably) not necessary. They are not in my profile, but they dont hurt. Its your autoexecute thats all wrong. Autoexecute specifies the type of file needed to invoke a particular mode. The way you have it setup the only way you would get into text mode automatically is on that particular file name in your a-e. I suggest: (autoexecute "text-mode" "*") which will give text mode for all files, unless you explicitly change to another mode. You also might like a little friendlier text mode as defined by the following in your .emacs_pro: (defun (text-action (text-mode) (set "left-margin" 5) (set "right-margin" 72) (set "paragraph-indent" 5) (no-value))) (auto-execute "text-action" "*") paragraph-indent is a strange beast in emacs. Its discussed in the manual, but (at least our version) has no such variable. However, if you define the variable with a setq (set, set-default, lots of ways), then emacs knows about it and uses it as described. Very odd! This all applies to UniPress emacs. So, that should solve the root of your problem. Good luck John McNally sdcsvax!calmasd!jpm