diff options
| author | Kenichi Handa | 2010-07-12 11:28:50 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-07-12 11:28:50 +0900 |
| commit | 2300368463c9719839a0289cd6dccaa93d3274cf (patch) | |
| tree | d3e5e3b91444fb135bdedf40d0b4f597d47b40de /lisp/progmodes | |
| parent | 892dd5657e548f66bbcfb07a9556cc5fc9f17b8d (diff) | |
| parent | f479ef6e6f5c77ba0f1f6b60c1146f324d604e92 (diff) | |
| download | emacs-2300368463c9719839a0289cd6dccaa93d3274cf.tar.gz emacs-2300368463c9719839a0289cd6dccaa93d3274cf.zip | |
merge trunk
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 13 | ||||
| -rw-r--r-- | lisp/progmodes/idlwave.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 18 |
5 files changed, 35 insertions, 14 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 9044b42a838..ed769158a50 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -669,8 +669,13 @@ They are set only when, respectively, the pseudo variables | |||
| 669 | 669 | ||
| 670 | This function is called from the hook `before-hack-local-variables-hook'." | 670 | This function is called from the hook `before-hack-local-variables-hook'." |
| 671 | (when c-buffer-is-cc-mode | 671 | (when c-buffer-is-cc-mode |
| 672 | (let ((stile (cdr (assq 'c-file-style file-local-variables-alist))) | 672 | (let ((mode-cons (assq 'mode file-local-variables-alist)) |
| 673 | (stile (cdr (assq 'c-file-style file-local-variables-alist))) | ||
| 673 | (offsets (cdr (assq 'c-file-offsets file-local-variables-alist)))) | 674 | (offsets (cdr (assq 'c-file-offsets file-local-variables-alist)))) |
| 675 | (when mode-cons | ||
| 676 | (hack-one-local-variable (car mode-cons) (cdr mode-cons)) | ||
| 677 | (setq file-local-variables-alist | ||
| 678 | (delq mode-cons file-local-variables-alist))) | ||
| 674 | (when stile | 679 | (when stile |
| 675 | (or (stringp stile) (error "c-file-style is not a string")) | 680 | (or (stringp stile) (error "c-file-style is not a string")) |
| 676 | (c-set-style stile)) | 681 | (c-set-style stile)) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7000b4bbc8a..76bd02615e3 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -196,6 +196,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 196 | "^\"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)\ | 196 | "^\"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)\ |
| 197 | \\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4)) | 197 | \\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4)) |
| 198 | 198 | ||
| 199 | (cucumber | ||
| 200 | "\\(?:^cucumber\\(?: -p [^[:space:]]+\\)?\\|#\\)\ | ||
| 201 | \\(?: \\)\\([^\(].*\\):\\([1-9][0-9]*\\)" 1 2) | ||
| 202 | |||
| 199 | (edg-1 | 203 | (edg-1 |
| 200 | "^\\([^ \n]+\\)(\\([0-9]+\\)): \\(?:error\\|warnin\\(g\\)\\|remar\\(k\\)\\)" | 204 | "^\\([^ \n]+\\)(\\([0-9]+\\)): \\(?:error\\|warnin\\(g\\)\\|remar\\(k\\)\\)" |
| 201 | 1 2 nil (3 . 4)) | 205 | 1 2 nil (3 . 4)) |
| @@ -325,6 +329,13 @@ during global destruction\\.$\\)" 1 2) | |||
| 325 | "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" | 329 | "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" |
| 326 | 2 3 nil nil) | 330 | 2 3 nil nil) |
| 327 | 331 | ||
| 332 | (ruby | ||
| 333 | "^[\t ]*\\(?:from \\)?\ | ||
| 334 | \\([^\(\n][^[:space:]\n]*\\):\\([1-9][0-9]*\\)\\(:in `.*'\\)?.*$" 1 2) | ||
| 335 | |||
| 336 | (ruby-Test::Unit | ||
| 337 | "[\t ]*\\[\\([^\(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:$" 1 2) | ||
| 338 | |||
| 328 | (rxp | 339 | (rxp |
| 329 | "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ | 340 | "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ |
| 330 | \\([0-9]+\\) of file://\\(.+\\)" | 341 | \\([0-9]+\\) of file://\\(.+\\)" |
| @@ -2083,7 +2094,7 @@ and overlay is highlighted between MK and END-MK." | |||
| 2083 | pre-existing | 2094 | pre-existing |
| 2084 | (let ((display-buffer-reuse-frames t) | 2095 | (let ((display-buffer-reuse-frames t) |
| 2085 | (pop-up-windows t)) | 2096 | (pop-up-windows t)) |
| 2086 | ;; Pop up a window. | 2097 | ;; Pop up a window. |
| 2087 | (display-buffer (marker-buffer msg))))) | 2098 | (display-buffer (marker-buffer msg))))) |
| 2088 | (highlight-regexp (with-current-buffer (marker-buffer msg) | 2099 | (highlight-regexp (with-current-buffer (marker-buffer msg) |
| 2089 | ;; also do this while we change buffer | 2100 | ;; also do this while we change buffer |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 402893c5946..1d042c99451 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -1602,7 +1602,7 @@ Capitalize system variables - action only | |||
| 1602 | `(lambda () | 1602 | `(lambda () |
| 1603 | (interactive) | 1603 | (interactive) |
| 1604 | (self-insert-command 1) | 1604 | (self-insert-command 1) |
| 1605 | ,@(if (listp cmd) cmd (list cmd)))))) | 1605 | ,(if (listp cmd) cmd (list cmd)))))) |
| 1606 | 1606 | ||
| 1607 | ;; Set action and key bindings. | 1607 | ;; Set action and key bindings. |
| 1608 | ;; See description of the function `idlwave-action-and-binding'. | 1608 | ;; See description of the function `idlwave-action-and-binding'. |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 6bd8fbc2442..60ed14afbac 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -474,8 +474,7 @@ for preventing Firefox from stealing the keyboard focus." | |||
| 474 | (defcustom js-js-tmpdir | 474 | (defcustom js-js-tmpdir |
| 475 | "~/.emacs.d/js/js" | 475 | "~/.emacs.d/js/js" |
| 476 | "Temporary directory used by `js-mode' to communicate with Mozilla. | 476 | "Temporary directory used by `js-mode' to communicate with Mozilla. |
| 477 | This directory must be readable and writable by both Mozilla and | 477 | This directory must be readable and writable by both Mozilla and Emacs." |
| 478 | Emacs." | ||
| 479 | :type 'directory | 478 | :type 'directory |
| 480 | :group 'js) | 479 | :group 'js) |
| 481 | 480 | ||
| @@ -499,11 +498,11 @@ getting timeout messages." | |||
| 499 | (define-key keymap [(meta ?.)] #'js-find-symbol) | 498 | (define-key keymap [(meta ?.)] #'js-find-symbol) |
| 500 | (easy-menu-define nil keymap "Javascript Menu" | 499 | (easy-menu-define nil keymap "Javascript Menu" |
| 501 | '("Javascript" | 500 | '("Javascript" |
| 502 | ["Select new Mozilla context…" js-set-js-context | 501 | ["Select New Mozilla Context..." js-set-js-context |
| 503 | (fboundp #'inferior-moz-process)] | 502 | (fboundp #'inferior-moz-process)] |
| 504 | ["Evaluate expression in Mozilla context…" js-eval | 503 | ["Evaluate Expression in Mozilla Context..." js-eval |
| 505 | (fboundp #'inferior-moz-process)] | 504 | (fboundp #'inferior-moz-process)] |
| 506 | ["Send current function to Mozilla…" js-eval-defun | 505 | ["Send Current Function to Mozilla..." js-eval-defun |
| 507 | (fboundp #'inferior-moz-process)])) | 506 | (fboundp #'inferior-moz-process)])) |
| 508 | keymap) | 507 | keymap) |
| 509 | "Keymap for `js-mode'.") | 508 | "Keymap for `js-mode'.") |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4e0f326e2d4..2b09e346331 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -93,7 +93,7 @@ | |||
| 93 | 93 | ||
| 94 | (defvar python-font-lock-keywords | 94 | (defvar python-font-lock-keywords |
| 95 | `(,(rx symbol-start | 95 | `(,(rx symbol-start |
| 96 | ;; From v 2.5 reference, § keywords. | 96 | ;; From v 2.7 reference, § keywords. |
| 97 | ;; def and class dealt with separately below | 97 | ;; def and class dealt with separately below |
| 98 | (or "and" "as" "assert" "break" "continue" "del" "elif" "else" | 98 | (or "and" "as" "assert" "break" "continue" "del" "elif" "else" |
| 99 | "except" "exec" "finally" "for" "from" "global" "if" | 99 | "except" "exec" "finally" "for" "from" "global" "if" |
| @@ -102,7 +102,7 @@ | |||
| 102 | ;; Not real keywords, but close enough to be fontified as such | 102 | ;; Not real keywords, but close enough to be fontified as such |
| 103 | "self" "True" "False") | 103 | "self" "True" "False") |
| 104 | symbol-end) | 104 | symbol-end) |
| 105 | (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.5 manual | 105 | (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.7 manual |
| 106 | . font-lock-constant-face) | 106 | . font-lock-constant-face) |
| 107 | ;; Definitions | 107 | ;; Definitions |
| 108 | (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) | 108 | (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) |
| @@ -117,7 +117,7 @@ | |||
| 117 | (0+ "." (1+ (or word ?_))))) | 117 | (0+ "." (1+ (or word ?_))))) |
| 118 | (1 font-lock-type-face)) | 118 | (1 font-lock-type-face)) |
| 119 | ;; Built-ins. (The next three blocks are from | 119 | ;; Built-ins. (The next three blocks are from |
| 120 | ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns | 120 | ;; `__builtin__.__dict__.keys()' in Python 2.7) These patterns |
| 121 | ;; are debateable, but they at least help to spot possible | 121 | ;; are debateable, but they at least help to spot possible |
| 122 | ;; shadowing of builtins. | 122 | ;; shadowing of builtins. |
| 123 | (,(rx symbol-start (or | 123 | (,(rx symbol-start (or |
| @@ -135,7 +135,9 @@ | |||
| 135 | "SystemExit" "TabError" "TypeError" "UnboundLocalError" | 135 | "SystemExit" "TabError" "TypeError" "UnboundLocalError" |
| 136 | "UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError" | 136 | "UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError" |
| 137 | "UnicodeTranslateError" "UnicodeWarning" "UserWarning" | 137 | "UnicodeTranslateError" "UnicodeWarning" "UserWarning" |
| 138 | "ValueError" "Warning" "ZeroDivisionError") symbol-end) | 138 | "ValueError" "Warning" "ZeroDivisionError" |
| 139 | ;; Python 2.7 | ||
| 140 | "BufferError" "BytesWarning" "WindowsError") symbol-end) | ||
| 139 | . font-lock-type-face) | 141 | . font-lock-type-face) |
| 140 | (,(rx (or line-start (not (any ". \t"))) (* (any " \t")) symbol-start | 142 | (,(rx (or line-start (not (any ". \t"))) (* (any " \t")) symbol-start |
| 141 | (group (or | 143 | (group (or |
| @@ -152,12 +154,16 @@ | |||
| 152 | "range" "raw_input" "reduce" "reload" "repr" "reversed" | 154 | "range" "raw_input" "reduce" "reload" "repr" "reversed" |
| 153 | "round" "set" "setattr" "slice" "sorted" "staticmethod" | 155 | "round" "set" "setattr" "slice" "sorted" "staticmethod" |
| 154 | "str" "sum" "super" "tuple" "type" "unichr" "unicode" "vars" | 156 | "str" "sum" "super" "tuple" "type" "unichr" "unicode" "vars" |
| 155 | "xrange" "zip")) symbol-end) | 157 | "xrange" "zip" |
| 158 | ;; Python 2.7. | ||
| 159 | "bin" "bytearray" "bytes" "format" "memoryview" "next" "print" | ||
| 160 | )) symbol-end) | ||
| 156 | (1 font-lock-builtin-face)) | 161 | (1 font-lock-builtin-face)) |
| 157 | (,(rx symbol-start (or | 162 | (,(rx symbol-start (or |
| 158 | ;; other built-ins | 163 | ;; other built-ins |
| 159 | "True" "False" "None" "Ellipsis" | 164 | "True" "False" "None" "Ellipsis" |
| 160 | "_" "__debug__" "__doc__" "__import__" "__name__") symbol-end) | 165 | "_" "__debug__" "__doc__" "__import__" "__name__" "__package__") |
| 166 | symbol-end) | ||
| 161 | . font-lock-builtin-face))) | 167 | . font-lock-builtin-face))) |
| 162 | 168 | ||
| 163 | (defconst python-font-lock-syntactic-keywords | 169 | (defconst python-font-lock-syntactic-keywords |