summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDaniel Colascione <dan.colascione@gmail.com>2010-08-26 11:26:33 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-08-26 11:26:33 -0400
commit88a36e604acbcb7093cb271ebf7b3ebed4d750ef (patch)
treea3c4bd88c04e2029c4cda59992cbfa36581f9a98 /lisp/progmodes
parent38dbc4d81a2c4a707b04f2cae8bf9272763f34fb (diff)
downloademacs-88a36e604acbcb7093cb271ebf7b3ebed4d750ef.tar.gz
Avoid using font-lock properties to indent in sh-get-indent-info.
* progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss instead of inspecting font-lock properties (Bug#6916).
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/sh-script.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 5f4028af89a..9041bd50259 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2207,10 +2207,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)
(setq have-result t))
((looking-at "\\s-*#") ; was (equal this-kw "#")