* Pressing Space creates a newline and indents my code
@ 2008-05-15 16:20 bsteinex
2008-05-16 2:51 ` Barry Margolin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bsteinex @ 2008-05-15 16:20 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I'm using Emacs 22.2.1. It's been a while since I've used Emacs.
Here's my problem. While working on Javascript I find that if I have a
long line of code, and press the <space> bar, the code gets cut and
placed on a new line, thus invalidating my code.
Ex: While adding code #1 I pressed <space> just before </script>. The
code changed to code #2
#1 - <script language="JavaScript" src="http://www.example.com/js/
ntpagetag.js"></script>
#2 - <script language="JavaScript"
src="http://www.example.com/js/ntpagetag.js"> </script>
Any ideas on how I can stop this from happening? Thank you for your
help.
B
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pressing Space creates a newline and indents my code
2008-05-15 16:20 Pressing Space creates a newline and indents my code bsteinex
@ 2008-05-16 2:51 ` Barry Margolin
2008-05-16 14:26 ` Peter Dyballa
[not found] ` <mailman.11697.1210947970.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Barry Margolin @ 2008-05-16 2:51 UTC (permalink / raw)
To: help-gnu-emacs
In article
<bd6a6188-240c-4fae-b0a0-81d40afb4662@q1g2000prf.googlegroups.com>,
bsteinex <brent.steiner@gmail.com> wrote:
> Hello,
>
> I'm using Emacs 22.2.1. It's been a while since I've used Emacs.
>
> Here's my problem. While working on Javascript I find that if I have a
> long line of code, and press the <space> bar, the code gets cut and
> placed on a new line, thus invalidating my code.
It's not invalid to have newlines in a SCRIPT tag.
>
> Ex: While adding code #1 I pressed <space> just before </script>. The
> code changed to code #2
>
> #1 - <script language="JavaScript" src="http://www.example.com/js/
> ntpagetag.js"></script>
>
> #2 - <script language="JavaScript"
> src="http://www.example.com/js/ntpagetag.js"> </script>
>
> Any ideas on how I can stop this from happening? Thank you for your
> help.
Turn off auto-fill.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Pressing Space creates a newline and indents my code
2008-05-15 16:20 Pressing Space creates a newline and indents my code bsteinex
2008-05-16 2:51 ` Barry Margolin
@ 2008-05-16 14:26 ` Peter Dyballa
[not found] ` <mailman.11697.1210947970.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2008-05-16 14:26 UTC (permalink / raw)
To: bsteinex; +Cc: help-gnu-emacs
Am 15.05.2008 um 18:20 schrieb bsteinex:
> Any ideas on how I can stop this from happening?
Either a file-local variable as in (taken from a LaTeX file where %
is the comment character):
%%% Local Variables:
%%% mode: LaTeX
%%% fill-column: 99999
%%% coding: utf-8-unix
%%% End:
or set fill-column outside the file in ~/.emacs (for all kind of
files) or set it manually when you start to edit or check the mode in
which you are working.
--
Greetings
Pete
There's no place like 127.0.0.1
– origin unknown
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.11697.1210947970.18990.help-gnu-emacs@gnu.org>]
* Re: Pressing Space creates a newline and indents my code
[not found] ` <mailman.11697.1210947970.18990.help-gnu-emacs@gnu.org>
@ 2008-05-16 14:32 ` Sven Joachim
0 siblings, 0 replies; 4+ messages in thread
From: Sven Joachim @ 2008-05-16 14:32 UTC (permalink / raw)
To: help-gnu-emacs
On 2008-05-16 16:26 +0200, Peter Dyballa wrote:
> Am 15.05.2008 um 18:20 schrieb bsteinex:
>
>> Any ideas on how I can stop this from happening?
>
> Either a file-local variable as in (taken from a LaTeX file where % is
> the comment character):
>
> %%% Local Variables:
> %%% mode: LaTeX
> %%% fill-column: 99999
> %%% coding: utf-8-unix
> %%% End:
I would not recommend such a setting, since your paragraphs will turn
into a looooong line when you press M-q. It is better to turn off
auto-fill mode.
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-16 14:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15 16:20 Pressing Space creates a newline and indents my code bsteinex
2008-05-16 2:51 ` Barry Margolin
2008-05-16 14:26 ` Peter Dyballa
[not found] ` <mailman.11697.1210947970.18990.help-gnu-emacs@gnu.org>
2008-05-16 14:32 ` Sven Joachim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).