1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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).
This commit is contained in:
Daniel Colascione 2010-08-26 11:26:33 -04:00 committed by Chong Yidong
parent 38dbc4d81a
commit 88a36e604a
2 changed files with 7 additions and 3 deletions

View file

@ -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 "#")