diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-10 23:31:56 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-10 23:31:56 -0400 |
commit | 1b3b87dfe0fae8e5266319531c0a874c8b4313b1 (patch) | |
tree | 167074a597924cfde441891481a9eb712b163422 /lisp/cedet/data-debug.el | |
parent | 765da53c2084e3687201f06f8d050497f0e06da9 (diff) | |
download | emacs-1b3b87dfe0fae8e5266319531c0a874c8b4313b1.tar.gz |
Use define-derived-mode (and derived-mode-p).
* lisp/play/snake.el (snake-mode):
* lisp/play/mpuz.el (mpuz-mode):
* lisp/play/landmark.el (lm-mode):
* lisp/play/blackbox.el (blackbox-mode):
* lisp/play/5x5.el (5x5-mode):
* lisp/obsolete/options.el (Edit-options-mode):
* lisp/net/quickurl.el (quickurl-list-mode):
* lisp/net/newst-treeview.el (newsticker-treeview-mode):
* lisp/mail/rmailsum.el (rmail-summary-mode):
* lisp/mail/mspools.el (mspools-mode):
* lisp/locate.el (locate-mode):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/emulation/ws-mode.el (wordstar-mode):
* lisp/emacs-lisp/debug.el (debugger-mode):
* lisp/array.el (array-mode):
* lisp/net/eudc.el (eudc-mode): Use define-derived-mode.
* lisp/net/mairix.el (mairix-searches-mode-font-lock-keywords):
Move initialization into declaration.
(mairix-searches-mode): Use define-derived-mode.
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode): Use define-derived-mode.
(eudc-edit-hotlist): Use dolist.
* lisp/man.el (Man-mode-syntax-table): Rename from man-mode-syntax-table.
(Man-mode): Use define-derived-mode.
* lisp/info.el (Info-edit-mode-map): Rename from Info-edit-map.
(Info-edit-mode): Use define-derived-mode.
(Info-cease-edit): Use Info-mode.
* lisp/eshell/esh-mode.el (eshell-mode-syntax-table): Move initialization
into declaration.
(eshell-mode): Use define-derived-mode.
* lisp/chistory.el (command-history-mode-map): Rename from
command-history-map.
(command-history-mode): Use define-derived-mode.
* lisp/calc/calc.el (calc-trail-mode-map): New var.
(calc-trail-mode): Use define-derived-mode.
(calc-trail-buffer): Set calc-main-buffer manually.
* lisp/bookmark.el (bookmark-insert-annotation): New function.
(bookmark-edit-annotation): Use it.
(bookmark-edit-annotation-mode): Make it a proper major mode.
(bookmark-send-edited-annotation): Use derived-mode-p.
* lisp/arc-mode.el (archive-mode): Move kill-all-local-variables a tiny bit
closer to its ideal place. Use \' to match EOS.
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode): Use define-derived-mode.
(semantic-grammar-mode-syntax-table): Rename from
semantic-grammar-syntax-table.
(semantic-grammar-mode-map): Rename from semantic-grammar-map.
* lisp/cedet/data-debug.el (data-debug-mode-map): Rename from data-debug-map.
(data-debug-mode): Use define-derived-mode.
* lisp/gnus/score-mode.el (gnus-score-mode-map): Move initialization
into declaration.
(gnus-score-mode): Use define-derived-mode.
* lisp/gnus/gnus-srvr.el (gnus-browse-mode): Use define-derived-mode.
* lisp/gnus/gnus-kill.el (gnus-kill-file-mode-map): Move initialization
into declaration.
(gnus-kill-file-mode): Use define-derived-mode.
(gnus-kill-file-edit-file, gnus-kill-file-enter-kill, gnus-kill):
Use derived-mode-p.
* lisp/gnus/gnus-group.el (gnus-group-mode): Use define-derived-mode.
(gnus-group-setup-buffer, gnus-group-name-at-point)
(gnus-group-make-web-group, gnus-group-enter-directory)
(gnus-group-suspend): Use derived-mode-p.
* lisp/gnus/gnus-cus.el (gnus-custom-mode): Use define-derived-mode.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode): Use define-derived-mode.
* lisp/gnus/gnus-art.el (gnus-article-mode): Use define-derived-mode.
(gnus-article-setup-buffer, gnus-article-prepare)
(gnus-article-prepare-display, gnus-sticky-article)
(gnus-kill-sticky-article-buffer, gnus-kill-sticky-article-buffers)
(gnus-bind-safe-url-regexp, gnus-article-check-buffer)
(gnus-article-read-summary-keys): Use derived-mode-p.
Diffstat (limited to 'lisp/cedet/data-debug.el')
-rw-r--r-- | lisp/cedet/data-debug.el | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index c468ec1046a..4658c604211 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -869,7 +869,8 @@ If PARENT is non-nil, it is somehow related as a parent to thing." table) "Syntax table used in data-debug macro buffers.") -(defvar data-debug-map +(define-obsolete-variable-alias 'data-debug-map 'data-debug-mode-map "24.1") +(defvar data-debug-mode-map (let ((km (make-sparse-keymap))) (suppress-keymap km) (define-key km [mouse-2] 'data-debug-expand-or-contract-mouse) @@ -887,22 +888,15 @@ If PARENT is non-nil, it is somehow related as a parent to thing." :group 'data-debug :type 'hook) -(defun data-debug-mode () +(define-derived-mode data-debug-mode fundamental-mode "DATA-DEBUG" "Major-mode for the Analyzer debugger. -\\{data-debug-map}" - (interactive) - (kill-all-local-variables) - (setq major-mode 'data-debug-mode - mode-name "DATA-DEBUG" - comment-start ";;" +\\{data-debug-mode-map}" + (setq comment-start ";;" comment-end "" buffer-read-only t) - (set (make-local-variable 'comment-start-skip) + (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") - (set-syntax-table data-debug-mode-syntax-table) - (use-local-map data-debug-map) - (run-hooks 'data-debug-hook) (buffer-disable-undo) (set (make-local-variable 'font-lock-global-modes) nil) (font-lock-mode -1) |