]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/sh-script.el
Merge from emacs-24; up to 2012-05-05T02:50:20Z!monnier@iro.umontreal.ca
[gnu-emacs] / lisp / progmodes / sh-script.el
index a422462775d39170f9d504c78cfad260effa0970..b4d550bcee094e3bb692776c501d87221b9cdb94 100644 (file)
@@ -1062,21 +1062,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 ";[;&]\\|\\_<in")
-                        ;; ";; esac )" is a case that looks like a case-pattern
-                        ;; but it's really just a close paren after a case
-                        ;; statement.  I.e. if we skipped over `esac' just now,
-                        ;; we're not looking at a case-pattern.
-                        (not (looking-at "..[ \t\n]+esac[^[:word:]_]"))))
-        sh-st-punc))))
+      (and (> (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 ";[;&]\\|\\_<in")
+                       ;; ";; esac )" is a case that looks like a case-pattern
+                       ;; but it's really just a close paren after a case
+                       ;; statement.  I.e. if we skipped over `esac' just now,
+                       ;; we're not looking at a case-pattern.
+                       (not (looking-at "..[ \t\n]+esac[^[:word:]_]"))))
+           sh-st-punc))))
 
 (defun sh-font-lock-backslash-quote ()
   (if (eq (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) ?\')