# HG changeset patch # User Chong Yidong # Date 1282836393 14400 # Node ID d6074fc765a0b26f703a255876589d72d907e3d5 # Parent c3bbd8f2439ed035e3689aba36f9e12706fa1b08 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). diff -r c3bbd8f2439e -r d6074fc765a0 lisp/ChangeLog --- a/lisp/ChangeLog Thu Aug 26 09:46:19 2010 -0400 +++ b/lisp/ChangeLog Thu Aug 26 11:26:33 2010 -0400 @@ -1,3 +1,8 @@ +2010-08-26 Daniel Colascione + + * progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss + instead of inspecting font-lock properties (Bug#6916). + 2010-08-26 David Reitter * server.el (server-visit-files): Run pre-command-hook and diff -r c3bbd8f2439e -r d6074fc765a0 lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Thu Aug 26 09:46:19 2010 -0400 +++ b/lisp/progmodes/sh-script.el Thu Aug 26 11:26:33 2010 -0400 @@ -2207,10 +2207,9 @@ ;; 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 "#")