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/python.el2
-rw-r--r--lisp/progmodes/ruby-mode.el3
3 files changed, 8 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index bffc5b95d25..e977a415d62 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1555,7 +1555,7 @@ Key bindings:
(cons "Pike" (c-lang-const c-mode-menu pike)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`pike\\'" . pike-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
;;;###autoload
(define-derived-mode pike-mode prog-mode "Pike"
@@ -1589,7 +1589,10 @@ Key bindings:
;; Support for AWK
;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`[gmn]?awk\\'" . awk-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode))
(c-define-abbrev-table 'awk-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5eecc347f03..5f919bf495f 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -225,7 +225,7 @@
;;;###autoload
(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
;;;###autoload
-(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`python[0-9.]*\\'") 'python-mode))
+(add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 'python-mode))
(defgroup python nil
"Python Language's flying circus support for Emacs."
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 9dc2c4fb6c9..0f868255589 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1968,7 +1968,8 @@ The variable `ruby-indent-level' controls the amount of indentation.
"\\)\\'")) 'ruby-mode))
;;;###autoload
-(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`\\(rbx\\|j?ruby\\(1\\.[89]\\)?\\)\\'") 'ruby-mode))
+(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
+ (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
(provide 'ruby-mode)