changeset 41333:fcb2aaafc8b2

(reb-mode): Don't use define-derived-mode. Call kill-all-local-variables.
author Richard M. Stallman <rms@gnu.org>
date Tue, 20 Nov 2001 23:43:55 +0000
parents 15d7e3180dcf
children cc4a4bcf9fb6
files lisp/emacs-lisp/re-builder.el
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/re-builder.el	Tue Nov 20 23:41:41 2001 +0000
+++ b/lisp/emacs-lisp/re-builder.el	Tue Nov 20 23:43:55 2001 +0000
@@ -232,9 +232,16 @@
       (define-key reb-mode-map "\C-c\C-b" 'reb-change-target-buffer)
       (define-key reb-mode-map "\C-c\C-u" 'reb-force-update)))
 
-(define-derived-mode reb-mode nil "RE Builder"
-  "Major mode for interactively building Regular Expressions."
-  (reb-mode-common))
+(defun reb-mode ()
+  "Major mode for interactively building Regular Expressions.
+\\{reb-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (setq major-mode 'reb-mode
+        mode-name "RE Builder")
+  (use-local-map reb-mode-map)
+  (reb-mode-common)
+  (run-hooks 'reb-mode-hook))
 
 (define-derived-mode reb-lisp-mode
   emacs-lisp-mode "RE Builder Lisp"