Mercurial > emacs
comparison lisp/progmodes/idlw-shell.el @ 58307:8e5e564777ba
Re-applied diff 3.26->3.27, variable reorganization.
author | J.D. Smith <jdsmith@as.arizona.edu> |
---|---|
date | Thu, 18 Nov 2004 05:28:03 +0000 |
parents | 704843ce6908 |
children | e5111e925bde 2a3f27a45698 b637c617432f |
comparison
equal
deleted
inserted
replaced
58306:561c3f4a39fe | 58307:8e5e564777ba |
---|---|
564 | 564 |
565 ;;; External variables | 565 ;;; External variables |
566 (defvar comint-last-input-start) | 566 (defvar comint-last-input-start) |
567 (defvar comint-last-input-end) | 567 (defvar comint-last-input-end) |
568 | 568 |
569 ;; Other variables | |
570 (defvar idlwave-shell-temp-pro-file nil | |
571 "Absolute pathname for temporary IDL file for compiling regions") | |
572 | |
573 (defvar idlwave-shell-temp-rinfo-save-file nil | |
574 "Absolute pathname for temporary IDL file save file for routine_info. | |
575 This is used to speed up the reloading of the routine info procedure | |
576 before use by the shell.") | |
577 | |
569 (defun idlwave-shell-temp-file (type) | 578 (defun idlwave-shell-temp-file (type) |
570 "Return a temp file, creating it if necessary. | 579 "Return a temp file, creating it if necessary. |
571 | 580 |
572 TYPE is either 'pro or 'rinfo, and idlwave-shell-temp-pro-file or | 581 TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or |
573 idlwave-shell-temp-rinfo-save-file is set (respectively)." | 582 `idlwave-shell-temp-rinfo-save-file' is set (respectively)." |
574 (cond | 583 (cond |
575 ((eq type 'rinfo) | 584 ((eq type 'rinfo) |
576 (or idlwave-shell-temp-rinfo-save-file | 585 (or idlwave-shell-temp-rinfo-save-file |
577 (setq idlwave-shell-temp-rinfo-save-file | 586 (setq idlwave-shell-temp-rinfo-save-file |
578 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) | 587 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) |
606 ;; the file was somehow created by someone else between | 615 ;; the file was somehow created by someone else between |
607 ;; `make-temp-name' and `write-region', let's try again. | 616 ;; `make-temp-name' and `write-region', let's try again. |
608 nil) | 617 nil) |
609 file))) | 618 file))) |
610 | 619 |
611 ;; Other variables | |
612 (defvar idlwave-shell-temp-pro-file | |
613 nil | |
614 "Absolute pathname for temporary IDL file for compiling regions") | |
615 | |
616 (defvar idlwave-shell-temp-rinfo-save-file | |
617 nil | |
618 "Absolute pathname for temporary IDL file save file for routine_info. | |
619 This is used to speed up the reloading of the routine info procedure | |
620 before use by the shell.") | |
621 | 620 |
622 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" | 621 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" |
623 "Command used by `idlwave-shell-resync-dirs' to query IDL for | 622 "Command used by `idlwave-shell-resync-dirs' to query IDL for |
624 the directory stack.") | 623 the directory stack.") |
625 | 624 |
2950 (if idlwave-shell-separate-examine-output 'hide)))))) | 2949 (if idlwave-shell-separate-examine-output 'hide)))))) |
2951 | 2950 |
2952 (defvar idlwave-shell-examine-window-alist nil | 2951 (defvar idlwave-shell-examine-window-alist nil |
2953 "Variable to hold the win/height pairs for all *Examine* windows.") | 2952 "Variable to hold the win/height pairs for all *Examine* windows.") |
2954 | 2953 |
2954 (defvar idlwave-shell-examine-map (make-sparse-keymap)) | |
2955 (define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit) | |
2956 (define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear) | |
2957 | |
2955 (defun idlwave-shell-examine-display () | 2958 (defun idlwave-shell-examine-display () |
2956 "View the examine command output in a separate buffer." | 2959 "View the examine command output in a separate buffer." |
2957 (let (win cur-beg cur-end) | 2960 (let (win cur-beg cur-end) |
2958 (save-excursion | 2961 (save-excursion |
2959 (set-buffer (get-buffer-create "*Examine*")) | 2962 (set-buffer (get-buffer-create "*Examine*")) |
3030 (select-window win) | 3033 (select-window win) |
3031 (goto-char (point-max)) | 3034 (goto-char (point-max)) |
3032 (skip-chars-backward "\n") | 3035 (skip-chars-backward "\n") |
3033 (recenter -1))))) | 3036 (recenter -1))))) |
3034 | 3037 |
3035 (defvar idlwave-shell-examine-map (make-sparse-keymap)) | |
3036 (define-key idlwave-shell-examine-map "q" 'idlwave-shell-examine-display-quit) | |
3037 (define-key idlwave-shell-examine-map "c" 'idlwave-shell-examine-display-clear) | |
3038 | |
3039 (defun idlwave-shell-examine-display-quit () | 3038 (defun idlwave-shell-examine-display-quit () |
3040 (interactive) | 3039 (interactive) |
3041 (let ((win (selected-window))) | 3040 (let ((win (selected-window))) |
3042 (if (one-window-p) | 3041 (if (one-window-p) |
3043 (delete-frame (window-frame win)) | 3042 (delete-frame (window-frame win)) |
3409 (defun idlwave-shell-set-bp (bp &optional no-show) | 3408 (defun idlwave-shell-set-bp (bp &optional no-show) |
3410 "Try to set a breakpoint BP. | 3409 "Try to set a breakpoint BP. |
3411 The breakpoint will be placed at the beginning of the statement on the | 3410 The breakpoint will be placed at the beginning of the statement on the |
3412 line specified by BP or at the next IDL statement if that line is not | 3411 line specified by BP or at the next IDL statement if that line is not |
3413 a statement. Determines IDL's internal representation for the | 3412 a statement. Determines IDL's internal representation for the |
3414 breakpoint, which may have occured at a different line than | 3413 breakpoint, which may have occurred at a different line than |
3415 specified. If NO-SHOW is non-nil, don't do any updating." | 3414 specified. If NO-SHOW is non-nil, don't do any updating." |
3416 ;; Get and save the old breakpoints | 3415 ;; Get and save the old breakpoints |
3417 (idlwave-shell-send-command | 3416 (idlwave-shell-send-command |
3418 idlwave-shell-bp-query | 3417 idlwave-shell-bp-query |
3419 `(progn | 3418 `(progn |