From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9333: 23.3; shell script mode: "<<" starts here doc even on comment line Date: Mon, 22 Aug 2011 18:11:30 -0400 Message-ID: References: <20110819.165240.490214280.furue@hawaii.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314051110 7056 80.91.229.12 (22 Aug 2011 22:11:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Aug 2011 22:11:50 +0000 (UTC) Cc: 9333-done@debbugs.gnu.org To: Ryo Furue Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 23 00:11:46 2011 Return-path: Envelope-to: geb-bug-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 1Qvcie-0001cB-Ew for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Aug 2011 00:11:44 +0200 Original-Received: from localhost ([::1]:41118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qvcid-0002Ps-Mj for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Aug 2011 18:11:43 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qvcia-0002PX-AL for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2011 18:11:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvciZ-00005d-2m for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2011 18:11:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvciY-00005Y-WC for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2011 18:11:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qvcks-0002sL-Sa for bug-gnu-emacs@gnu.org; Mon, 22 Aug 2011 18:14:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Aug 2011 22:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 9333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 9333@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by 9333-done@debbugs.gnu.org id=D9333.131405123711030 (code D ref 9333); Mon, 22 Aug 2011 22:14:02 +0000 Original-Received: (at 9333-done) by debbugs.gnu.org; 22 Aug 2011 22:13:57 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvckn-0002rr-Ez for submit@debbugs.gnu.org; Mon, 22 Aug 2011 18:13:57 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvckl-0002rh-9w for 9333-done@debbugs.gnu.org; Mon, 22 Aug 2011 18:13:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAMDSUk5Ld+HZ/2dsb2JhbABBDqgKeIFAAQEFViMFCws0EhQYDSQTvWqGSASfcYNiVA X-IronPort-AV: E=Sophos;i="4.68,266,1312171200"; d="scan'208";a="132246526" Original-Received: from 75-119-225-217.dsl.teksavvy.com (HELO ceviche.home) ([75.119.225.217]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 22 Aug 2011 18:11:30 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 416336610A; Mon, 22 Aug 2011 18:11:30 -0400 (EDT) In-Reply-To: <20110819.165240.490214280.furue@hawaii.edu> (Ryo Furue's message of "Fri, 19 Aug 2011 16:52:40 -1000 (HST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 22 Aug 2011 18:14:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50229 Archived-At: > In the shell-script mode, typing "<<" on a comment line starts > a here document. I use "<< . . ." in comments as a personal > style in many computer languages including shell. I've installed the patch below which should fix this issue. Stefan === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-22 21:16:46 +0000 +++ lisp/ChangeLog 2011-08-22 22:09:55 +0000 @@ -1,5 +1,8 @@ 2011-08-22 Stefan Monnier + * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in + strings and comments (bug#9333). + * emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures (bug#9120). === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-08-04 00:58:07 +0000 +++ lisp/progmodes/sh-script.el 2011-08-22 22:08:26 +0000 @@ -460,6 +460,7 @@ (define-key map "\C-c+" 'sh-add) (define-key map "\C-\M-x" 'sh-execute-region) (define-key map "\C-c\C-x" 'executable-interpret) + ;; FIXME: Use post-self-insert-hook. (define-key map "<" 'sh-maybe-here-document) (define-key map "(" 'skeleton-pair-insert-maybe) (define-key map "{" 'skeleton-pair-insert-maybe) @@ -3659,6 +3660,7 @@ (save-excursion (backward-char 2) (sh-quoted-p)) + (nth 8 (syntax-ppss)) (let ((tabs (if (string-match "\\`-" sh-here-document-word) (make-string (/ (current-indentation) tab-width) ?\t) ""))