text-mode in emacs

John McNally jpm at calmasd.UUCP
Tue Aug 14 07:09:21 AEST 1984


< 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

 



More information about the Comp.unix.wizards mailing list