From: Daniel Colascione Date: Thu, 26 Aug 2010 15:26:33 +0000 (-0400) Subject: Avoid using font-lock properties to indent in sh-get-indent-info. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~231 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88a36e604acbcb7093cb271ebf7b3ebed4d750ef;p=emacs.git 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 --git a/lisp/ChangeLog b/lisp/ChangeLog index 78e5c32beb0..dd96803195f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --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 "#")