bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Daniel Colascione
Subject: bug#6916: Fwd: [PATCH] fix indent bug in sh-script
Date: Wed, 25 Aug 2010 22:16:55 -0700
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

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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]