changeset 37542:51f2e2a0c455

(sh-prev-line): Look for sh-heredoc-face rather than font-lock-string-face. (sh-get-indent-info): Treat heredocs like strings.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 02 May 2001 13:40:56 +0000
parents d34f1c4da441
children b54a861e38de
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Wed May 02 13:20:15 2001 +0000
+++ b/lisp/progmodes/sh-script.el	Wed May 02 13:40:56 2001 +0000
@@ -1917,8 +1917,9 @@
       ;; Note: setting result to t means we are done and will return nil.
       ;;(This function never returns just t.)
       (cond
-       ((and (boundp 'font-lock-string-face)
-	     (equal (get-text-property (point) 'face) font-lock-string-face))
+       ((or (and (boundp 'font-lock-string-face)
+		 (eq (get-text-property (point) 'face) font-lock-string-face))
+	    (eq (get-text-property (point) 'face) sh-heredoc-face))
 	(setq result t)
 	(setq have-result t))
        ((looking-at "\\s-*#")		; was (equal this-kw "#")
@@ -2115,9 +2116,8 @@
     (forward-comment (- (point-max)))
     (unless end (beginning-of-line))
     (when (and (not (bobp))
-	       (boundp 'font-lock-string-face)
 	       (equal (get-text-property (1- (point)) 'face)
-		      font-lock-string-face))
+		      sh-heredoc-face))
       (let ((p1 (previous-single-property-change (1- (point)) 'face)))
 	(when p1
 	  (goto-char p1)
@@ -3088,8 +3088,7 @@
        4 " ( "
        6 " )"
        15 '<
-       16 "end"
-       )
+       16 "end")
   (es eval sh-modify rc
       4 " = ")
   (rc eval sh-modify sh
@@ -3350,7 +3349,7 @@
        3 "while( "
        5 " )"
        10 '<
-       11 "end" )
+       11 "end")
   (es eval sh-modify sh
       3 "while { "
       5 " } {"