emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105390: * lisp/progmodes/sh-script.e


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105390: * lisp/progmodes/sh-script.el (sh-font-lock-paren): "main" is not "in".
Date: Tue, 02 Aug 2011 22:00:22 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105390
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9190
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2011-08-02 22:00:22 -0400
message:
  * lisp/progmodes/sh-script.el (sh-font-lock-paren): "main" is not "in".
modified:
  lisp/ChangeLog
  lisp/progmodes/sh-script.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-02 19:43:09 +0000
+++ b/lisp/ChangeLog    2011-08-03 02:00:22 +0000
@@ -1,3 +1,8 @@
+2011-08-03  Stefan Monnier  <address@hidden>
+
+       * progmodes/sh-script.el (sh-font-lock-paren): Don't mistake "main" for
+       "in" (bug#9190).
+
 2011-08-02  Lars Magne Ingebrigtsen  <address@hidden>
 
        * mail/sendmail.el (sendmail-query-once): Restore the current
@@ -23,8 +28,8 @@
        * info.el: Remove the `Info-beginning-of-buffer' function
        (bug#8325).
 
-       * net/network-stream.el (network-stream-open-starttls): Use
-       `starttls-available-p' to see whether starttls.el can be used.
+       * net/network-stream.el (network-stream-open-starttls):
+       Use `starttls-available-p' to see whether starttls.el can be used.
 
 2011-08-01  Martin Rudalics  <address@hidden>
 
@@ -32,8 +37,7 @@
        of window here (Bug#9215).
        (display-buffer-pop-up-window, display-buffer-pop-up-frame)
        (display-buffer-pop-up-side-window)
-       (display-buffer-in-side-window): Set dedicated status of window
-       here.
+       (display-buffer-in-side-window): Set dedicated status of window here.
 
 2011-08-01  Stefan Monnier  <address@hidden>
 
@@ -87,8 +91,8 @@
        QT keyword "more" to prevent "more slots: ...." being spuriously
        parsed as a bitfield declaraion.
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Refactor
-       and enhance to handle bitfield declarations.
+       * progmodes/cc-engine.el (c-beginning-of-statement-1):
+       Refactor and enhance to handle bitfield declarations.
        (c-punctuation-in): New function.
        (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield
        declarations properly.
@@ -97,7 +101,7 @@
 
        * calendar/icalendar.el (icalendar--all-events): Take care of
        multiple vcalendars in a single file.
-       (icalendar--convert-float-to-ical): checkdoc fixes.
+       (icalendar--convert-float-to-ical): Checkdoc fixes.
 
 2011-07-25  Deniz Dogan  <address@hidden>
 
@@ -131,8 +135,7 @@
        (display-buffer-pop-up-side-window)
        (display-buffer-in-side-window): Call display-buffer-set-height
        and display-buffer-set-width after setting the new window's
-       buffer so `fit-window-to-buffer' and friends work on the right
-       buffer.
+       buffer so `fit-window-to-buffer' and friends work on the right buffer.
 
 2011-07-20  Sam Steingold  <address@hidden>
 
@@ -164,8 +167,8 @@
 2011-07-19  Martin Rudalics  <address@hidden>
 
        * window.el (display-buffer-alist-of-strings-p)
-       (display-buffer-alist-set-1, display-buffer-alist-set-2): New
-       functions.
+       (display-buffer-alist-set-1, display-buffer-alist-set-2):
+       New functions.
        (display-buffer-alist-set): Rewrite to handle Emacs 23 options
        more accurately.
 
@@ -176,8 +179,8 @@
 
        * progmodes/cc-langs.el (c-symbol-chars): Correct a typo.
 
-       * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New
-       function.
+       * progmodes/cc-fonts.el (c-font-lock-enclosing-decls):
+       New function.
        (c-complex-decl-matchers): Insert reference to
        c-font-lock-enclosing-decls.
 
@@ -196,7 +199,7 @@
 
 2011-07-16  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * net/gnutls.el (gnutls-log-level): Removed.
+       * net/gnutls.el (gnutls-log-level): Remove.
 
        * textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an
        indentation character (bug#6380).
@@ -218,11 +221,10 @@
 
 2011-07-16  Martin Rudalics  <address@hidden>
 
-       * frame.el (select-frame-set-input-focus): New argument
-       NORECORD.
+       * frame.el (select-frame-set-input-focus): New argument NORECORD.
        * window.el (pop-to-buffer): Select window used even if it was
-       selected before, see discussion of (Bug#8615), (Bug#6954).  Pass
-       argument NORECORD on to select-frame-set-input-focus.
+       selected before, see discussion of (Bug#8615), (Bug#6954).
+       Pass argument NORECORD on to select-frame-set-input-focus.
 
 2011-07-15  Glenn Morris  <address@hidden>
 
@@ -236,8 +238,8 @@
 
 2011-07-15  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * net/gnutls.el (gnutls-negotiate): Upcase
-       `gnutls-algorithm-priority'.
+       * net/gnutls.el (gnutls-negotiate):
+       Upcase `gnutls-algorithm-priority'.
 
 2011-07-15  Glenn Morris  <address@hidden>
 
@@ -318,9 +320,9 @@
        * printing.el (pr-toggle-region): Clarify the documentation
        slightly (bug#7493).
 
-       * time.el (display-time-update): Allow
-       `display-time-mail-function' to return nil (bug#7158).  Fix
-       suggested by Detlev Zundel.
+       * time.el (display-time-update):
+       Allow `display-time-mail-function' to return nil (bug#7158).
+       Fix suggested by Detlev Zundel.
 
        * vc/diff.el (diff): Clarify the order the file names are read
        (bug#7111).
@@ -336,8 +338,8 @@
 
 2011-07-14  Martin Rudalics  <address@hidden>
 
-       * window.el (display-buffer-normalize-special): Replace
-       `dedicated' by `dedicate' to dedicate window (Bug#9072).
+       * window.el (display-buffer-normalize-special):
+       Replace `dedicated' by `dedicate' to dedicate window (Bug#9072).
 
 2011-07-14  Eli Zaretskii  <address@hidden>
 
@@ -358,7 +360,7 @@
        switch-to-buffer.
 
        * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window):
-       Deleted.
+       Delete.
 
 2011-07-14  Juanma Barranquero  <address@hidden>
 
@@ -376,8 +378,8 @@
 
 2011-07-13  Chong Yidong  <address@hidden>
 
-       * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW.  Use
-       pop-to-buffer buffer-or-name if it is nil.
+       * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW.
+       Use pop-to-buffer buffer-or-name if it is nil.
 
        * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
        Remove switch-to-buffer.
@@ -402,8 +404,8 @@
 
 2011-07-13  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): Rewrite
-       to avoid awkward possessive "s" (bug#5986).
+       * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock):
+       Rewrite to avoid awkward possessive "s" (bug#5986).
 
 2011-07-13  Glenn Morris  <address@hidden>
 
@@ -497,15 +499,15 @@
 
 2011-07-12  Roland Winkler  <address@hidden>
 
-       * textmodes/bibtex.el (bibtex-initialize): Use
-       pop-to-buffer-same-window.
+       * textmodes/bibtex.el (bibtex-initialize):
+       Use pop-to-buffer-same-window.
        (bibtex-search-entries): Fix interactive call.
 
 2011-07-12  Lars Magne Ingebrigtsen  <address@hidden>
 
        * progmodes/compile.el (compilation-error-regexp-alist-alist):
-       Fontise bytecomp Error lines more correctly (bug#2490).  Fix
-       suggested by Johan Bockgård.
+       Fontise bytecomp Error lines more correctly (bug#2490).
+       Fix suggested by Johan Bockgård.
 
        * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient.
 
@@ -518,8 +520,8 @@
 
 2011-07-11  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * mail/sendmail.el (sendmail-query-once): Use
-       `customize-save-variable' unconditionally, now that it works under
+       * mail/sendmail.el (sendmail-query-once):
+       Use `customize-save-variable' unconditionally, now that it works under
        emacs -Q.
 
        * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto.
@@ -584,16 +586,15 @@
 
 2011-07-09  Bob Nnamtrop  <address@hidden>  (tiny change)
 
-       * emulation/viper-cmd.el (viper-change-state-to-vi): Limit
-       triggering of abbrev expansion (Bug#9038).
+       * emulation/viper-cmd.el (viper-change-state-to-vi):
+       Limit triggering of abbrev expansion (Bug#9038).
 
 2011-07-09  Martin Rudalics  <address@hidden>
 
        * window.el (display-buffer-default-specifiers): Remove.
        (display-buffer-macro-specifiers): Remove default specifiers.
        (display-buffer-alist): Default to nil.
-       (display-buffer-reuse-window): New optional argument
-       other-window.
+       (display-buffer-reuse-window): New optional argument other-window.
        (display-buffer-pop-up-window): Allow splitting internal
        windows.  Check whether a live window was created.
        (display-buffer-other-window-means-other-frame)
@@ -608,11 +609,10 @@
        (display-buffer): Process other-window specifier and call
        display-buffer-reuse-window with it.  Emulate Emacs 23 behavior
        more faithfully.
-       (pop-up-windows, even-window-heights): Restore Emacs 23 default
-       values.
+       (pop-up-windows, even-window-heights): Restore Emacs 23 default values.
        (display-buffer-alist-set): Don't handle 'unset default values.
-       (display-buffer-in-window, display-buffer-alist-set): Replace
-       symbol "dedicated" by "dedicate".  Reported by Tassilo Horn
+       (display-buffer-in-window, display-buffer-alist-set):
+       Replace symbol "dedicated" by "dedicate".  Reported by Tassilo Horn
        <address@hidden>.
 
 2011-07-09  Leo Liu  <address@hidden>

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2011-04-22 18:44:26 +0000
+++ b/lisp/progmodes/sh-script.el       2011-08-03 02:00:22 +0000
@@ -1028,45 +1028,45 @@
 
 (defun sh-font-lock-paren (start)
   (unless (nth 8 (syntax-ppss))
-  (save-excursion
-    (goto-char start)
-    ;; Skip through all patterns
-    (while
-       (progn
+    (save-excursion
+      (goto-char start)
+      ;; Skip through all patterns
+      (while
+          (progn
             (while
                 (progn
-         (forward-comment (- (point-max)))
+                  (forward-comment (- (point-max)))
                   (when (and (eolp) (sh-is-quoted-p (point)))
                     (forward-char -1)
                     t)))
-         ;; Skip through one pattern
-         (while
-             (or (/= 0 (skip-syntax-backward "w_"))
+            ;; Skip through one pattern
+            (while
+                (or (/= 0 (skip-syntax-backward "w_"))
                     (/= 0 (skip-chars-backward "-$=?[]*@/\\\\"))
-                 (and (sh-is-quoted-p (1- (point)))
-                      (goto-char (- (point) 2)))
+                    (and (sh-is-quoted-p (1- (point)))
+                         (goto-char (- (point) 2)))
                     (when (memq (char-before) '(?\" ?\' ?\}))
-                   (condition-case nil (progn (backward-sexp 1) t)
-                     (error nil)))))
-         ;; Patterns can be preceded by an open-paren (Bug#1320).
-         (if (eq (char-before (point)) ?\()
-             (backward-char 1))
-          (while (progn
-                   (forward-comment (- (point-max)))
-                   ;; Maybe we've bumped into an escaped newline.
-                   (sh-is-quoted-p (point)))
-            (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")
+                      (condition-case nil (progn (backward-sexp 1) t)
+                        (error nil)))))
+            ;; Patterns can be preceded by an open-paren (Bug#1320).
+            (if (eq (char-before (point)) ?\()
+                (backward-char 1))
+            (while (progn
+                     (forward-comment (- (point-max)))
+                     ;; Maybe we've bumped into an escaped newline.
+                     (sh-is-quoted-p (point)))
+              (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,


reply via email to

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