[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xemacs is ignoring my tab key




On 26 Feb 1997, James LewisMoss wrote:

> >>>>> "Harmon" == Harmon Sequoya Nine <hnine@nine.agn.net> writes:
> 
>  Harmon> Just ran xemacs and was using it to edit a C++ program.
>  Harmon> Unfortunately, when I try to indent using my "tab" key,
>  Harmon> xemacs totally ignores it.  I've looked through "Learning GNU
>  Harmon> emacs" but to no avail.
> 
>  Harmon> Also, I tried to change the tab settings using the ESC-x
>  Harmon> edit-tab-stops so that my tabs are every 4 characters, but
>  Harmon> after doing so, the tabs that are already in my C++ source
>  Harmon> remain at every 8 characters.
> 
>  Harmon> Any info you can give me on this will be greatly appreciated.
> 
> Try this little bit of code:
> (setq-default tab-width 4)
> ;; this stops insertion of tabs completely so only uncomment if you
> ;; like that (which many people don't, but I do :)
> ;; (setq-default indent-tabs-mode nil)
> (progn 
>   (setq count 120)
>   (setq tab-stops '())
>   (while (> count 0)
>     (setq tab-stops (cons count tab-stops))
>     (setq count (- count 4))))
This might work to a limited extent, but one begs to ask the question,
have you set your mode to C++? A quick meta-x c++-mode will probably solve
your problems. This is covered in the Gnu Emacs manual, btw. Not only does
the mode give you proper indentation, but also proper highlighting of
code, electric this and that... etc.

> 
> As to <tab> not indenting do C-h k <tab> and see if it says something
> like 'indent-line'.  If not your keymap is messed up for one reason or
> another.
Yeah, but the person said he could tab if he set the tab stops. My guess
is he's in scratch editing in fundemental.

> 
> Try this:
> (setq-default c-tab-always-indent t)
> 
> Another thing to look for when you are having problems like this is to
> do C-h a <word>.  This will give a listing of all functions and
> variables that contain <word>.  Helps me greatly when something is
> working the way I expect.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: