]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/gud.el
Re-write flymake-highlight-line in flymake.el
[gnu-emacs] / lisp / progmodes / gud.el
index c549d9eedef90ab4f9789f3b027110e2aef4efea..4097a9cd97e3c06282f4528e65d77d7379bf3fb2 100644 (file)
@@ -1,7 +1,6 @@
 ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
 
-;; Copyright (C) 1992-1996, 1998, 2000-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1992-1996, 1998, 2000-2013 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
 ;; Maintainer: FSF
@@ -67,7 +66,7 @@ pdb (Python), and jdb."
   :group 'gud)
 
 (global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh)
-(define-key ctl-x-map " " 'gud-break)  ;; backward compatibility hack
+;; (define-key ctl-x-map " " 'gud-break); backward compatibility hack
 
 (defvar gud-marker-filter nil)
 (put 'gud-marker-filter 'permanent-local t)
@@ -321,8 +320,9 @@ Uses `gud-<MINOR-MODE>-directories' to find the source files."
     (when buf
       ;; Copy `gud-minor-mode' to the found buffer to turn on the menu.
       (with-current-buffer buf
-       (set (make-local-variable 'gud-minor-mode) minor-mode)
-       (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
+       (setq-local gud-minor-mode minor-mode)
+       (if (boundp 'tool-bar-map)      ; not --without-x
+           (setq-local tool-bar-map gud-tool-bar-map))
        (when (and gud-tooltip-mode
                   (eq gud-minor-mode 'gdbmi))
          (make-local-variable 'gdb-define-alist)
@@ -2159,10 +2159,8 @@ relative to a classpath directory."
                    (split-string
                     ;; Eliminate any subclass references in the class
                     ;; name string. These start with a "$"
-                    ((lambda (x)
-                       (if (string-match "$.*" x)
-                           (replace-match "" t t x) p))
-                     p)
+                     (if (string-match "$.*" p)
+                         (replace-match "" t t p) p)
                     "\\.") "/")
         ".java"))
        (cplist (append gud-jdb-sourcepath gud-jdb-classpath))
@@ -2482,7 +2480,8 @@ comint mode, which see."
   (setq mode-line-process '(":%s"))
   (define-key (current-local-map) "\C-c\C-l" 'gud-refresh)
   (set (make-local-variable 'gud-last-frame) nil)
-  (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
+  (if (boundp 'tool-bar-map)            ; not --without-x
+      (setq-local tool-bar-map gud-tool-bar-map))
   (make-local-variable 'comint-prompt-regexp)
   ;; Don't put repeated commands in command history many times.
   (set (make-local-variable 'comint-input-ignoredups) t)
@@ -3282,6 +3281,8 @@ Treats actions as defuns."
 
 ;;; Customizable settings
 
+(defvar tooltip-mode)
+
 ;;;###autoload
 (define-minor-mode gud-tooltip-mode
   "Toggle the display of GUD tooltips.