diff options
author | Glenn Morris <rgm@gnu.org> | 2013-05-21 20:13:56 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-05-21 20:13:56 -0700 |
commit | 0cdffd7dd407452c8d60931736a5be52cf9ed7b6 (patch) | |
tree | 0ce2f01293b833e673dc341aa7396d2e78eb0d0e /lisp/progmodes/gud.el | |
parent | ab56a6f42c21c8c074b5e50a928955a8d69768f7 (diff) | |
download | emacs-0cdffd7dd407452c8d60931736a5be52cf9ed7b6.tar.gz emacs-0cdffd7dd407452c8d60931736a5be52cf9ed7b6.tar.bz2 emacs-0cdffd7dd407452c8d60931736a5be52cf9ed7b6.zip |
Small speedbar-related clean-up
* lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape):
Remove unnecessary declarations.
(dframe-message): Doc fix.
* lisp/info.el (dframe-select-attached-frame, dframe-current-frame):
Declare.
* lisp/speedbar.el (speedbar-message): Make it an obsolete alias.
Update all callers.
(speedbar-with-attached-buffer)
(speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete.
(speedbar-with-writable): Use backquote.
* lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb):
* lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click):
Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame
rather than speedbar- aliases.
* lisp/mail/rmail.el: Load dframe rather than speedbar when compiling.
(speedbar-make-specialized-keymap, speedbar-insert-button)
(dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame)
(speedbar-do-function-pointer): Declare.
(rmail-speedbar-button, rmail-speedbar-find-file)
(rmail-speedbar-move-message):
Use dframe-with-attached-buffer rather than speedbar- alias.
* lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling.
(dframe-message, speedbar-make-specialized-keymap)
(speedbar-add-expansion-list, speedbar-mode-functions-list)
(speedbar-make-tag-line, speedbar-remove-localized-speedbar-support)
(speedbar-insert-button, dframe-select-attached-frame)
(dframe-maybee-jump-to-attached-frame)
(speedbar-change-initial-expansion-list)
(speedbar-previously-used-expansion-list-name): Declare.
(gud-speedbar-item-info, gud-gdb-goto-stackframe):
Use dframe-message, dframe-with-attached-buffer rather than
speedbar- aliases.
(gud-sentinel): Silence compiler.
* lisp/progmodes/vhdl-mode.el (speedbar-refresh)
(speedbar-do-function-pointer, speedbar-add-supported-extension)
(speedbar-add-mode-functions-list, speedbar-make-specialized-keymap)
(speedbar-change-initial-expansion-list, speedbar-add-expansion-list)
(speedbar-extension-list-to-regex, speedbar-directory-buttons)
(speedbar-file-lists, speedbar-make-tag-line)
(speedbar-line-directory, speedbar-goto-this-file)
(speedbar-center-buffer-smartly, speedbar-change-expand-button-char)
(speedbar-delete-subblock, speedbar-position-cursor-on-line)
(speedbar-make-button, speedbar-reset-scanners)
(speedbar-files-item-info, speedbar-line-text)
(speedbar-find-file-in-frame, speedbar-set-timer)
(dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare.
(speedbar-with-writable): Do not (re)define it.
(vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame
rather than speedbar- alias.
* lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find):
* lisp/cedet/semantic/sb.el (semantic-sb-token-jump):
Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias.
* lisp/mh-e/mh-speed.el (mh-speed-view):
Use dframe-with-attached-buffer rather than speedbar- alias.
Diffstat (limited to 'lisp/progmodes/gud.el')
-rw-r--r-- | lisp/progmodes/gud.el | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 9ee4aae1da6..212d3894091 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -413,7 +413,7 @@ we're in the GUD buffer)." ;; ====================================================================== ;; speedbar support functions and variables. -(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer. +(eval-when-compile (require 'dframe)) ; for dframe-with-attached-buffer (defvar gud-last-speedbar-stackframe nil "Description of the currently displayed GUD stack. @@ -422,19 +422,24 @@ The value t means that there is no stack, and we are in display-file mode.") (defvar gud-speedbar-key-map nil "Keymap used when in the buffers display mode.") +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-message "dframe" (fmt &rest args)) + (defun gud-speedbar-item-info () "Display the data type of the watch expression element." (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) (if (nth 7 var) - (speedbar-message "%s: %s" (nth 7 var) (nth 3 var)) - (speedbar-message "%s" (nth 3 var))))) + (dframe-message "%s: %s" (nth 7 var) (nth 3 var)) + (dframe-message "%s" (nth 3 var))))) + +(declare-function speedbar-make-specialized-keymap "speedbar" ()) +(declare-function speedbar-add-expansion-list "speedbar" (new-list)) +(defvar speedbar-mode-functions-list) (defun gud-install-speedbar-variables () "Install those variables used by speedbar to enhance gud/gdb." - (if gud-speedbar-key-map - nil + (unless gud-speedbar-key-map (setq gud-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -483,6 +488,13 @@ The value t means that there is no stack, and we are in display-file mode.") DIRECTORY and ZERO are not used, but are required by the caller." (gud-speedbar-buttons gud-comint-buffer)) +(declare-function speedbar-make-tag-line "speedbar" + (type char func data tag tfunc tdata tface depth)) +(declare-function speedbar-remove-localized-speedbar-support "speedbar" + (buffer)) +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + (defun gud-speedbar-buttons (buffer) "Create a speedbar display based on the current state of GUD. If the GUD BUFFER is not running a supported debugger, then turn @@ -881,9 +893,14 @@ It is passed through `gud-gdb-marker-filter' before we look at it." ;; gdb speedbar functions +;; Part of the macro expansion of dframe-with-attached-buffer. +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun gud-gdb-goto-stackframe (_text token _indent) "Goto the stackframe described by TEXT, TOKEN, and INDENT." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (gud-basic-call (concat "server frame " (nth 1 token))) (sit-for 1))) @@ -2633,6 +2650,8 @@ It is saved for when this flag is not set.") (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position) (declare-function gdb-reset "gdb-mi" ()) +(declare-function speedbar-change-initial-expansion-list "speedbar" (new)) +(defvar speedbar-previously-used-expansion-list-name) (defun gud-sentinel (proc msg) (cond ((null (buffer-name (process-buffer proc))) @@ -2640,7 +2659,7 @@ It is saved for when this flag is not set.") ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) (set-process-buffer proc nil) - (if (and (boundp 'speedbar-frame) + (if (and (boundp 'speedbar-initial-expansion-list-name) (string-equal speedbar-initial-expansion-list-name "GUD")) (speedbar-change-initial-expansion-list speedbar-previously-used-expansion-list-name)) |