diff options
| author | Stefan Monnier | 2011-08-02 22:00:22 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-08-02 22:00:22 -0400 |
| commit | b796c9b7f9ad0624ddc5a94e2601d8dc2266f2bb (patch) | |
| tree | c0efd5c0a208640c0a883f4566df1b40caa3aaad | |
| parent | bca46f6bc64a99a1cdeceaa8cdd4eb6e1b9c8f21 (diff) | |
| download | emacs-b796c9b7f9ad0624ddc5a94e2601d8dc2266f2bb.tar.gz emacs-b796c9b7f9ad0624ddc5a94e2601d8dc2266f2bb.zip | |
* lisp/progmodes/sh-script.el (sh-font-lock-paren): "main" is not "in".
Fixes: debbugs:9190
| -rw-r--r-- | lisp/ChangeLog | 88 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 64 |
2 files changed, 76 insertions, 76 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6c1b8a5fdf..6a4d4b9cc9c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/sh-script.el (sh-font-lock-paren): Don't mistake "main" for | ||
| 4 | "in" (bug#9190). | ||
| 5 | |||
| 1 | 2011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * mail/sendmail.el (sendmail-query-once): Restore the current | 8 | * mail/sendmail.el (sendmail-query-once): Restore the current |
| @@ -23,8 +28,8 @@ | |||
| 23 | * info.el: Remove the `Info-beginning-of-buffer' function | 28 | * info.el: Remove the `Info-beginning-of-buffer' function |
| 24 | (bug#8325). | 29 | (bug#8325). |
| 25 | 30 | ||
| 26 | * net/network-stream.el (network-stream-open-starttls): Use | 31 | * net/network-stream.el (network-stream-open-starttls): |
| 27 | `starttls-available-p' to see whether starttls.el can be used. | 32 | Use `starttls-available-p' to see whether starttls.el can be used. |
| 28 | 33 | ||
| 29 | 2011-08-01 Martin Rudalics <rudalics@gmx.at> | 34 | 2011-08-01 Martin Rudalics <rudalics@gmx.at> |
| 30 | 35 | ||
| @@ -32,8 +37,7 @@ | |||
| 32 | of window here (Bug#9215). | 37 | of window here (Bug#9215). |
| 33 | (display-buffer-pop-up-window, display-buffer-pop-up-frame) | 38 | (display-buffer-pop-up-window, display-buffer-pop-up-frame) |
| 34 | (display-buffer-pop-up-side-window) | 39 | (display-buffer-pop-up-side-window) |
| 35 | (display-buffer-in-side-window): Set dedicated status of window | 40 | (display-buffer-in-side-window): Set dedicated status of window here. |
| 36 | here. | ||
| 37 | 41 | ||
| 38 | 2011-08-01 Stefan Monnier <monnier@iro.umontreal.ca> | 42 | 2011-08-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 39 | 43 | ||
| @@ -87,8 +91,8 @@ | |||
| 87 | QT keyword "more" to prevent "more slots: ...." being spuriously | 91 | QT keyword "more" to prevent "more slots: ...." being spuriously |
| 88 | parsed as a bitfield declaraion. | 92 | parsed as a bitfield declaraion. |
| 89 | 93 | ||
| 90 | * progmodes/cc-engine.el (c-beginning-of-statement-1): Refactor | 94 | * progmodes/cc-engine.el (c-beginning-of-statement-1): |
| 91 | and enhance to handle bitfield declarations. | 95 | Refactor and enhance to handle bitfield declarations. |
| 92 | (c-punctuation-in): New function. | 96 | (c-punctuation-in): New function. |
| 93 | (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield | 97 | (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield |
| 94 | declarations properly. | 98 | declarations properly. |
| @@ -97,7 +101,7 @@ | |||
| 97 | 101 | ||
| 98 | * calendar/icalendar.el (icalendar--all-events): Take care of | 102 | * calendar/icalendar.el (icalendar--all-events): Take care of |
| 99 | multiple vcalendars in a single file. | 103 | multiple vcalendars in a single file. |
| 100 | (icalendar--convert-float-to-ical): checkdoc fixes. | 104 | (icalendar--convert-float-to-ical): Checkdoc fixes. |
| 101 | 105 | ||
| 102 | 2011-07-25 Deniz Dogan <deniz@dogan.se> | 106 | 2011-07-25 Deniz Dogan <deniz@dogan.se> |
| 103 | 107 | ||
| @@ -131,8 +135,7 @@ | |||
| 131 | (display-buffer-pop-up-side-window) | 135 | (display-buffer-pop-up-side-window) |
| 132 | (display-buffer-in-side-window): Call display-buffer-set-height | 136 | (display-buffer-in-side-window): Call display-buffer-set-height |
| 133 | and display-buffer-set-width after setting the new window's | 137 | and display-buffer-set-width after setting the new window's |
| 134 | buffer so `fit-window-to-buffer' and friends work on the right | 138 | buffer so `fit-window-to-buffer' and friends work on the right buffer. |
| 135 | buffer. | ||
| 136 | 139 | ||
| 137 | 2011-07-20 Sam Steingold <sds@gnu.org> | 140 | 2011-07-20 Sam Steingold <sds@gnu.org> |
| 138 | 141 | ||
| @@ -164,8 +167,8 @@ | |||
| 164 | 2011-07-19 Martin Rudalics <rudalics@gmx.at> | 167 | 2011-07-19 Martin Rudalics <rudalics@gmx.at> |
| 165 | 168 | ||
| 166 | * window.el (display-buffer-alist-of-strings-p) | 169 | * window.el (display-buffer-alist-of-strings-p) |
| 167 | (display-buffer-alist-set-1, display-buffer-alist-set-2): New | 170 | (display-buffer-alist-set-1, display-buffer-alist-set-2): |
| 168 | functions. | 171 | New functions. |
| 169 | (display-buffer-alist-set): Rewrite to handle Emacs 23 options | 172 | (display-buffer-alist-set): Rewrite to handle Emacs 23 options |
| 170 | more accurately. | 173 | more accurately. |
| 171 | 174 | ||
| @@ -176,8 +179,8 @@ | |||
| 176 | 179 | ||
| 177 | * progmodes/cc-langs.el (c-symbol-chars): Correct a typo. | 180 | * progmodes/cc-langs.el (c-symbol-chars): Correct a typo. |
| 178 | 181 | ||
| 179 | * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New | 182 | * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): |
| 180 | function. | 183 | New function. |
| 181 | (c-complex-decl-matchers): Insert reference to | 184 | (c-complex-decl-matchers): Insert reference to |
| 182 | c-font-lock-enclosing-decls. | 185 | c-font-lock-enclosing-decls. |
| 183 | 186 | ||
| @@ -196,7 +199,7 @@ | |||
| 196 | 199 | ||
| 197 | 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | 200 | 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 198 | 201 | ||
| 199 | * net/gnutls.el (gnutls-log-level): Removed. | 202 | * net/gnutls.el (gnutls-log-level): Remove. |
| 200 | 203 | ||
| 201 | * textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an | 204 | * textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an |
| 202 | indentation character (bug#6380). | 205 | indentation character (bug#6380). |
| @@ -218,11 +221,10 @@ | |||
| 218 | 221 | ||
| 219 | 2011-07-16 Martin Rudalics <rudalics@gmx.at> | 222 | 2011-07-16 Martin Rudalics <rudalics@gmx.at> |
| 220 | 223 | ||
| 221 | * frame.el (select-frame-set-input-focus): New argument | 224 | * frame.el (select-frame-set-input-focus): New argument NORECORD. |
| 222 | NORECORD. | ||
| 223 | * window.el (pop-to-buffer): Select window used even if it was | 225 | * window.el (pop-to-buffer): Select window used even if it was |
| 224 | selected before, see discussion of (Bug#8615), (Bug#6954). Pass | 226 | selected before, see discussion of (Bug#8615), (Bug#6954). |
| 225 | argument NORECORD on to select-frame-set-input-focus. | 227 | Pass argument NORECORD on to select-frame-set-input-focus. |
| 226 | 228 | ||
| 227 | 2011-07-15 Glenn Morris <rgm@gnu.org> | 229 | 2011-07-15 Glenn Morris <rgm@gnu.org> |
| 228 | 230 | ||
| @@ -236,8 +238,8 @@ | |||
| 236 | 238 | ||
| 237 | 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 239 | 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 238 | 240 | ||
| 239 | * net/gnutls.el (gnutls-negotiate): Upcase | 241 | * net/gnutls.el (gnutls-negotiate): |
| 240 | `gnutls-algorithm-priority'. | 242 | Upcase `gnutls-algorithm-priority'. |
| 241 | 243 | ||
| 242 | 2011-07-15 Glenn Morris <rgm@gnu.org> | 244 | 2011-07-15 Glenn Morris <rgm@gnu.org> |
| 243 | 245 | ||
| @@ -318,9 +320,9 @@ | |||
| 318 | * printing.el (pr-toggle-region): Clarify the documentation | 320 | * printing.el (pr-toggle-region): Clarify the documentation |
| 319 | slightly (bug#7493). | 321 | slightly (bug#7493). |
| 320 | 322 | ||
| 321 | * time.el (display-time-update): Allow | 323 | * time.el (display-time-update): |
| 322 | `display-time-mail-function' to return nil (bug#7158). Fix | 324 | Allow `display-time-mail-function' to return nil (bug#7158). |
| 323 | suggested by Detlev Zundel. | 325 | Fix suggested by Detlev Zundel. |
| 324 | 326 | ||
| 325 | * vc/diff.el (diff): Clarify the order the file names are read | 327 | * vc/diff.el (diff): Clarify the order the file names are read |
| 326 | (bug#7111). | 328 | (bug#7111). |
| @@ -336,8 +338,8 @@ | |||
| 336 | 338 | ||
| 337 | 2011-07-14 Martin Rudalics <rudalics@gmx.at> | 339 | 2011-07-14 Martin Rudalics <rudalics@gmx.at> |
| 338 | 340 | ||
| 339 | * window.el (display-buffer-normalize-special): Replace | 341 | * window.el (display-buffer-normalize-special): |
| 340 | `dedicated' by `dedicate' to dedicate window (Bug#9072). | 342 | Replace `dedicated' by `dedicate' to dedicate window (Bug#9072). |
| 341 | 343 | ||
| 342 | 2011-07-14 Eli Zaretskii <eliz@gnu.org> | 344 | 2011-07-14 Eli Zaretskii <eliz@gnu.org> |
| 343 | 345 | ||
| @@ -358,7 +360,7 @@ | |||
| 358 | switch-to-buffer. | 360 | switch-to-buffer. |
| 359 | 361 | ||
| 360 | * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window): | 362 | * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window): |
| 361 | Deleted. | 363 | Delete. |
| 362 | 364 | ||
| 363 | 2011-07-14 Juanma Barranquero <lekktu@gmail.com> | 365 | 2011-07-14 Juanma Barranquero <lekktu@gmail.com> |
| 364 | 366 | ||
| @@ -376,8 +378,8 @@ | |||
| 376 | 378 | ||
| 377 | 2011-07-13 Chong Yidong <cyd@stupidchicken.com> | 379 | 2011-07-13 Chong Yidong <cyd@stupidchicken.com> |
| 378 | 380 | ||
| 379 | * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW. Use | 381 | * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW. |
| 380 | pop-to-buffer buffer-or-name if it is nil. | 382 | Use pop-to-buffer buffer-or-name if it is nil. |
| 381 | 383 | ||
| 382 | * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): | 384 | * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): |
| 383 | Remove switch-to-buffer. | 385 | Remove switch-to-buffer. |
| @@ -402,8 +404,8 @@ | |||
| 402 | 404 | ||
| 403 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | 405 | 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 404 | 406 | ||
| 405 | * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): Rewrite | 407 | * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): |
| 406 | to avoid awkward possessive "s" (bug#5986). | 408 | Rewrite to avoid awkward possessive "s" (bug#5986). |
| 407 | 409 | ||
| 408 | 2011-07-13 Glenn Morris <rgm@gnu.org> | 410 | 2011-07-13 Glenn Morris <rgm@gnu.org> |
| 409 | 411 | ||
| @@ -497,15 +499,15 @@ | |||
| 497 | 499 | ||
| 498 | 2011-07-12 Roland Winkler <winkler@gnu.org> | 500 | 2011-07-12 Roland Winkler <winkler@gnu.org> |
| 499 | 501 | ||
| 500 | * textmodes/bibtex.el (bibtex-initialize): Use | 502 | * textmodes/bibtex.el (bibtex-initialize): |
| 501 | pop-to-buffer-same-window. | 503 | Use pop-to-buffer-same-window. |
| 502 | (bibtex-search-entries): Fix interactive call. | 504 | (bibtex-search-entries): Fix interactive call. |
| 503 | 505 | ||
| 504 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | 506 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 505 | 507 | ||
| 506 | * progmodes/compile.el (compilation-error-regexp-alist-alist): | 508 | * progmodes/compile.el (compilation-error-regexp-alist-alist): |
| 507 | Fontise bytecomp Error lines more correctly (bug#2490). Fix | 509 | Fontise bytecomp Error lines more correctly (bug#2490). |
| 508 | suggested by Johan Bockgård. | 510 | Fix suggested by Johan Bockgård. |
| 509 | 511 | ||
| 510 | * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient. | 512 | * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient. |
| 511 | 513 | ||
| @@ -518,8 +520,8 @@ | |||
| 518 | 520 | ||
| 519 | 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | 521 | 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 520 | 522 | ||
| 521 | * mail/sendmail.el (sendmail-query-once): Use | 523 | * mail/sendmail.el (sendmail-query-once): |
| 522 | `customize-save-variable' unconditionally, now that it works under | 524 | Use `customize-save-variable' unconditionally, now that it works under |
| 523 | emacs -Q. | 525 | emacs -Q. |
| 524 | 526 | ||
| 525 | * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto. | 527 | * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto. |
| @@ -584,16 +586,15 @@ | |||
| 584 | 586 | ||
| 585 | 2011-07-09 Bob Nnamtrop <bobnnamtrop@gmail.com> (tiny change) | 587 | 2011-07-09 Bob Nnamtrop <bobnnamtrop@gmail.com> (tiny change) |
| 586 | 588 | ||
| 587 | * emulation/viper-cmd.el (viper-change-state-to-vi): Limit | 589 | * emulation/viper-cmd.el (viper-change-state-to-vi): |
| 588 | triggering of abbrev expansion (Bug#9038). | 590 | Limit triggering of abbrev expansion (Bug#9038). |
| 589 | 591 | ||
| 590 | 2011-07-09 Martin Rudalics <rudalics@gmx.at> | 592 | 2011-07-09 Martin Rudalics <rudalics@gmx.at> |
| 591 | 593 | ||
| 592 | * window.el (display-buffer-default-specifiers): Remove. | 594 | * window.el (display-buffer-default-specifiers): Remove. |
| 593 | (display-buffer-macro-specifiers): Remove default specifiers. | 595 | (display-buffer-macro-specifiers): Remove default specifiers. |
| 594 | (display-buffer-alist): Default to nil. | 596 | (display-buffer-alist): Default to nil. |
| 595 | (display-buffer-reuse-window): New optional argument | 597 | (display-buffer-reuse-window): New optional argument other-window. |
| 596 | other-window. | ||
| 597 | (display-buffer-pop-up-window): Allow splitting internal | 598 | (display-buffer-pop-up-window): Allow splitting internal |
| 598 | windows. Check whether a live window was created. | 599 | windows. Check whether a live window was created. |
| 599 | (display-buffer-other-window-means-other-frame) | 600 | (display-buffer-other-window-means-other-frame) |
| @@ -608,11 +609,10 @@ | |||
| 608 | (display-buffer): Process other-window specifier and call | 609 | (display-buffer): Process other-window specifier and call |
| 609 | display-buffer-reuse-window with it. Emulate Emacs 23 behavior | 610 | display-buffer-reuse-window with it. Emulate Emacs 23 behavior |
| 610 | more faithfully. | 611 | more faithfully. |
| 611 | (pop-up-windows, even-window-heights): Restore Emacs 23 default | 612 | (pop-up-windows, even-window-heights): Restore Emacs 23 default values. |
| 612 | values. | ||
| 613 | (display-buffer-alist-set): Don't handle 'unset default values. | 613 | (display-buffer-alist-set): Don't handle 'unset default values. |
| 614 | (display-buffer-in-window, display-buffer-alist-set): Replace | 614 | (display-buffer-in-window, display-buffer-alist-set): |
| 615 | symbol "dedicated" by "dedicate". Reported by Tassilo Horn | 615 | Replace symbol "dedicated" by "dedicate". Reported by Tassilo Horn |
| 616 | <tassilo@member.fsf.org>. | 616 | <tassilo@member.fsf.org>. |
| 617 | 617 | ||
| 618 | 2011-07-09 Leo Liu <sdl.web@gmail.com> | 618 | 2011-07-09 Leo Liu <sdl.web@gmail.com> |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 258f9be9237..31a4fbaef4d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1028,45 +1028,45 @@ subshells can nest." | |||
| 1028 | 1028 | ||
| 1029 | (defun sh-font-lock-paren (start) | 1029 | (defun sh-font-lock-paren (start) |
| 1030 | (unless (nth 8 (syntax-ppss)) | 1030 | (unless (nth 8 (syntax-ppss)) |
| 1031 | (save-excursion | 1031 | (save-excursion |
| 1032 | (goto-char start) | 1032 | (goto-char start) |
| 1033 | ;; Skip through all patterns | 1033 | ;; Skip through all patterns |
| 1034 | (while | 1034 | (while |
| 1035 | (progn | 1035 | (progn |
| 1036 | (while | 1036 | (while |
| 1037 | (progn | 1037 | (progn |
| 1038 | (forward-comment (- (point-max))) | 1038 | (forward-comment (- (point-max))) |
| 1039 | (when (and (eolp) (sh-is-quoted-p (point))) | 1039 | (when (and (eolp) (sh-is-quoted-p (point))) |
| 1040 | (forward-char -1) | 1040 | (forward-char -1) |
| 1041 | t))) | 1041 | t))) |
| 1042 | ;; Skip through one pattern | 1042 | ;; Skip through one pattern |
| 1043 | (while | 1043 | (while |
| 1044 | (or (/= 0 (skip-syntax-backward "w_")) | 1044 | (or (/= 0 (skip-syntax-backward "w_")) |
| 1045 | (/= 0 (skip-chars-backward "-$=?[]*@/\\\\")) | 1045 | (/= 0 (skip-chars-backward "-$=?[]*@/\\\\")) |
| 1046 | (and (sh-is-quoted-p (1- (point))) | 1046 | (and (sh-is-quoted-p (1- (point))) |
| 1047 | (goto-char (- (point) 2))) | 1047 | (goto-char (- (point) 2))) |
| 1048 | (when (memq (char-before) '(?\" ?\' ?\})) | 1048 | (when (memq (char-before) '(?\" ?\' ?\})) |
| 1049 | (condition-case nil (progn (backward-sexp 1) t) | 1049 | (condition-case nil (progn (backward-sexp 1) t) |
| 1050 | (error nil))))) | 1050 | (error nil))))) |
| 1051 | ;; Patterns can be preceded by an open-paren (Bug#1320). | 1051 | ;; Patterns can be preceded by an open-paren (Bug#1320). |
| 1052 | (if (eq (char-before (point)) ?\() | 1052 | (if (eq (char-before (point)) ?\() |
| 1053 | (backward-char 1)) | 1053 | (backward-char 1)) |
| 1054 | (while (progn | 1054 | (while (progn |
| 1055 | (forward-comment (- (point-max))) | 1055 | (forward-comment (- (point-max))) |
| 1056 | ;; Maybe we've bumped into an escaped newline. | 1056 | ;; Maybe we've bumped into an escaped newline. |
| 1057 | (sh-is-quoted-p (point))) | 1057 | (sh-is-quoted-p (point))) |
| 1058 | (backward-char 1)) | 1058 | (backward-char 1)) |
| 1059 | (when (eq (char-before) ?|) | 1059 | (when (eq (char-before) ?|) |
| 1060 | (backward-char 1) t))) | 1060 | (backward-char 1) t))) |
| 1061 | (when (progn (backward-char 2) | 1061 | (when (progn (backward-char 2) |
| 1062 | (if (> start (line-end-position)) | 1062 | (if (> start (line-end-position)) |
| 1063 | (put-text-property (point) (1+ start) | 1063 | (put-text-property (point) (1+ start) |
| 1064 | 'syntax-multiline t)) | 1064 | 'syntax-multiline t)) |
| 1065 | ;; FIXME: The `in' may just be a random argument to | 1065 | ;; FIXME: The `in' may just be a random argument to |
| 1066 | ;; a normal command rather than the real `in' keyword. | 1066 | ;; a normal command rather than the real `in' keyword. |
| 1067 | ;; I.e. we should look back to try and find the | 1067 | ;; I.e. we should look back to try and find the |
| 1068 | ;; corresponding `case'. | 1068 | ;; corresponding `case'. |
| 1069 | (and (looking-at ";[;&]\\|in") | 1069 | (and (looking-at ";[;&]\\|\\_<in") |
| 1070 | ;; ";; esac )" is a case that looks like a case-pattern | 1070 | ;; ";; esac )" is a case that looks like a case-pattern |
| 1071 | ;; but it's really just a close paren after a case | 1071 | ;; but it's really just a close paren after a case |
| 1072 | ;; statement. I.e. if we skipped over `esac' just now, | 1072 | ;; statement. I.e. if we skipped over `esac' just now, |