From unknown Wed Jun 25 09:13:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( )) Resent-From: John Schoenick Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Oct 2012 23:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12770 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12770@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135164092222541 (code B ref -1); Tue, 30 Oct 2012 23:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2012 23:48:42 +0000 Received: from localhost ([127.0.0.1]:40289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTLY1-0005rW-Cv for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:48:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43426) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTKpx-0004rm-HK for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTKnR-0003cU-Sd for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:00:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnR-0003cQ-PQ for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:00:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnQ-0004q9-Ls for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTKnP-0003bQ-6e for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:32 -0400 Received: from mx1.corp.phx1.mozilla.com ([63.245.216.69]:48442 helo=smtp.mozilla.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnO-0003X6-VY for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:31 -0400 Received: from [10.250.1.17] (unknown [63.245.220.240]) (Authenticated sender: jschoenick@mozilla.com) by mx1.mail.corp.phx1.mozilla.com (Postfix) with ESMTPSA id 0F005F26D1 for ; Tue, 30 Oct 2012 16:00:16 -0700 (PDT) Message-ID: <50905C00.8050208@mozilla.com> Date: Tue, 30 Oct 2012 16:00:16 -0700 From: John Schoenick User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/19.0 Thunderbird/19.0a1 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Mailman-Approved-At: Tue, 30 Oct 2012 19:48:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) The following, in a sh-mode buffer of shell-type bash: echo -n $(( 5 << 2 )) Will result in the remainder of the document being mis-interpreted as a here-document and mis-highlighted until a line containing a single 2 is encountered. The equivalent: let "r = 5 << 2" echo -n $r Is handled properly. - John In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4) of 2012-08-28 on shaun Windowing system distributor `The X.Org Foundation', version 11.0.11300000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Shell-script Minor modes in effect: global-auto-complete-mode: t auto-complete-mode: t global-linum-mode: t linum-mode: t global-hl-line-mode: t shell-dirtrack-mode: t iswitchb-mode: t global-auto-revert-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow sort mail-extr emacsbug message idna rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader apropos skeleton sh-script executable help-mode view misearch multi-isearch re-builder rect js json imenu thingatpt newcomment cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode vc-git server auto-complete-clang auto-complete-config auto-complete popup multi-term warnings term disp-table ehelp electric linum color-theme wid-edit cl sendmail rfc2047 rfc2045 ietf-drums mail-utils reporter hl-line tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv macroexp gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ansi-color ring format-spec advice help-fns advice-preload tramp-loaddefs regexp-opt iswitchb fill-column-indicator easy-mmode edmacro kmacro speedbar sb-image ezimage dframe easymenu assoc ido time-date autorevert tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 19:57:18 2012 Received: (at control) by debbugs.gnu.org; 30 Oct 2012 23:57:18 +0000 Received: from localhost ([127.0.0.1]:40296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTLgL-000640-V5 for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:57:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:36333) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTLgJ-00063t-Dn for control@debbugs.gnu.org; Tue, 30 Oct 2012 19:57:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TTLdo-0005F9-WA for control@debbugs.gnu.org; Tue, 30 Oct 2012 19:54:41 -0400 Date: Tue, 30 Oct 2012 19:54:40 -0400 Message-Id: Subject: control message for bug 12770 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) forcemerge 11263 12770 From unknown Wed Jun 25 09:13:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: John Schoenick Subject: bug#12770: closed (Re: bug#12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( ))) Message-ID: References: <50905C00.8050208@mozilla.com> X-Gnu-PR-Message: they-closed 12770 X-Gnu-PR-Package: emacs Reply-To: 12770@debbugs.gnu.org Date: Wed, 31 Oct 2012 02:50:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1351651803-9058-1" This is a multi-part message in MIME format... ------------=_1351651803-9058-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-= document inside arithmetic expansion $(( )) which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12770@debbugs.gnu.org. --=20 12770: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12770 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1351651803-9058-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12770-done) by debbugs.gnu.org; 31 Oct 2012 02:49:54 +0000 Received: from localhost ([127.0.0.1]:40385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTONO-0002Lj-AI for submit@debbugs.gnu.org; Tue, 30 Oct 2012 22:49:54 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3067) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTONL-0002Lb-8K for 12770-done@debbugs.gnu.org; Tue, 30 Oct 2012 22:49:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIWAQVWIwULCzQHCxQYDSSIIboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203199698" Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Oct 2012 22:47:15 -0400 Received: by pastel.home (Postfix, from userid 20848) id 103C359419; Tue, 30 Oct 2012 22:47:14 -0400 (EDT) From: Stefan Monnier To: John Schoenick Subject: Re: bug#12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( )) Message-ID: References: <50905C00.8050208@mozilla.com> Date: Tue, 30 Oct 2012 22:47:14 -0400 In-Reply-To: <50905C00.8050208@mozilla.com> (John Schoenick's message of "Tue, 30 Oct 2012 16:00:16 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12770-done Cc: 12770-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > The following, in a sh-mode buffer of shell-type bash: > echo -n $(( 5 << 2 )) > Will result in the remainder of the document being mis-interpreted I've just installed a change which seems to fix this problem. Stefan ------------=_1351651803-9058-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Oct 2012 23:48:42 +0000 Received: from localhost ([127.0.0.1]:40289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTLY1-0005rW-Cv for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:48:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43426) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTKpx-0004rm-HK for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTKnR-0003cU-Sd for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:00:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnR-0003cQ-PQ for submit@debbugs.gnu.org; Tue, 30 Oct 2012 19:00:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnQ-0004q9-Ls for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTKnP-0003bQ-6e for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:32 -0400 Received: from mx1.corp.phx1.mozilla.com ([63.245.216.69]:48442 helo=smtp.mozilla.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTKnO-0003X6-VY for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2012 19:00:31 -0400 Received: from [10.250.1.17] (unknown [63.245.220.240]) (Authenticated sender: jschoenick@mozilla.com) by mx1.mail.corp.phx1.mozilla.com (Postfix) with ESMTPSA id 0F005F26D1 for ; Tue, 30 Oct 2012 16:00:16 -0700 (PDT) Message-ID: <50905C00.8050208@mozilla.com> Date: Tue, 30 Oct 2012 16:00:16 -0700 From: John Schoenick User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/19.0 Thunderbird/19.0a1 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( )) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 30 Oct 2012 19:48:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) The following, in a sh-mode buffer of shell-type bash: echo -n $(( 5 << 2 )) Will result in the remainder of the document being mis-interpreted as a here-document and mis-highlighted until a line containing a single 2 is encountered. The equivalent: let "r = 5 << 2" echo -n $r Is handled properly. - John In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.4) of 2012-08-28 on shaun Windowing system distributor `The X.Org Foundation', version 11.0.11300000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Shell-script Minor modes in effect: global-auto-complete-mode: t auto-complete-mode: t global-linum-mode: t linum-mode: t global-hl-line-mode: t shell-dirtrack-mode: t iswitchb-mode: t global-auto-revert-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow sort mail-extr emacsbug message idna rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader apropos skeleton sh-script executable help-mode view misearch multi-isearch re-builder rect js json imenu thingatpt newcomment cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode vc-git server auto-complete-clang auto-complete-config auto-complete popup multi-term warnings term disp-table ehelp electric linum color-theme wid-edit cl sendmail rfc2047 rfc2045 ietf-drums mail-utils reporter hl-line tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv macroexp gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ansi-color ring format-spec advice help-fns advice-preload tramp-loaddefs regexp-opt iswitchb fill-column-indicator easy-mmode edmacro kmacro speedbar sb-image ezimage dframe easymenu assoc ido time-date autorevert tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) ------------=_1351651803-9058-1-- From unknown Wed Jun 25 09:13:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vincent Lefevre Subject: bug#11263: closed (Re: bug#12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( ))) Message-ID: References: <87r4vmy7un.fsf@ypig.lip.ens-lyon.fr> X-Gnu-PR-Message: they-closed 11263 X-Gnu-PR-Package: emacs Reply-To: 11263@debbugs.gnu.org Date: Wed, 31 Oct 2012 02:50:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1351651803-9058-3" This is a multi-part message in MIME format... ------------=_1351651803-9058-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12770: 23.4; shell-script: << does not always mean here-document which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11263@debbugs.gnu.org. --=20 12770: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12770 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1351651803-9058-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12770-done) by debbugs.gnu.org; 31 Oct 2012 02:49:54 +0000 Received: from localhost ([127.0.0.1]:40385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTONO-0002Lj-AI for submit@debbugs.gnu.org; Tue, 30 Oct 2012 22:49:54 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3067) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TTONL-0002Lb-8K for 12770-done@debbugs.gnu.org; Tue, 30 Oct 2012 22:49:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0/O+LET/2dsb2JhbABEtBGBCIIWAQVWIwULCzQHCxQYDSSIIboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="203199698" Received: from 206-248-177-19.dsl.teksavvy.com (HELO pastel.home) ([206.248.177.19]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Oct 2012 22:47:15 -0400 Received: by pastel.home (Postfix, from userid 20848) id 103C359419; Tue, 30 Oct 2012 22:47:14 -0400 (EDT) From: Stefan Monnier To: John Schoenick Subject: Re: bug#12770: 24.2.1; sh-mode parsing - bitwise leftshift misinterpreted as here-document inside arithmetic expansion $(( )) Message-ID: References: <50905C00.8050208@mozilla.com> Date: Tue, 30 Oct 2012 22:47:14 -0400 In-Reply-To: <50905C00.8050208@mozilla.com> (John Schoenick's message of "Tue, 30 Oct 2012 16:00:16 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12770-done Cc: 12770-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > The following, in a sh-mode buffer of shell-type bash: > echo -n $(( 5 << 2 )) > Will result in the remainder of the document being mis-interpreted I've just installed a change which seems to fix this problem. Stefan ------------=_1351651803-9058-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Apr 2012 10:24:43 +0000 Received: from localhost ([127.0.0.1]:37820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SK5aR-0007mv-O3 for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:24:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59104) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SK5aL-0007mg-RX for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:24:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SK5a3-0004K5-0f for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:24:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5a2-0004Js-UC for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:24:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5Zx-0001RP-B7 for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2012 06:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SK5Zr-0004G5-OG for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2012 06:24:08 -0400 Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:50846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5Zr-0004FM-DK for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2012 06:24:03 -0400 Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.77) (envelope-from ) id 1SK5Zo-0003RK-DI for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2012 12:24:00 +0200 From: Vincent Lefevre To: bug-gnu-emacs@gnu.org Subject: 23.4; shell-script: << does not always mean here-document Date: Tue, 17 Apr 2012 12:24:00 +0200 Message-ID: <87r4vmy7un.fsf@ypig.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) When I type << in shell-script mode, Emacs thinks this begins a here-document. This is not always the case, e.g. in the following lines: foo='bar<<' echo "${foo%<<}" echo $((1<<8)) And specifically for zsh: echo $[1<<8] In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-07 on trouble, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11104000 configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: POSIX value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: en_DK value of $LANG: POSIX value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t Recent messages: Loading /etc/emacs/site-start.d/50latex-cjk-common.el (source)...done Loading /etc/emacs/site-start.d/50latex-cjk-thai.el (source)...done Loading /etc/emacs/site-start.d/50ledger.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/50rnc-mode.el (source)...done Loading /etc/emacs/site-start.d/50thailatex.el (source)...done Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done Loading /home/vlefevre/share/emacs/site-lisp/mutteditor.el (source)...done Loading time...done For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode /usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo /usr/share/emacs23/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode /usr/share/emacs23/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config /usr/share/emacs23/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/23.4/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs23/site-lisp/flim/sha1 hides /usr/share/emacs/23.4/lisp/sha1 /usr/share/emacs23/site-lisp/flim/hex-util hides /usr/share/emacs/23.4/lisp/hex-util /usr/share/emacs23/site-lisp/flim/md4 hides /usr/share/emacs/23.4/lisp/md4 /usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/23.4/lisp/tempo /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/23.4/lisp/textmodes/css-mode /usr/share/emacs23/site-lisp/flim/hmac-md5 hides /usr/share/emacs/23.4/lisp/net/hmac-md5 /usr/share/emacs23/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/23.4/lisp/net/sasl-ntlm /usr/share/emacs23/site-lisp/flim/ntlm hides /usr/share/emacs/23.4/lisp/net/ntlm /usr/share/emacs23/site-lisp/flim/sasl hides /usr/share/emacs/23.4/lisp/net/sasl /usr/share/emacs23/site-lisp/flim/sasl-cram hides /usr/share/emacs/23.4/lisp/net/sasl-cram /usr/share/emacs23/site-lisp/flim/sasl-digest hides /usr/share/emacs/23.4/lisp/net/sasl-digest /usr/share/emacs23/site-lisp/flim/hmac-def hides /usr/share/emacs/23.4/lisp/net/hmac-def /usr/share/emacs23/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/23.4/lisp/language/thai-word Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 sha1-el hex-util hashcash mail-utils warnings emacsbug time cus-start cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt w3m-load tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) ------------=_1351651803-9058-3--