changeset 100048:d872c709fff2

* emacs-lisp/re-builder.el (reb-mode-map): Fix typo in menu tooltip. (reb-mode): Define with `define-derived-mode'.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 29 Nov 2008 20:25:54 +0000
parents 6f0574e7edd8
children fbb01190f309
files lisp/ChangeLog lisp/emacs-lisp/re-builder.el
diffstat 2 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Nov 29 20:05:32 2008 +0000
+++ b/lisp/ChangeLog	Sat Nov 29 20:25:54 2008 +0000
@@ -1,3 +1,8 @@
+2008-11-29  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs-lisp/re-builder.el (reb-mode-map): Fix typo in menu tooltip.
+	(reb-mode): Define with `define-derived-mode'.
+
 2008-11-29  Karl Fogel  <kfogel@red-bean.com>
 
 	* files.el (break-hardlink-on-save): New variable.
--- a/lisp/emacs-lisp/re-builder.el	Sat Nov 29 20:05:32 2008 +0000
+++ b/lisp/emacs-lisp/re-builder.el	Sat Nov 29 20:25:54 2008 +0000
@@ -248,7 +248,7 @@
     (define-key menu-map [rt]
       '(menu-item "Case sensitive" reb-toggle-case
 		  :button (:toggle . case-fold-search)
-		  :help "Toggle case sensitivity of searches for RE Builder target buffer."))
+		  :help "Toggle case sensitivity of searches for RE Builder target buffer"))
     (define-key menu-map [rb]
       '(menu-item "Change target buffer..." reb-change-target-buffer
 		  :help "Change the target buffer and display it in the target window"))
@@ -273,17 +273,10 @@
     map)
   "Keymap used by the RE Builder.")
 
-(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")
+(define-derived-mode reb-mode nil "RE Builder"
+  "Major mode for interactively building Regular Expressions."
   (set (make-local-variable 'blink-matching-paren) nil)
-  (use-local-map reb-mode-map)
-  (reb-mode-common)
-  (run-mode-hooks 'reb-mode-hook))
+  (reb-mode-common))
 
 (define-derived-mode reb-lisp-mode
   emacs-lisp-mode "RE Builder Lisp"