(defun my-gdb () (interactive) (global-unset-key "") (setq comint-scroll-show-maximum-output nil) (call-interactively 'gdb) (local-set-key " " 'comint-dynamic-complete) (if (emacs-version-compare 19 27 '<) (progn (my-shell-bindings-old) (my-gdb-bindings-old) (setq gdb-command-name "/usersgfisher/bin/gdb.sortofnew") ) (progn (my-shell-bindings) (my-gdb-bindings) ) ) ) (defun my-gdb-bindings() (interactive) (local-set-key "u" 'gud-up) (local-set-key "d" 'gud-down) (local-set-key "n" 'gud-next) (local-set-key "s" 'gud-step) (local-set-key "f" 'gud-display-frame) (local-set-key "c" 'gud-cont) (local-set-key " " 'my-comint-send-input) (if (xemacs-p) (progn (local-set-key "u" 'gdb-up) (local-set-key "d" 'gdb-down) (local-set-key "n" 'gdb-next) (local-set-key "s" 'gdb-step) (local-set-key "f" 'gdb-display-frame) (local-set-key "c" 'gdb-cont) ) ) ) (defun my-gdb-bindings-old() (interactive) (local-set-key "u" 'gdb-up) (local-set-key "d" 'gdb-down) (local-set-key "n" 'gdb-next) (local-set-key "s" 'gdb-step) (local-set-key "f" 'gdb-display-frame) (local-set-key "c" 'gdb-cont) ) ; Fucking fucked-up annoying motherfucking motherfucker. The following forces ; a one-line scroll before every comint-send-input, since I can't fucking ; figure out why the stupid motherfucker keeps jumping the cursor to the middle ; of the window when comint-send-input is issued from the last line of the ; window. (defun my-comint-send-input() (interactive) (scroll-up-1) (comint-send-input) )