]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/data-debug.el
Publicize cl--generic-all-functions
[gnu-emacs] / lisp / cedet / data-debug.el
index c468ec1046a9d314141a05e5c643adee97dbd95f..330c7757511a45b70a1fe3b0b0f7f4853ba9bdd0 100644 (file)
@@ -1,6 +1,6 @@
-;;; data-debug.el --- Datastructure Debugger
+;;; data-debug.el --- Data structure debugger
 
-;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam  <zappo@gnu.org>
 ;; Old-Version: 0.2
@@ -55,7 +55,7 @@
       (defalias 'data-debug-overlay-p 'extentp)
       (if (not (fboundp 'propertize))
          (defun dd-propertize (string &rest properties)
-           "Mimic 'propertize' in from Emacs 23."
+           "Mimic `propertize' in from Emacs 23."
            (add-text-properties 0 (length string) properties string)
            string
            )
@@ -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)