diff src/elisp/urweb-mode.el @ 2181:e46989ea4ca7

Grandfathered into release: make urweb-mode keep working in Emacs 23
author Adam Chlipala <adam@chlipala.net>
date Sun, 18 Oct 2015 14:38:20 -0400
parents 3ffef52d549c
children
line wrap: on
line diff
--- a/src/elisp/urweb-mode.el	Sun Oct 18 10:50:59 2015 -0400
+++ b/src/elisp/urweb-mode.el	Sun Oct 18 14:38:20 2015 -0400
@@ -377,7 +377,11 @@
 (add-to-list 'auto-mode-alist '("\\.urs?\\'" . urweb-mode))
 
 ;;;###autoload
-(define-derived-mode urweb-mode prog-mode "Ur/Web"
+(defalias 'urweb-mode-derived-from
+  (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
+
+;;;###autoload
+(define-derived-mode urweb-mode urweb-mode-derived-from "Ur/Web"
   "\\<urweb-mode-map>Major mode for editing Ur/Web code.
 This mode runs `urweb-mode-hook' just before exiting.
 \\{urweb-mode-map}"