From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#6916: Fwd: [PATCH] fix indent bug in sh-script Date: Wed, 25 Aug 2010 22:16:55 -0700 Message-ID: <4C75F8C7.4060201@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282801210 24266 80.91.229.12 (26 Aug 2010 05:40:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 05:40:10 +0000 (UTC) To: 6916@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 26 07:40:09 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OoVC3-0001S2-FT for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 07:40:07 +0200 Original-Received: from localhost ([127.0.0.1]:44872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoVC2-0007pG-QY for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 01:40:06 -0400 Original-Received: from [140.186.70.92] (port=45562 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoVBM-0007T6-9f for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:39:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoVBL-0001gf-2E for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:39:24 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38316) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoVBK-0001gZ-UB for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:39:23 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OoUok-0006Mt-NF; Thu, 26 Aug 2010 01:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2010 05:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6916 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.128279974224469 (code B ref -1); Thu, 26 Aug 2010 05:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Aug 2010 05:15:42 +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 1OoUoP-0006Mc-BK for submit@debbugs.gnu.org; Thu, 26 Aug 2010 01:15:41 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoUoN-0006MX-EE for submit@debbugs.gnu.org; Thu, 26 Aug 2010 01:15:40 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:55163) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OoUpj-0008Rx-IA for submit@debbugs.gnu.org; Thu, 26 Aug 2010 01:17:03 -0400 Original-Received: from [140.186.70.92] (port=54887 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoUph-0002ei-CY for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:17:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoUpg-0007H0-16 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:17:01 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:39941) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoUpf-0007Gr-V1 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 01:17:00 -0400 Original-Received: by ywo7 with SMTP id 7so714891ywo.0 for ; Wed, 25 Aug 2010 22:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=wzfbTvBr1EbRhTQu3wWgne2jM04RZJBPpstuWlGV0LU=; b=qwzZ2pr+3VVdGdKDwTInLTqn1/I3+lMklN7JWhQb8UkPwt9Cxp8KGnTtQB3VOznZU3 DpdFr1pLfL9avJmTsepGd6oKQWwVS4rCIKUSFcVt4ENqlxSrJVSeI4yh619KLEffhsRW +jUyXhkc1VtYMo6YAZSNSyI57a7KWUF3N1EE0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=j3ATEgpXKdvqoTFmvt5vLBTj6oTKGMAwuJJ1EGXCrr/K6wOqlhTNTwsMBLXQV7UH67 w2uS6eFf1+kMZ5red9JUQv+JoF7aE55j0tNrevOK8NRc1fdnFBeWtkl/A6WLQLBD+Raz lt9aGnR1/sLVoAFb3H0dgYlNOmz3u54S47Wis= Original-Received: by 10.151.62.9 with SMTP id p9mr9908371ybk.122.1282799818559; Wed, 25 Aug 2010 22:16:58 -0700 (PDT) Original-Received: from edith.local (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id g31sm2100679ibh.10.2010.08.25.22.16.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Aug 2010 22:16:57 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 26 Aug 2010 01:16:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39755 Archived-At: Modes should not inspect font-lock-controlled properties to control indentation. This patch fixes one such problem in sh-script that caused newline-and-indent to malfunction when invoked at the end of a line ending in a string delimiter. diff --git a/override/sh-script.el b/override/sh-script.el index 610fa14..94973f0 100644 --- a/override/sh-script.el +++ b/override/sh-script.el @@ -2233,10 +2233,9 @@ STRING This is ignored for the purposes of calculating ;; Note: setting result to t means we are done and will return nil. ;;(This function never returns just t.) (cond - ((or (and (boundp 'font-lock-string-face) (not (bobp)) - (eq (get-text-property (1- (point)) 'face) - font-lock-string-face)) + ((or (nth 3 (syntax-ppss (point))) (eq (get-text-property (point) 'face) sh-heredoc-face)) + ;; String continuation -- don't indent (setq result t)