From 88a36e604acbcb7093cb271ebf7b3ebed4d750ef Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Thu, 26 Aug 2010 11:26:33 -0400 Subject: [PATCH] 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). --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 5 ++--- 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 @@ +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 "#") -- 2.39.2