From b36581fba096e7ca83c21476e53a03a1faead9ad Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 2 May 2001 13:41:46 +0000 Subject: [PATCH] (sh-prev-line): Look for sh-heredoc-face rather than font-lock-string-face. (sh-get-indent-info): Treat heredocs like strings. --- lisp/ChangeLog | 14 ++++++++++---- lisp/progmodes/sh-script.el | 13 ++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 196b3927c88..39d03f53866 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,17 @@ +2001-05-02 Stefan Monnier + + * progmodes/sh-script.el (sh-prev-line): Look for sh-heredoc-face + rather than font-lock-string-face. + (sh-get-indent-info): Treat heredocs like strings. + 2001-05-02 Gerd Moellmann - * textmodes/texinfmt.el (texinfo-format-parse-args): Don't - consume a newline following `}'. + * textmodes/texinfmt.el (texinfo-format-parse-args): Don't consume + a newline following `}'. (texinfo-format-email): New function. (toplevel): Use texinfo-format-email for @email. - (texinfo-format-kbd-regexp, texinfo-format-kbd-end-regexp): Add - `display'. + (texinfo-format-kbd-regexp, texinfo-format-kbd-end-regexp): + Add `display'. (texinfo-sort-region): Goto point-min before sorting. (texinfo-set): Remove leading white space from value. From yagi@is.titech.ac.jp. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 358b1fd22a5..80d49ea5e43 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1917,8 +1917,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 - ((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 @@ we go to the end of the previous line and do not check for continuations." (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 @@ This is always added to the end of the buffer." 4 " ( " 6 " )" 15 '< - 16 "end" - ) + 16 "end") (es eval sh-modify rc 4 " = ") (rc eval sh-modify sh @@ -3350,7 +3349,7 @@ t means to return a list of all possible completions of STRING. 3 "while( " 5 " )" 10 '< - 11 "end" ) + 11 "end") (es eval sh-modify sh 3 "while { " 5 " } {" -- 2.39.5