From 64f8c4bd616e110defc092ca8370739e34bbe183 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 29 Aug 2012 14:33:35 -0400 Subject: [PATCH] * lisp/progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB. Fixes: debbugs:12222 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 31 ++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ef437213a0..0112dad3344 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-29 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB + (bug#12222). + 2012-08-27 Leo Liu * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 2d0cdeaeeae..d9f4678e6a5 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1064,21 +1064,22 @@ subshells can nest." (backward-char 1)) (when (eq (char-before) ?|) (backward-char 1) t))) - (when (progn (backward-char 2) - (if (> start (line-end-position)) - (put-text-property (point) (1+ start) - 'syntax-multiline t)) - ;; FIXME: The `in' may just be a random argument to - ;; a normal command rather than the real `in' keyword. - ;; I.e. we should look back to try and find the - ;; corresponding `case'. - (and (looking-at ";[;&]\\|\\_ (point) (1+ (point-min))) + (progn (backward-char 2) + (if (> start (line-end-position)) + (put-text-property (point) (1+ start) + 'syntax-multiline t)) + ;; FIXME: The `in' may just be a random argument to + ;; a normal command rather than the real `in' keyword. + ;; I.e. we should look back to try and find the + ;; corresponding `case'. + (and (looking-at ";[;&]\\|\\_