Subject: Re: bug#20959: Switching script mode to rpm puts nonsense on the first line

From: Petr Hracek <[email-masked]>
Date: Fri, 17 Jul 2015 14:04:01 +0200

On 07/02/2015 05:53 PM, Glenn Morris wrote:
> Petr Hracek wrote:
>
>> Reproducer is:
>> 1) shell-script-mode
>> 2) 'sh-set-shell' 'rpm'
>>
>> then on the first line is #!/usr/bin/rpm which doe not make sense.
>> https://bugzilla.redhat.com/show_bug.cgi?id=1030391#c6
>>
>> Did you discover it?
> That's what the command is documented to do.
>
> I assume it's being called for the effect of "switching the buffer to
> the rpm dialect of sh-mode". To do that, you can call it like
>
> M-: (sh-set-shell "rpm" nil nil)
>
> (which isn't much more typing).
>
> Perhaps C-u M-x sh-set-shell could mean that.
>
> The alternative would be a hard-coded list of interpreters that aren't
> really shells (I think rpm is the only one sh-mode handles?).
Yeah hard-coded list of interpreters that aren't really shells would be 
great.

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: [email-masked]