emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108125: * lisp/progmodes/sh-scrip


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108125: * lisp/progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB.
Date: Wed, 29 Aug 2012 14:33:35 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108125
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12222
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-08-29 14:33:35 -0400
message:
  * lisp/progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB.
modified:
  lisp/ChangeLog
  lisp/progmodes/sh-script.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-08-27 12:33:05 +0000
+++ b/lisp/ChangeLog    2012-08-29 18:33:35 +0000
@@ -1,3 +1,8 @@
+2012-08-29  Stefan Monnier  <address@hidden>
+
+       * progmodes/sh-script.el (sh-font-lock-paren): Don't burp at BOB
+       (bug#12222).
+
 2012-08-27  Leo Liu  <address@hidden>
 
        * progmodes/sh-script.el (sh-dynamic-complete-functions): Adapt to

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2012-08-27 12:33:05 +0000
+++ b/lisp/progmodes/sh-script.el       2012-08-29 18:33:35 +0000
@@ -1064,21 +1064,22 @@
               (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)))) ?\')


reply via email to

[Prev in Thread] Current Thread [Next in Thread]