GNU bug report logs - #6916
Fwd: [PATCH] fix indent bug in sh-script

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dan.colascione <at> gmail.com>

Date: Thu, 26 Aug 2010 05:16:02 UTC

Severity: normal

Tags: patch

Merged with 9193

Found in version 23.3

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6916 in the body.
You can then email your comments to 6916 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6916; Package emacs. (Thu, 26 Aug 2010 05:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dan.colascione <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Aug 2010 05:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dan.colascione <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Fwd: [PATCH] fix indent bug in sh-script
Date: Wed, 25 Aug 2010 22:16:55 -0700
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)





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6916; Package emacs. (Thu, 26 Aug 2010 15:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 6916 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Daniel Colascione <dan.colascione <at> gmail.com>
Cc: 6916 <at> debbugs.gnu.org
Subject: Re: bug#6916: Fwd: [PATCH] fix indent bug in sh-script
Date: Thu, 26 Aug 2010 11:26:41 -0400
Daniel Colascione <dan.colascione <at> gmail.com> writes:

> 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.

Thanks, applied.




bug closed, send any further explanations to Daniel Colascione <dan.colascione <at> gmail.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Thu, 26 Aug 2010 15:26:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Sep 2010 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 06 Aug 2011 22:06:02 GMT) Full text and rfc822 format available.

Forcibly Merged 6916 9193. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 06 Aug 2011 22:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Sep 2011 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.