Mercurial > emacs
changeset 105132:4640c3af38ad
(dig-mode): Use define-derived-mode.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 21 Sep 2009 02:28:02 +0000 |
parents | 04a7d9439cd0 |
children | 4bd8c41046c4 |
files | lisp/ChangeLog lisp/net/dig.el |
diffstat | 2 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Sep 20 19:59:38 2009 +0000 +++ b/lisp/ChangeLog Mon Sep 21 02:28:02 2009 +0000 @@ -1,3 +1,7 @@ +2009-09-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * net/dig.el (dig-mode): Use define-derived-mode. + 2009-09-20 Dan Nicolaescu <dann@ics.uci.edu> * vc-dispatcher.el (vc-do-command): Return the process object in
--- a/lisp/net/dig.el Sun Sep 20 19:59:38 2009 +0000 +++ b/lisp/net/dig.el Mon Sep 21 02:28:02 2009 +0000 @@ -136,23 +136,16 @@ (define-key dig-mode-map "q" 'dig-exit)) -(defun dig-mode () +(define-derived-mode dig-mode nil "Dig" "Major mode for displaying dig output." - (interactive) - (kill-all-local-variables) - (setq mode-name "dig") - (setq major-mode 'dig-mode) - (use-local-map dig-mode-map) (buffer-disable-undo) (unless (featurep 'xemacs) (set (make-local-variable 'font-lock-defaults) '(dig-font-lock-keywords t))) (when (featurep 'font-lock) + ;; FIXME: what is this for?? --Stef (font-lock-set-defaults)) - (save-current-buffer - (if (fboundp 'run-mode-hooks) - (run-mode-hooks 'dig-mode-hook) - (run-hooks 'dig-mode-hook)))) + ) (defun dig-exit () "Quit dig output buffer."