all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cperl-mode: how to turn off autoinsertion of everything?
@ 2016-03-09 18:33 David Storrs
  2016-03-10  7:06 ` tomas
  2016-03-10 15:09 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: David Storrs @ 2016-03-09 18:33 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using GNU Emacs 24.5.1 on OSX 10.11.3.  I recently upgraded emacs from
v22 and now cperl-mode is behaving differently -- it's "helpfully"
inserting things like braces and newlines when it thinks it should.  I
would like to make it stop doing this -- I don't want it modifying my text
at all.  Don't insert braces, newlines, anything.

After a surprising amount of googling I figured out how to turn off
everything except the newline insertion, but now I'm stumped.  How do I
tell emacs "Don't mess with my source -- if I want something there I'll
type it"?

Pointers to an appropriate section of the FM welcome, as I haven't been
able to find anything relevant.

Dave


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cperl-mode: how to turn off autoinsertion of everything?
  2016-03-09 18:33 cperl-mode: how to turn off autoinsertion of everything? David Storrs
@ 2016-03-10  7:06 ` tomas
  2016-03-10 15:12   ` Drew Adams
  2016-03-10 15:09 ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: tomas @ 2016-03-10  7:06 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Mar 09, 2016 at 10:33:39AM -0800, David Storrs wrote:
> I'm using GNU Emacs 24.5.1 on OSX 10.11.3.  I recently upgraded emacs from
> v22 and now cperl-mode is behaving differently -- it's "helpfully"
> inserting things like braces and newlines when it thinks it should.  I
> would like to make it stop doing this -- I don't want it modifying my text
> at all.  Don't insert braces, newlines, anything.
> 
> After a surprising amount of googling I figured out how to turn off
> everything except the newline insertion, but now I'm stumped.  How do I
> tell emacs "Don't mess with my source -- if I want something there I'll
> type it"?
> 
> Pointers to an appropriate section of the FM welcome, as I haven't been
> able to find anything relevant.

I'd recommend "customize":

 - type "M-x customize-group <ENTER> cperl <ENTER>"
 - you can now browse through all customization options related to cperl
 - there should be a subgroup "Cperl Autoinsert Details" subgroup where
   all the interesting variables reside.

(you can go straight to this customization group, but I'd guess the
landscape around that might be interesting for you).

If you "save the settings for future sessions" they'll end up as Elisp
code in your init file[1]. Look there to see how all those variables
are named and how you'd do that from Elisp.

[1] Usually. In the newer Emacsen there's one setting to tell
  Emacs to put those customizations in a separate file which
  is then included from the init file proper, which I think
  is a good idea.

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlbhHQ0ACgkQBcgs9XrR2kby5QCfc8xiRnHewPog+CpBOgMB9qvO
y2UAn0rqZ1eAZaASSfjqiCyKYPVgSMv8
=blFJ
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cperl-mode: how to turn off autoinsertion of everything?
  2016-03-09 18:33 cperl-mode: how to turn off autoinsertion of everything? David Storrs
  2016-03-10  7:06 ` tomas
@ 2016-03-10 15:09 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2016-03-10 15:09 UTC (permalink / raw)
  To: help-gnu-emacs

> I'm using GNU Emacs 24.5.1 on OSX 10.11.3.  I recently upgraded emacs from
> v22 and now cperl-mode is behaving differently -- it's "helpfully"
> inserting things like braces and newlines when it thinks it should.

I tried "emacs-24.5 -Q ~/tmp/foo.perl -f cperl-mode" and then started editing
the file, and it doesn't insert anything like braces and newlines
for me.  All it does in this category is auto-insert/remove spaces to
indent lines when I hit RET.

So the behavior you describe is not part of Emacs's default behavior and
is instead due to some local configuration.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: cperl-mode: how to turn off autoinsertion of everything?
  2016-03-10  7:06 ` tomas
@ 2016-03-10 15:12   ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2016-03-10 15:12 UTC (permalink / raw)
  To: tomas, help-gnu-emacs

> In the newer Emacsen there's one setting to tell
> Emacs to put those customizations in a separate file which
> is then included from the init file proper, which I think
> is a good idea.

Yes, it is a good idea.  But it is not something special for
"the newer Emacsen".  It has always been there, at least as
far back as Emacs 20.  The variable is `custom-file'.

And your `custom-file' is not included automatically from
your init file.  You must explicitly load it - from your
init file or somewhere else.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-10 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 18:33 cperl-mode: how to turn off autoinsertion of everything? David Storrs
2016-03-10  7:06 ` tomas
2016-03-10 15:12   ` Drew Adams
2016-03-10 15:09 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.