summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-mode.el7
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/js.el9
-rw-r--r--lisp/progmodes/python.el18
4 files changed, 23 insertions, 13 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
This function is called from the hook `before-hack-local-variables-hook'."
(when c-buffer-is-cc-mode
- (let ((stile (cdr (assq 'c-file-style file-local-variables-alist)))
+ (let ((mode-cons (assq 'mode file-local-variables-alist))
+ (stile (cdr (assq 'c-file-style file-local-variables-alist)))
(offsets (cdr (assq 'c-file-offsets file-local-variables-alist))))
+ (when mode-cons
+ (hack-one-local-variable (car mode-cons) (cdr mode-cons))
+ (setq file-local-variables-alist
+ (delq mode-cons file-local-variables-alist)))
(when stile
(or (stringp stile) (error "c-file-style is not a string"))
(c-set-style stile))
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
`(lambda ()
(interactive)
(self-insert-command 1)
- ,@(if (listp cmd) cmd (list cmd))))))
+ ,(if (listp cmd) cmd (list cmd))))))
;; Set action and key bindings.
;; 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."
(defcustom js-js-tmpdir
"~/.emacs.d/js/js"
"Temporary directory used by `js-mode' to communicate with Mozilla.
-This directory must be readable and writable by both Mozilla and
-Emacs."
+This directory must be readable and writable by both Mozilla and Emacs."
:type 'directory
:group 'js)
@@ -499,11 +498,11 @@ getting timeout messages."
(define-key keymap [(meta ?.)] #'js-find-symbol)
(easy-menu-define nil keymap "Javascript Menu"
'("Javascript"
- ["Select new Mozilla context…" js-set-js-context
+ ["Select New Mozilla Context..." js-set-js-context
(fboundp #'inferior-moz-process)]
- ["Evaluate expression in Mozilla context…" js-eval
+ ["Evaluate Expression in Mozilla Context..." js-eval
(fboundp #'inferior-moz-process)]
- ["Send current function to Mozilla…" js-eval-defun
+ ["Send Current Function to Mozilla..." js-eval-defun
(fboundp #'inferior-moz-process)]))
keymap)
"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 @@
(defvar python-font-lock-keywords
`(,(rx symbol-start
- ;; From v 2.5 reference, § keywords.
+ ;; From v 2.7 reference, § keywords.
;; def and class dealt with separately below
(or "and" "as" "assert" "break" "continue" "del" "elif" "else"
"except" "exec" "finally" "for" "from" "global" "if"
@@ -102,7 +102,7 @@
;; Not real keywords, but close enough to be fontified as such
"self" "True" "False")
symbol-end)
- (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.5 manual
+ (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.7 manual
. font-lock-constant-face)
;; Definitions
(,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_))))
@@ -117,7 +117,7 @@
(0+ "." (1+ (or word ?_)))))
(1 font-lock-type-face))
;; Built-ins. (The next three blocks are from
- ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns
+ ;; `__builtin__.__dict__.keys()' in Python 2.7) These patterns
;; are debateable, but they at least help to spot possible
;; shadowing of builtins.
(,(rx symbol-start (or
@@ -135,7 +135,9 @@
"SystemExit" "TabError" "TypeError" "UnboundLocalError"
"UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError"
"UnicodeTranslateError" "UnicodeWarning" "UserWarning"
- "ValueError" "Warning" "ZeroDivisionError") symbol-end)
+ "ValueError" "Warning" "ZeroDivisionError"
+ ;; Python 2.7
+ "BufferError" "BytesWarning" "WindowsError") symbol-end)
. font-lock-type-face)
(,(rx (or line-start (not (any ". \t"))) (* (any " \t")) symbol-start
(group (or
@@ -152,12 +154,16 @@
"range" "raw_input" "reduce" "reload" "repr" "reversed"
"round" "set" "setattr" "slice" "sorted" "staticmethod"
"str" "sum" "super" "tuple" "type" "unichr" "unicode" "vars"
- "xrange" "zip")) symbol-end)
+ "xrange" "zip"
+ ;; Python 2.7.
+ "bin" "bytearray" "bytes" "format" "memoryview" "next" "print"
+ )) symbol-end)
(1 font-lock-builtin-face))
(,(rx symbol-start (or
;; other built-ins
"True" "False" "None" "Ellipsis"
- "_" "__debug__" "__doc__" "__import__" "__name__") symbol-end)
+ "_" "__debug__" "__doc__" "__import__" "__name__" "__package__")
+ symbol-end)
. font-lock-builtin-face)))
(defconst python-font-lock-syntactic-keywords