comparison lisp/progmodes/gud.el @ 88123:375f2633d815

New directory
author Kenichi Handa <handa@m17n.org>
date Mon, 08 Sep 2003 11:56:09 +0000
parents 695cf19ef79e
children 68c22ea6027c
comparison
equal deleted inserted replaced
52428:27bc8b966642 88123:375f2633d815
2522 (display-buffer buffer))))) 2522 (display-buffer buffer)))))
2523 (pos)) 2523 (pos))
2524 (if buffer 2524 (if buffer
2525 (progn 2525 (progn
2526 (with-current-buffer buffer 2526 (with-current-buffer buffer
2527 (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) 2527 (if (not (or (verify-visited-file-modtime buffer) gud-keep-buffer))
2528 (if (yes-or-no-p 2528 (progn
2529 (if
2530 (yes-or-no-p
2529 (format "File %s changed on disk. Reread from disk? " 2531 (format "File %s changed on disk. Reread from disk? "
2530 (buffer-name))) 2532 (buffer-name)))
2531 (revert-buffer t t) 2533 (revert-buffer t t)
2532 (setq gud-keep-buffer t))) 2534 (setq gud-keep-buffer t))))
2533 (save-restriction 2535 (save-restriction
2534 (widen) 2536 (widen)
2535 (goto-line line) 2537 (goto-line line)
2536 (setq pos (point)) 2538 (setq pos (point))
2537 (setq overlay-arrow-string "=>") 2539 (setq overlay-arrow-string "=>")
2538 (or overlay-arrow-position 2540 (or overlay-arrow-position
2539 (setq overlay-arrow-position (make-marker))) 2541 (setq overlay-arrow-position (make-marker)))
2540 (set-marker overlay-arrow-position (point) (current-buffer))) 2542 (set-marker overlay-arrow-position (point) (current-buffer)))
2541 (cond ((or (< pos (point-min)) (> pos (point-max))) 2543 (cond ((or (< pos (point-min)) (> pos (point-max)))
2542 (widen) 2544 (widen)
2543 (goto-char pos)))) 2545 (goto-char pos))))
2544 (if window (set-window-point window overlay-arrow-position)))))) 2546 (set-window-point window overlay-arrow-position)))))
2545 2547
2546 ;; The gud-call function must do the right thing whether its invoking 2548 ;; The gud-call function must do the right thing whether its invoking
2547 ;; keystroke is from the GUD buffer itself (via major-mode binding) 2549 ;; keystroke is from the GUD buffer itself (via major-mode binding)
2548 ;; or a C buffer. In the former case, we want to supply data from 2550 ;; or a C buffer. In the former case, we want to supply data from
2549 ;; gud-last-frame. Here's how we do it: 2551 ;; gud-last-frame. Here's how we do it:
2971 (font-lock-syntactic-face-function 2973 (font-lock-syntactic-face-function
2972 . gdb-script-font-lock-syntactic-face)))) 2974 . gdb-script-font-lock-syntactic-face))))
2973 2975
2974 (provide 'gud) 2976 (provide 'gud)
2975 2977
2976 ;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4
2977 ;;; gud.el ends here 2978 ;;; gud.el ends here