From: Stefan Monnier Date: Sat, 5 Feb 2011 15:53:04 +0000 (-0500) Subject: * lisp/progmodes/sh-script.el (sh-font-lock-paren, sh-kw, sh-prev-thing): X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~1023 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cb76591b02e831807bff7928b1f5f019761e0de;p=emacs.git * lisp/progmodes/sh-script.el (sh-font-lock-paren, sh-kw, sh-prev-thing): Handle new bashisms ";&" and ";;&". Fixes: debbugs:7947 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdf994dc4ff..2bdce356f5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ +2011-02-05 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren, sh-kw, sh-prev-thing): + Handle new bashisms ";&" and ";;&" (bug#7947). + 2011-02-05 Michael Albinus - * net/tramp-smb.el (tramp-smb-errors): Use `regexp-opt'. Add - "NT_STATUS_IO_TIMEOUT" and "NT_STATUS_NO_SUCH_USER". + * net/tramp-smb.el (tramp-smb-errors): Use `regexp-opt'. + Add "NT_STATUS_IO_TIMEOUT" and "NT_STATUS_NO_SUCH_USER". 2011-02-05 Era Eriksson (tiny change) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 64f8c623779..30d768d7743 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1104,7 +1104,7 @@ subshells can nest." ;; a normal command rather than the real `in' keyword. ;; I.e. we should look back to try and find the ;; corresponding `case'. - (looking-at ";;\\|in")) + (looking-at ";[;&]\\|in")) sh-st-punc))) (defun sh-font-lock-backslash-quote () @@ -1659,6 +1659,8 @@ This adds rules for comments and assignments." ("esac" sh-handle-this-esac sh-handle-prev-esac) (case-label nil sh-handle-after-case-label) ;; ??? (";;" nil sh-handle-prev-case-alt-end) ;; ??? + (";;&" nil sh-handle-prev-case-alt-end) ;Like ";;" with diff semantics. + (";&" nil sh-handle-prev-case-alt-end) ;Like ";;" with diff semantics. ("done" sh-handle-this-done sh-handle-prev-done) ("do" sh-handle-this-do sh-handle-prev-do)) @@ -2496,7 +2498,7 @@ we go to the end of the previous line and do not check for continuations." (sh-prev-line nil) (line-beginning-position)))) (skip-chars-backward " \t;" min-point) - (if (looking-at "\\s-*;;") + (if (looking-at "\\s-*;[;&]") ;; (message "Found ;; !") ";;" (skip-chars-backward "^)}];\"'`({[" min-point)