From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help,gmane.emacs.bugs Subject: Re: how to map sh-mode to mean bash-mode Date: Mon, 18 Jul 2011 07:52:04 +0200 Message-ID: <4E23CA04.3000007@easy-emacs.de> References: <4E232057.1040409@easy-emacs.de> <871uxovdtu.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310968449 10243 80.91.229.12 (18 Jul 2011 05:54:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2011 05:54:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, bug-gnu-emacs@gnu.org To: jidanni@jidanni.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 18 07:54:01 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QigmG-0003o5-A7 for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Jul 2011 07:54:00 +0200 Original-Received: from localhost ([::1]:38611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QigmF-0000ii-I1 for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Jul 2011 01:53:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:32977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qigkb-0000iM-Np for help-gnu-emacs@gnu.org; Mon, 18 Jul 2011 01:52:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qigka-00077u-3E for help-gnu-emacs@gnu.org; Mon, 18 Jul 2011 01:52:17 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:61810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QigkZ-00077k-FO; Mon, 18 Jul 2011 01:52:15 -0400 Original-Received: from [192.168.178.27] (brln-4db9dfc7.pool.mediaWays.net [77.185.223.199]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MhPzK-1R45Fp2NT0-00MYN1; Mon, 18 Jul 2011 07:52:11 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 In-Reply-To: <871uxovdtu.fsf@jidanni.org> X-Provags-ID: V02:K0:rAJRIVndjvreeUPveZTh1ZSFO/VavEseLhnJ8Dq/5pP W9betD3e6xw7heTavIGo9ePM8e6GS+4yauD721UKL0Nb29Q0ML PcpmKB07wplvkVP0MxU5SiUWnXSHFYddks/qhOkXJtE/80M58r 0E25orixSddKvtaqK3jYOKJNgXkA00brSBkmM0kXuezPcUP2Wu rq1Lj1a0Q7NLXTSAG+mpXBna1NL5BwSiku2nmm8Y4c= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.187 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81641 gmane.emacs.bugs:49380 Archived-At: Am 17.07.2011 22:42, schrieb jidanni@jidanni.org: > Dear bug-gnu-emacs, > There is no way to map sh-mode to bash-mode. Again: AFAIK there no such thing like `bash-mode' in Emacs. There is a `sh-mode' dealing with several kind of shells. If `sh-mode' thinks you are dealing with a bash -- by shebang or suffix-- it provides for it. An alias is called `shell-script-mode' See C-h f shell-script-mode RET for what it does. > As you know, the bash shell likes to call itself sh sometimes. Didn't know that. Curious to read an example. > But it is really still bash. Well, bash might use a sh as a subset. Don't know that architecture. > Hence I would like to make my emacs assume anything it thinks is sh is > really bash, and thus show me "bash" in the mode line, not "sh", no > matter how smart it thinks it is. Could you deliver an example of usage for that? If you send code written for a bash to a simple sh - some may work, others will fail. You are surely implementing bugs then. See also > http://lists.gnu.org/archive/html/help-gnu-emacs/2011-07/msg00143.html > However the real solution should be a one liner of lisp in ones .emacs. > What's great about a one-liner? Usually they are hard to read.