aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Colascione2010-08-26 11:26:33 -0400
committerChong Yidong2010-08-26 11:26:33 -0400
commit88a36e604acbcb7093cb271ebf7b3ebed4d750ef (patch)
treea3c4bd88c04e2029c4cda59992cbfa36581f9a98
parent38dbc4d81a2c4a707b04f2cae8bf9272763f34fb (diff)
downloademacs-88a36e604acbcb7093cb271ebf7b3ebed4d750ef.tar.gz
emacs-88a36e604acbcb7093cb271ebf7b3ebed4d750ef.zip
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).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/sh-script.el5
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 78e5c32beb0..dd96803195f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-08-26 Daniel Colascione <dan.colascione@gmail.com>
2
3 * progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss
4 instead of inspecting font-lock properties (Bug#6916).
5
12010-08-26 David Reitter <david.reitter@gmail.com> 62010-08-26 David Reitter <david.reitter@gmail.com>
2 7
3 * server.el (server-visit-files): Run pre-command-hook and 8 * server.el (server-visit-files): Run pre-command-hook and
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
2207 ;; Note: setting result to t means we are done and will return nil. 2207 ;; Note: setting result to t means we are done and will return nil.
2208 ;;(This function never returns just t.) 2208 ;;(This function never returns just t.)
2209 (cond 2209 (cond
2210 ((or (and (boundp 'font-lock-string-face) (not (bobp)) 2210 ((or (nth 3 (syntax-ppss (point)))
2211 (eq (get-text-property (1- (point)) 'face)
2212 font-lock-string-face))
2213 (eq (get-text-property (point) 'face) sh-heredoc-face)) 2211 (eq (get-text-property (point) 'face) sh-heredoc-face))
2212 ;; String continuation -- don't indent
2214 (setq result t) 2213 (setq result t)
2215 (setq have-result t)) 2214 (setq have-result t))
2216 ((looking-at "\\s-*#") ; was (equal this-kw "#") 2215 ((looking-at "\\s-*#") ; was (equal this-kw "#")