[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fix indent bug in sh-script
From: |
Daniel Colascione |
Subject: |
[PATCH] fix indent bug in sh-script |
Date: |
Sun, 22 Aug 2010 16:39:08 -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 |
One of my pet peeves is that modes should not allow the tail wag the dog
by inspecting 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] fix indent bug in sh-script,
Daniel Colascione <=