[Top][All Lists]

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

Re: Turning off sh-electric-here-document-mode?

From: Douglas Lewan
Subject: Re: Turning off sh-electric-here-document-mode?
Date: Wed, 13 May 2020 14:54:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 5/13/20 7:22 AM, Philipp Stephani wrote:
Am Mi., 13. Mai 2020 um 02:51 Uhr schrieb Douglas Lewan <>:
OK. I'm sure I'm missing something obvious here.

I want to turn off sh-electric-here-document-mode, but all the obvious
things seem to fail. I've put every one of the following in my .emacs,
but I still get here-documents in shell-script-mode.

(sh-electric-here-document-mode nil)

(sh-electric-here-document-mode 0)

(sh-electric-here-document-mode -1)


How do I do this? Thanks in advance.

It's a local mode, so all of those will only enable it in whatever
buffer is current while evaluating your ~/.emacs (probably the scratch
buffer). You need to customize sh-mode-hook instead.

Recall that this was emacs version 24.5. Possibly another important detail: It's Debian. (I know Debian does you some "favors"; this may have been yet another one.)

I finally found the following solution

;; Don't give me here-documents by default.
(add-hook 'sh-mode-hook (lambda ()
          (setq sh-electric-here-document-mode nil)
          (sh-electric-here-document-mode 0)))

I don't know if that's a right way of doing it, but it works.

Thanks for the thought. It definitely nudged me in a right direction.

(908) 720 7908

"Lie and deny." It's very popular these days.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]